Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,433 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFX.H
#ifdef _AFX_INLINE
// CObject
_AFX_INLINE CObject::CObject()
{ }
_AFX_INLINE CObject::~CObject()
{ }
_AFX_INLINE void CObject::Serialize(CArchive&)
{ /* CObject does not serialize anything by default */ }
_AFX_INLINE void* PASCAL CObject::operator new(size_t, void* p)
{ return p; }
#ifndef _DEBUG
// _DEBUG versions in afxmem.cpp
_AFX_INLINE void PASCAL CObject::operator delete(void* p)
{ ::operator delete(p); }
#if _MSC_VER >= 1200
_AFX_INLINE void PASCAL CObject::operator delete(void* p, void*)
{ ::operator delete(p); }
#endif
_AFX_INLINE void* PASCAL CObject::operator new(size_t nSize)
{ return ::operator new(nSize); }
// _DEBUG versions in objcore.cpp
#ifdef _AFXDLL
_AFX_INLINE void CObject::AssertValid() const
{ /* no asserts in release builds */ }
_AFX_INLINE void CObject::Dump(CDumpContext&) const
{ /* no dumping in release builds */ }
#endif //_AFXDLL
#endif //!_DEBUG
_AFX_INLINE const CObject* AFX_CDECL AfxDynamicDownCast(CRuntimeClass* pClass, const CObject* pObject)
{ return (const CObject*)AfxDynamicDownCast(pClass, (CObject*)pObject); }
#ifdef _DEBUG
_AFX_INLINE const CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, const CObject* pObject)
{ return (const CObject*)AfxStaticDownCast(pClass, (CObject*)pObject); }
#endif
// exceptions
_AFX_INLINE CException::~CException()
{ }
_AFX_INLINE CSimpleException::CSimpleException()
{ m_bInitialized = FALSE; m_bLoaded = FALSE; }
_AFX_INLINE CSimpleException::CSimpleException(BOOL bAutoDelete)
: CException(bAutoDelete) { m_bInitialized = FALSE; m_bLoaded = FALSE; }
#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
_AFX_INLINE CSimpleException::~CSimpleException()
{ }
#endif
_AFX_INLINE CMemoryException::CMemoryException()
: CSimpleException() { }
_AFX_INLINE CMemoryException::CMemoryException(BOOL bAutoDelete, UINT nResourceID)
: CSimpleException(bAutoDelete) { m_nResourceID = nResourceID; }
_AFX_INLINE CMemoryException::~CMemoryException()
{ }
_AFX_INLINE CNotSupportedException::CNotSupportedException()
: CSimpleException() { }
_AFX_INLINE CNotSupportedException::CNotSupportedException(BOOL bAutoDelete, UINT nResourceID)
: CSimpleException(bAutoDelete) { m_nResourceID = nResourceID; }
_AFX_INLINE CNotSupportedException::~CNotSupportedException()
{ }
_AFX_INLINE CArchiveException::CArchiveException(int cause,
LPCTSTR lpszFileName /* = NULL */)
{ m_cause = cause; m_strFileName = lpszFileName; }
_AFX_INLINE CArchiveException::~CArchiveException()
{ }
_AFX_INLINE CFileException::CFileException(int cause, LONG lOsError,
LPCTSTR pstrFileName /* = NULL */)
{ m_cause = cause; m_lOsError = lOsError; m_strFileName = pstrFileName; }
_AFX_INLINE CFileException::~CFileException()
{ }
// CFile
_AFX_INLINE CFile::operator HFILE() const
{ return m_hFile; }
_AFX_INLINE DWORD CFile::ReadHuge(void* lpBuffer, DWORD dwCount)
{ return (DWORD)Read(lpBuffer, (UINT)dwCount); }
_AFX_INLINE void CFile::WriteHuge(const void* lpBuffer, DWORD dwCount)
{ Write(lpBuffer, (UINT)dwCount); }
_AFX_INLINE DWORD CFile::SeekToEnd()
{ return Seek(0, CFile::end); }
_AFX_INLINE void CFile::SeekToBegin()
{ Seek(0, CFile::begin); }
_AFX_INLINE void CFile::SetFilePath(LPCTSTR lpszNewName)
{
ASSERT_VALID(this);
ASSERT(AfxIsValidString(lpszNewName));
m_strFileName = lpszNewName;
}
// CFileFind
_AFX_INLINE BOOL CFileFind::IsReadOnly() const
{ return MatchesMask(FILE_ATTRIBUTE_READONLY); }
_AFX_INLINE BOOL CFileFind::IsDirectory() const
{ return MatchesMask(FILE_ATTRIBUTE_DIRECTORY); }
_AFX_INLINE BOOL CFileFind::IsCompressed() const
{ return MatchesMask(FILE_ATTRIBUTE_COMPRESSED); }
_AFX_INLINE BOOL CFileFind::IsSystem() const
{ return MatchesMask(FILE_ATTRIBUTE_SYSTEM); }
_AFX_INLINE BOOL CFileFind::IsHidden() const
{ return MatchesMask(FILE_ATTRIBUTE_HIDDEN); }
_AFX_INLINE BOOL CFileFind::IsTemporary() const
{ return MatchesMask(FILE_ATTRIBUTE_TEMPORARY); }
_AFX_INLINE BOOL CFileFind::IsNormal() const
{ return MatchesMask(FILE_ATTRIBUTE_NORMAL); }
_AFX_INLINE BOOL CFileFind::IsArchived() const
{ return MatchesMask(FILE_ATTRIBUTE_ARCHIVE); }
// CString
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
_AFX_INLINE void CString::Init()
{ m_pchData = afxEmptyString.m_pchData; }
#ifndef _AFXDLL
_AFX_INLINE CString::CString()
{ m_pchData = afxEmptyString.m_pchData; }
#endif
_AFX_INLINE CString::CString(const unsigned char* lpsz)
{ Init(); *this = (LPCSTR)lpsz; }
_AFX_INLINE const CString& CString::operator=(const unsigned char* lpsz)
{ *this = (LPCSTR)lpsz; return *this; }
#ifdef _UNICODE
_AFX_INLINE const CString& CString::operator+=(char ch)
{ *this += (TCHAR)ch; return *this; }
_AFX_INLINE const CString& CString::operator=(char ch)
{ *this = (TCHAR)ch; return *this; }
_AFX_INLINE CString AFXAPI operator+(const CString& string, char ch)
{ return string + (TCHAR)ch; }
_AFX_INLINE CString AFXAPI operator+(char ch, const CString& string)
{ return (TCHAR)ch + string; }
#endif
_AFX_INLINE int CString::GetLength() const
{ return GetData()->nDataLength; }
_AFX_INLINE int CString::GetAllocLength() const
{ return GetData()->nAllocLength; }
_AFX_INLINE BOOL CString::IsEmpty() const
{ return GetData()->nDataLength == 0; }
_AFX_INLINE CString::operator LPCTSTR() const
{ return m_pchData; }
_AFX_INLINE int PASCAL CString::SafeStrlen(LPCTSTR lpsz)
{ return (lpsz == NULL) ? 0 : lstrlen(lpsz); }
// CString support (windows specific)
_AFX_INLINE int CString::Compare(LPCTSTR lpsz) const
{ ASSERT(AfxIsValidString(lpsz)); return _tcscmp(m_pchData, lpsz); } // MBCS/Unicode aware
_AFX_INLINE int CString::CompareNoCase(LPCTSTR lpsz) const
{ ASSERT(AfxIsValidString(lpsz)); return _tcsicmp(m_pchData, lpsz); } // MBCS/Unicode aware
// CString::Collate is often slower than Compare but is MBSC/Unicode
// aware as well as locale-sensitive with respect to sort order.
_AFX_INLINE int CString::Collate(LPCTSTR lpsz) const
{ ASSERT(AfxIsValidString(lpsz)); return _tcscoll(m_pchData, lpsz); } // locale sensitive
_AFX_INLINE int CString::CollateNoCase(LPCTSTR lpsz) const
{ ASSERT(AfxIsValidString(lpsz)); return _tcsicoll(m_pchData, lpsz); } // locale sensitive
_AFX_INLINE TCHAR CString::GetAt(int nIndex) const
{
ASSERT(nIndex >= 0);
ASSERT(nIndex < GetData()->nDataLength);
return m_pchData[nIndex];
}
_AFX_INLINE TCHAR CString::operator[](int nIndex) const
{
// same as GetAt
ASSERT(nIndex >= 0);
ASSERT(nIndex < GetData()->nDataLength);
return m_pchData[nIndex];
}
_AFX_INLINE bool AFXAPI operator==(const CString& s1, const CString& s2)
{ return s1.Compare(s2) == 0; }
_AFX_INLINE bool AFXAPI operator==(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) == 0; }
_AFX_INLINE bool AFXAPI operator==(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) == 0; }
_AFX_INLINE bool AFXAPI operator!=(const CString& s1, const CString& s2)
{ return s1.Compare(s2) != 0; }
_AFX_INLINE bool AFXAPI operator!=(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) != 0; }
_AFX_INLINE bool AFXAPI operator!=(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) != 0; }
_AFX_INLINE bool AFXAPI operator<(const CString& s1, const CString& s2)
{ return s1.Compare(s2) < 0; }
_AFX_INLINE bool AFXAPI operator<(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) < 0; }
_AFX_INLINE bool AFXAPI operator<(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) > 0; }
_AFX_INLINE bool AFXAPI operator>(const CString& s1, const CString& s2)
{ return s1.Compare(s2) > 0; }
_AFX_INLINE bool AFXAPI operator>(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) > 0; }
_AFX_INLINE bool AFXAPI operator>(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) < 0; }
_AFX_INLINE bool AFXAPI operator<=(const CString& s1, const CString& s2)
{ return s1.Compare(s2) <= 0; }
_AFX_INLINE bool AFXAPI operator<=(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) <= 0; }
_AFX_INLINE bool AFXAPI operator<=(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) >= 0; }
_AFX_INLINE bool AFXAPI operator>=(const CString& s1, const CString& s2)
{ return s1.Compare(s2) >= 0; }
_AFX_INLINE bool AFXAPI operator>=(const CString& s1, LPCTSTR s2)
{ return s1.Compare(s2) >= 0; }
_AFX_INLINE bool AFXAPI operator>=(LPCTSTR s1, const CString& s2)
{ return s2.Compare(s1) <= 0; }
// CTime and CTimeSpan
#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
_AFX_INLINE CTimeSpan::CTimeSpan()
{ }
#endif
_AFX_INLINE CTimeSpan::CTimeSpan(time_t time)
{ m_timeSpan = time; }
_AFX_INLINE CTimeSpan::CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs)
{ m_timeSpan = nSecs + 60* (nMins + 60* (nHours + 24* lDays)); }
_AFX_INLINE CTimeSpan::CTimeSpan(const CTimeSpan& timeSpanSrc)
{ m_timeSpan = timeSpanSrc.m_timeSpan; }
_AFX_INLINE const CTimeSpan& CTimeSpan::operator=(const CTimeSpan& timeSpanSrc)
{ m_timeSpan = timeSpanSrc.m_timeSpan; return *this; }
_AFX_INLINE LONG CTimeSpan::GetDays() const
{ return m_timeSpan / (24*3600L); }
_AFX_INLINE LONG CTimeSpan::GetTotalHours() const
{ return m_timeSpan/3600; }
_AFX_INLINE int CTimeSpan::GetHours() const
{ return (int)(GetTotalHours() - GetDays()*24); }
_AFX_INLINE LONG CTimeSpan::GetTotalMinutes() const
{ return m_timeSpan/60; }
_AFX_INLINE int CTimeSpan::GetMinutes() const
{ return (int)(GetTotalMinutes() - GetTotalHours()*60); }
_AFX_INLINE LONG CTimeSpan::GetTotalSeconds() const
{ return m_timeSpan; }
_AFX_INLINE int CTimeSpan::GetSeconds() const
{ return (int)(GetTotalSeconds() - GetTotalMinutes()*60); }
_AFX_INLINE CTimeSpan CTimeSpan::operator-(CTimeSpan timeSpan) const
{ return CTimeSpan(m_timeSpan - timeSpan.m_timeSpan); }
_AFX_INLINE CTimeSpan CTimeSpan::operator+(CTimeSpan timeSpan) const
{ return CTimeSpan(m_timeSpan + timeSpan.m_timeSpan); }
_AFX_INLINE const CTimeSpan& CTimeSpan::operator+=(CTimeSpan timeSpan)
{ m_timeSpan += timeSpan.m_timeSpan; return *this; }
_AFX_INLINE const CTimeSpan& CTimeSpan::operator-=(CTimeSpan timeSpan)
{ m_timeSpan -= timeSpan.m_timeSpan; return *this; }
_AFX_INLINE BOOL CTimeSpan::operator==(CTimeSpan timeSpan) const
{ return m_timeSpan == timeSpan.m_timeSpan; }
_AFX_INLINE BOOL CTimeSpan::operator!=(CTimeSpan timeSpan) const
{ return m_timeSpan != timeSpan.m_timeSpan; }
_AFX_INLINE BOOL CTimeSpan::operator<(CTimeSpan timeSpan) const
{ return m_timeSpan < timeSpan.m_timeSpan; }
_AFX_INLINE BOOL CTimeSpan::operator>(CTimeSpan timeSpan) const
{ return m_timeSpan > timeSpan.m_timeSpan; }
_AFX_INLINE BOOL CTimeSpan::operator<=(CTimeSpan timeSpan) const
{ return m_timeSpan <= timeSpan.m_timeSpan; }
_AFX_INLINE BOOL CTimeSpan::operator>=(CTimeSpan timeSpan) const
{ return m_timeSpan >= timeSpan.m_timeSpan; }
#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
_AFX_INLINE CTime::CTime()
{ }
#endif
_AFX_INLINE CTime::CTime(time_t time)
{ m_time = time; }
#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
_AFX_INLINE CTime::CTime(const CTime& timeSrc)
{ m_time = timeSrc.m_time; }
#endif
_AFX_INLINE const CTime& CTime::operator=(const CTime& timeSrc)
{ m_time = timeSrc.m_time; return *this; }
_AFX_INLINE const CTime& CTime::operator=(time_t t)
{ m_time = t; return *this; }
_AFX_INLINE time_t CTime::GetTime() const
{ return m_time; }
_AFX_INLINE int CTime::GetYear() const
{ return (GetLocalTm(NULL)->tm_year) + 1900; }
_AFX_INLINE int CTime::GetMonth() const
{ return GetLocalTm(NULL)->tm_mon + 1; }
_AFX_INLINE int CTime::GetDay() const
{ return GetLocalTm(NULL)->tm_mday; }
_AFX_INLINE int CTime::GetHour() const
{ return GetLocalTm(NULL)->tm_hour; }
_AFX_INLINE int CTime::GetMinute() const
{ return GetLocalTm(NULL)->tm_min; }
_AFX_INLINE int CTime::GetSecond() const
{ return GetLocalTm(NULL)->tm_sec; }
_AFX_INLINE int CTime::GetDayOfWeek() const
{ return GetLocalTm(NULL)->tm_wday + 1; }
_AFX_INLINE CTimeSpan CTime::operator-(CTime time) const
{ return CTimeSpan(m_time - time.m_time); }
_AFX_INLINE CTime CTime::operator-(CTimeSpan timeSpan) const
{ return CTime(m_time - timeSpan.m_timeSpan); }
_AFX_INLINE CTime CTime::operator+(CTimeSpan timeSpan) const
{ return CTime(m_time + timeSpan.m_timeSpan); }
_AFX_INLINE const CTime& CTime::operator+=(CTimeSpan timeSpan)
{ m_time += timeSpan.m_timeSpan; return *this; }
_AFX_INLINE const CTime& CTime::operator-=(CTimeSpan timeSpan)
{ m_time -= timeSpan.m_timeSpan; return *this; }
_AFX_INLINE BOOL CTime::operator==(CTime time) const
{ return m_time == time.m_time; }
_AFX_INLINE BOOL CTime::operator!=(CTime time) const
{ return m_time != time.m_time; }
_AFX_INLINE BOOL CTime::operator<(CTime time) const
{ return m_time < time.m_time; }
_AFX_INLINE BOOL CTime::operator>(CTime time) const
{ return m_time > time.m_time; }
_AFX_INLINE BOOL CTime::operator<=(CTime time) const
{ return m_time <= time.m_time; }
_AFX_INLINE BOOL CTime::operator>=(CTime time) const
{ return m_time >= time.m_time; }
// CArchive
_AFX_INLINE BOOL CArchive::IsLoading() const
{ return (m_nMode & CArchive::load) != 0; }
_AFX_INLINE BOOL CArchive::IsStoring() const
{ return (m_nMode & CArchive::load) == 0; }
_AFX_INLINE BOOL CArchive::IsByteSwapping() const
{ return (m_nMode & CArchive::bNoByteSwap) == 0; }
_AFX_INLINE BOOL CArchive::IsBufferEmpty() const
{ return m_lpBufCur == m_lpBufMax; }
_AFX_INLINE CFile* CArchive::GetFile() const
{ return m_pFile; }
_AFX_INLINE void CArchive::SetObjectSchema(UINT nSchema)
{ m_nObjectSchema = nSchema; }
_AFX_INLINE void CArchive::SetStoreParams(UINT nHashSize, UINT nBlockSize)
{
ASSERT(IsStoring());
ASSERT(m_pStoreMap == NULL); // must be before first object written
m_nHashSize = nHashSize;
m_nGrowSize = nBlockSize;
}
_AFX_INLINE void CArchive::SetLoadParams(UINT nGrowBy)
{
ASSERT(IsLoading());
ASSERT(m_pLoadArray == NULL); // must be before first object read
m_nGrowSize = nGrowBy;
}
_AFX_INLINE CArchive& CArchive::operator<<(int i)
{ return CArchive::operator<<((LONG)i); }
_AFX_INLINE CArchive& CArchive::operator<<(unsigned u)
{ return CArchive::operator<<((LONG)u); }
_AFX_INLINE CArchive& CArchive::operator<<(short w)
{ return CArchive::operator<<((WORD)w); }
_AFX_INLINE CArchive& CArchive::operator<<(char ch)
{ return CArchive::operator<<((BYTE)ch); }
_AFX_INLINE CArchive& CArchive::operator<<(BYTE by)
{ if (m_lpBufCur + sizeof(BYTE) > m_lpBufMax) Flush();
*(UNALIGNED BYTE*)m_lpBufCur = by; m_lpBufCur += sizeof(BYTE); return *this; }
#ifndef _AFX_BYTESWAP
_AFX_INLINE CArchive& CArchive::operator<<(WORD w)
{ if (m_lpBufCur + sizeof(WORD) > m_lpBufMax) Flush();
*(UNALIGNED WORD*)m_lpBufCur = w; m_lpBufCur += sizeof(WORD); return *this; }
_AFX_INLINE CArchive& CArchive::operator<<(LONG l)
{ if (m_lpBufCur + sizeof(LONG) > m_lpBufMax) Flush();
*(UNALIGNED LONG*)m_lpBufCur = l; m_lpBufCur += sizeof(LONG); return *this; }
_AFX_INLINE CArchive& CArchive::operator<<(DWORD dw)
{ if (m_lpBufCur + sizeof(DWORD) > m_lpBufMax) Flush();
*(UNALIGNED DWORD*)m_lpBufCur = dw; m_lpBufCur += sizeof(DWORD); return *this; }
_AFX_INLINE CArchive& CArchive::operator<<(float f)
{ if (m_lpBufCur + sizeof(float) > m_lpBufMax) Flush();
*(UNALIGNED _AFX_FLOAT*)m_lpBufCur = *(_AFX_FLOAT*)&f; m_lpBufCur += sizeof(float); return *this;
}
_AFX_INLINE CArchive& CArchive::operator<<(double d)
{ if (m_lpBufCur + sizeof(double) > m_lpBufMax) Flush();
*(UNALIGNED _AFX_DOUBLE*)m_lpBufCur = *(_AFX_DOUBLE*)&d; m_lpBufCur += sizeof(double); return *this; }
#endif
_AFX_INLINE CArchive& CArchive::operator>>(int& i)
{ return CArchive::operator>>((LONG&)i); }
_AFX_INLINE CArchive& CArchive::operator>>(unsigned& u)
{ return CArchive::operator>>((LONG&)u); }
_AFX_INLINE CArchive& CArchive::operator>>(short& w)
{ return CArchive::operator>>((WORD&)w); }
_AFX_INLINE CArchive& CArchive::operator>>(char& ch)
{ return CArchive::operator>>((BYTE&)ch); }
_AFX_INLINE CArchive& CArchive::operator>>(BYTE& by)
{ if (m_lpBufCur + sizeof(BYTE) > m_lpBufMax)
FillBuffer(sizeof(BYTE) - (UINT)(m_lpBufMax - m_lpBufCur));
by = *(UNALIGNED BYTE*)m_lpBufCur; m_lpBufCur += sizeof(BYTE); return *this; }
#ifndef _AFX_BYTESWAP
_AFX_INLINE CArchive& CArchive::operator>>(WORD& w)
{ if (m_lpBufCur + sizeof(WORD) > m_lpBufMax)
FillBuffer(sizeof(WORD) - (UINT)(m_lpBufMax - m_lpBufCur));
w = *(UNALIGNED WORD*)m_lpBufCur; m_lpBufCur += sizeof(WORD); return *this; }
_AFX_INLINE CArchive& CArchive::operator>>(DWORD& dw)
{ if (m_lpBufCur + sizeof(DWORD) > m_lpBufMax)
FillBuffer(sizeof(DWORD) - (UINT)(m_lpBufMax - m_lpBufCur));
dw = *(UNALIGNED DWORD*)m_lpBufCur; m_lpBufCur += sizeof(DWORD); return *this; }
_AFX_INLINE CArchive& CArchive::operator>>(float& f)
{ if (m_lpBufCur + sizeof(float) > m_lpBufMax)
FillBuffer(sizeof(float) - (UINT)(m_lpBufMax - m_lpBufCur));
*(_AFX_FLOAT*)&f = *(UNALIGNED _AFX_FLOAT*)m_lpBufCur; m_lpBufCur += sizeof(float); return *this; }
_AFX_INLINE CArchive& CArchive::operator>>(double& d)
{ if (m_lpBufCur + sizeof(double) > m_lpBufMax)
FillBuffer(sizeof(double) - (UINT)(m_lpBufMax - m_lpBufCur));
*(_AFX_DOUBLE*)&d = *(UNALIGNED _AFX_DOUBLE*)m_lpBufCur; m_lpBufCur += sizeof(double); return *this; }
_AFX_INLINE CArchive& CArchive::operator>>(LONG& l)
{ if (m_lpBufCur + sizeof(LONG) > m_lpBufMax)
FillBuffer(sizeof(LONG) - (UINT)(m_lpBufMax - m_lpBufCur));
l = *(UNALIGNED LONG*)m_lpBufCur; m_lpBufCur += sizeof(LONG); return *this; }
#endif
_AFX_INLINE CArchive::CArchive(const CArchive& /* arSrc */)
{ }
_AFX_INLINE void CArchive::operator=(const CArchive& /* arSrc */)
{ }
_AFX_INLINE CArchive& AFXAPI operator<<(CArchive& ar, const CObject* pOb)
{ ar.WriteObject(pOb); return ar; }
_AFX_INLINE CArchive& AFXAPI operator>>(CArchive& ar, CObject*& pOb)
{ pOb = ar.ReadObject(NULL); return ar; }
_AFX_INLINE CArchive& AFXAPI operator>>(CArchive& ar, const CObject*& pOb)
{ pOb = ar.ReadObject(NULL); return ar; }
// CDumpContext
_AFX_INLINE int CDumpContext::GetDepth() const
{ return m_nDepth; }
_AFX_INLINE void CDumpContext::SetDepth(int nNewDepth)
{ m_nDepth = nNewDepth; }
_AFX_INLINE CDumpContext::CDumpContext(const CDumpContext& /* dcSrc */)
{ }
_AFX_INLINE void CDumpContext::operator=(const CDumpContext& /* dcSrc */)
{ }
/////////////////////////////////////////////////////////////////////////////
#endif //_AFX_INLINE
@@ -0,0 +1,181 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Note: This header file contains useful classes that are documented only
// in the MFC Technical Notes. These classes may change from version to
// version, so be prepared to change your code accordingly if you utilize
// this header. In the future, commonly used portions of this header
// may be moved and officially documented.
#ifndef __AFXADV_H__
#define __AFXADV_H__
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXADV - MFC Advanced Classes
// Classes declared in this file
//CObject
//CFile
//CMemFile
class CSharedFile; // Shared memory file
class CRecentFileList; // used in CWinApp for MRU list
class CDockState; // state of docking toolbars
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// Shared file support
class CSharedFile : public CMemFile
{
DECLARE_DYNAMIC(CSharedFile)
public:
// Constructors
CSharedFile(UINT nAllocFlags = GMEM_DDESHARE|GMEM_MOVEABLE,
UINT nGrowBytes = 4096);
// Attributes
HGLOBAL Detach();
void SetHandle(HGLOBAL hGlobalMemory, BOOL bAllowGrow = TRUE);
// Implementation
public:
virtual ~CSharedFile();
protected:
virtual BYTE* Alloc(DWORD nBytes);
virtual BYTE* Realloc(BYTE* lpMem, DWORD nBytes);
virtual void Free(BYTE* lpMem);
UINT m_nAllocFlags;
HGLOBAL m_hGlobalMemory;
BOOL m_bAllowGrow;
};
/////////////////////////////////////////////////////////////////////////////
// CRecentFileList
#define AFX_ABBREV_FILENAME_LEN 30
class CRecentFileList
{
// Constructors
public:
CRecentFileList(UINT nStart, LPCTSTR lpszSection,
LPCTSTR lpszEntryFormat, int nSize,
int nMaxDispLen = AFX_ABBREV_FILENAME_LEN);
// Attributes
int GetSize() const;
CString& operator[](int nIndex);
// Operations
virtual void Remove(int nIndex);
virtual void Add(LPCTSTR lpszPathName);
BOOL GetDisplayName(CString& strName, int nIndex,
LPCTSTR lpszCurDir, int nCurDir, BOOL bAtLeastName = TRUE) const;
virtual void UpdateMenu(CCmdUI* pCmdUI);
virtual void ReadList(); // reads from registry or ini file
virtual void WriteList(); // writes to registry or ini file
// Implementation
virtual ~CRecentFileList();
int m_nSize; // contents of the MRU list
CString* m_arrNames;
CString m_strSectionName; // for saving
CString m_strEntryFormat;
UINT m_nStart; // for displaying
int m_nMaxDisplayLength;
CString m_strOriginal; // original menu item contents
};
AFX_INLINE int CRecentFileList::GetSize() const
{ return m_nSize; }
AFX_INLINE CString& CRecentFileList::operator[](int nIndex)
{ ASSERT(nIndex < m_nSize); return m_arrNames[nIndex]; }
/////////////////////////////////////////////////////////////////////////////
// CDockState - used for docking serialization
class CDockState : public CObject
{
DECLARE_SERIAL(CDockState)
CDockState();
public:
// Attributes
CPtrArray m_arrBarInfo;
public:
// Operations
void LoadState(LPCTSTR lpszProfileName);
void SaveState(LPCTSTR lpszProfileName);
void Clear(); //deletes all the barinfo's
DWORD GetVersion();
// Implementation
protected:
BOOL m_bScaling;
CRect m_rectDevice;
CRect m_rectClip;
CSize m_sizeLogical;
DWORD m_dwVersion;
public:
~CDockState();
virtual void Serialize(CArchive& ar);
// scaling implementation
void ScalePoint(CPoint& pt);
void ScaleRectPos(CRect& rect);
CSize GetScreenSize();
void SetScreenSize(CSize& size);
};
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXADV_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,9 @@
// MFC build numbers (XXXX)
#define _MFC_BUILD 8665
#define _MFC_USER_BUILD "8665"
#ifndef _MFC_RBLD
#define _MFC_RBLD 0
#define _MFC_USER_RBLD "0"
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,703 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXCMN.H
#ifdef _AFXCMN_INLINE
_AFXCMN_INLINE CDragListBox::CDragListBox()
{ m_nLast = -1;}
_AFXCMN_INLINE int CDragListBox::ItemFromPt(CPoint pt, BOOL bAutoScroll) const
{ASSERT(::IsWindow(m_hWnd)); return ::LBItemFromPt(m_hWnd, pt, bAutoScroll); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CToolBarCtrl::CToolBarCtrl()
{ }
_AFXCMN_INLINE BOOL CToolBarCtrl::EnableButton(int nID, BOOL bEnable)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ENABLEBUTTON, nID, MAKELPARAM(bEnable, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::CheckButton(int nID, BOOL bCheck)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_CHECKBUTTON, nID, MAKELPARAM(bCheck, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::PressButton(int nID, BOOL bPress)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_PRESSBUTTON, nID, MAKELPARAM(bPress, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::HideButton(int nID, BOOL bHide)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_HIDEBUTTON, nID, MAKELPARAM(bHide, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::Indeterminate(int nID, BOOL bIndeterminate)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INDETERMINATE, nID, MAKELPARAM(bIndeterminate, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonEnabled(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONENABLED, nID, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonChecked(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONCHECKED, nID, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonPressed(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONPRESSED, nID, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonHidden(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONHIDDEN, nID, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonIndeterminate(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONINDETERMINATE, nID, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetState(int nID, UINT nState)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETSTATE, nID, MAKELPARAM(nState, 0)); }
_AFXCMN_INLINE int CToolBarCtrl::GetState(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETSTATE, nID, 0L); }
_AFXCMN_INLINE BOOL CToolBarCtrl::AddButtons(int nNumButtons, LPTBBUTTON lpButtons)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ADDBUTTONS, nNumButtons, (LPARAM)lpButtons); }
_AFXCMN_INLINE BOOL CToolBarCtrl::InsertButton(int nIndex, LPTBBUTTON lpButton)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INSERTBUTTON, nIndex, (LPARAM)lpButton); }
_AFXCMN_INLINE BOOL CToolBarCtrl::DeleteButton(int nIndex)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_DELETEBUTTON, nIndex, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetButton(int nIndex, LPTBBUTTON lpButton) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETBUTTON, nIndex, (LPARAM)lpButton); }
_AFXCMN_INLINE int CToolBarCtrl::GetButtonCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_BUTTONCOUNT, 0, 0L); }
_AFXCMN_INLINE UINT CToolBarCtrl::CommandToIndex(UINT nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, TB_COMMANDTOINDEX, nID, 0L); }
_AFXCMN_INLINE void CToolBarCtrl::Customize()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_CUSTOMIZE, 0, 0L); }
// lpszStrings are separated by zeroes, last one is marked by two zeroes
_AFXCMN_INLINE int CToolBarCtrl::AddStrings(LPCTSTR lpszStrings)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_ADDSTRING, 0, (LPARAM)lpszStrings); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetItemRect(int nIndex, LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETITEMRECT, nIndex, (LPARAM)lpRect); }
_AFXCMN_INLINE void CToolBarCtrl::SetButtonStructSize(int nSize)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_BUTTONSTRUCTSIZE, nSize, 0L); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetButtonSize(CSize size)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONSIZE, 0, MAKELPARAM(size.cx, size.cy)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetBitmapSize(CSize size)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBITMAPSIZE, 0, MAKELPARAM(size.cx, size.cy)); }
_AFXCMN_INLINE void CToolBarCtrl::AutoSize()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_AUTOSIZE, 0, 0L); }
_AFXCMN_INLINE CToolTipCtrl* CToolBarCtrl::GetToolTips() const
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TB_GETTOOLTIPS, 0, 0L)); }
_AFXCMN_INLINE void CToolBarCtrl::SetToolTips(CToolTipCtrl* pTip)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETTOOLTIPS, (WPARAM)pTip->GetSafeHwnd(), 0L); }
_AFXCMN_INLINE void CToolBarCtrl::SetOwner(CWnd* pWnd)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETPARENT, (WPARAM)pWnd->GetSafeHwnd(), 0L); }
_AFXCMN_INLINE void CToolBarCtrl::SetRows(int nRows, BOOL bLarger, LPRECT lpRect)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETROWS, MAKELPARAM(nRows, bLarger), (LPARAM)lpRect); }
_AFXCMN_INLINE int CToolBarCtrl::GetRows() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETROWS, 0, 0L); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetCmdID(int nIndex, UINT nID)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETCMDID, nIndex, nID); }
_AFXCMN_INLINE UINT CToolBarCtrl::GetBitmapFlags() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, TB_GETBITMAPFLAGS, 0, 0L); }
_AFXCMN_INLINE int CToolBarCtrl::HitTest(LPPOINT ppt) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_HITTEST, 0, (LPARAM)ppt); }
_AFXCMN_INLINE DWORD CToolBarCtrl::GetExtendedStyle() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETEXTENDEDSTYLE, 0, 0L); }
_AFXCMN_INLINE DWORD CToolBarCtrl::SetExtendedStyle(DWORD dwExStyle)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETEXTENDEDSTYLE, 0, dwExStyle); }
_AFXCMN_INLINE COLORREF CToolBarCtrl::GetInsertMarkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_GETINSERTMARKCOLOR, 0, 0); }
_AFXCMN_INLINE COLORREF CToolBarCtrl::SetInsertMarkColor(COLORREF clrNew)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TB_SETINSERTMARKCOLOR, 0, (LPARAM) clrNew); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CStatusBarCtrl::CStatusBarCtrl()
{ }
_AFXCMN_INLINE BOOL CStatusBarCtrl::SetText(LPCTSTR lpszText, int nPane, int nType)
{ ASSERT(::IsWindow(m_hWnd)); ASSERT(nPane < 256); return (BOOL) ::SendMessage(m_hWnd, SB_SETTEXT, (nPane|nType), (LPARAM)lpszText); }
_AFXCMN_INLINE BOOL CStatusBarCtrl::SetParts(int nParts, int* pWidths)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_SETPARTS, nParts, (LPARAM)pWidths); }
_AFXCMN_INLINE int CStatusBarCtrl::GetParts(int nParts, int* pParts) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, SB_GETPARTS, nParts, (LPARAM)pParts); }
_AFXCMN_INLINE BOOL CStatusBarCtrl::GetBorders(int* pBorders) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_GETBORDERS, 0, (LPARAM)pBorders); }
_AFXCMN_INLINE void CStatusBarCtrl::SetMinHeight(int nMin)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, SB_SETMINHEIGHT, nMin, 0L); }
_AFXCMN_INLINE BOOL CStatusBarCtrl::SetSimple(BOOL bSimple)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_SIMPLE, bSimple, 0L); }
_AFXCMN_INLINE BOOL CStatusBarCtrl::GetRect(int nPane, LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_GETRECT, nPane, (LPARAM)lpRect); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CListCtrl::CListCtrl()
{ }
_AFXCMN_INLINE COLORREF CListCtrl::GetBkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, LVM_GETBKCOLOR, 0, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::SetBkColor(COLORREF cr)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETBKCOLOR, 0, cr); }
_AFXCMN_INLINE CImageList* CListCtrl::GetImageList(int nImageListType) const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, LVM_GETIMAGELIST, nImageListType, 0L)); }
_AFXCMN_INLINE CImageList* CListCtrl::SetImageList(CImageList* pImageList, int nImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, LVM_SETIMAGELIST, nImageList, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE int CListCtrl::GetItemCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETITEMCOUNT, 0, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::GetItem(LVITEM* pItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETITEM, 0, (LPARAM)pItem); }
_AFXCMN_INLINE BOOL CListCtrl::SetItem(const LVITEM* pItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETITEM, 0, (LPARAM)pItem); }
_AFXCMN_INLINE BOOL CListCtrl::SetItemData(int nItem, DWORD dwData)
{ ASSERT(::IsWindow(m_hWnd)); return SetItem(nItem, 0, LVIF_PARAM, NULL, 0, 0, 0, (LPARAM)dwData); }
_AFXCMN_INLINE int CListCtrl::InsertItem(const LVITEM* pItem)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_INSERTITEM, 0, (LPARAM)pItem); }
_AFXCMN_INLINE int CListCtrl::InsertItem(int nItem, LPCTSTR lpszItem)
{ ASSERT(::IsWindow(m_hWnd)); return InsertItem(LVIF_TEXT, nItem, lpszItem, 0, 0, 0, 0); }
_AFXCMN_INLINE int CListCtrl::InsertItem(int nItem, LPCTSTR lpszItem, int nImage)
{ ASSERT(::IsWindow(m_hWnd)); return InsertItem(LVIF_TEXT|LVIF_IMAGE, nItem, lpszItem, 0, 0, nImage, 0); }
_AFXCMN_INLINE BOOL CListCtrl::DeleteItem(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_DELETEITEM, nItem, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::DeleteAllItems()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_DELETEALLITEMS, 0, 0L); }
_AFXCMN_INLINE UINT CListCtrl::GetCallbackMask() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, LVM_GETCALLBACKMASK, 0, 0); }
_AFXCMN_INLINE BOOL CListCtrl::SetCallbackMask(UINT nMask)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETCALLBACKMASK, nMask, 0); }
_AFXCMN_INLINE int CListCtrl::GetNextItem(int nItem, int nFlags) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETNEXTITEM, nItem, MAKELPARAM(nFlags, 0)); }
_AFXCMN_INLINE POSITION CListCtrl::GetFirstSelectedItemPosition() const
{ ASSERT(::IsWindow(m_hWnd)); return (POSITION) (1+GetNextItem(-1, LVIS_SELECTED)); }
_AFXCMN_INLINE int CListCtrl::GetNextSelectedItem(POSITION& pos) const
{ ASSERT(::IsWindow(m_hWnd)); int nOldPos = (int)pos-1; pos = (POSITION) (1+GetNextItem(nOldPos, LVIS_SELECTED)); return nOldPos; }
_AFXCMN_INLINE int CListCtrl::FindItem(LVFINDINFO* pFindInfo, int nStart) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_FINDITEM, nStart, (LPARAM)pFindInfo); }
_AFXCMN_INLINE int CListCtrl::HitTest(LVHITTESTINFO* pHitTestInfo) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_HITTEST, 0, (LPARAM)pHitTestInfo); }
_AFXCMN_INLINE BOOL CListCtrl::SetItemPosition(int nItem, POINT pt)
{ ASSERT(::IsWindow(m_hWnd)); ASSERT((GetStyle() & LVS_OWNERDATA)==0); return (BOOL) ::SendMessage(m_hWnd, LVM_SETITEMPOSITION32, nItem, (LPARAM)&pt); }
_AFXCMN_INLINE BOOL CListCtrl::GetItemPosition(int nItem, LPPOINT lpPoint) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETITEMPOSITION, nItem, (LPARAM)lpPoint); }
_AFXCMN_INLINE int CListCtrl::GetStringWidth(LPCTSTR lpsz) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETSTRINGWIDTH, 0, (LPARAM)lpsz); }
_AFXCMN_INLINE BOOL CListCtrl::EnsureVisible(int nItem, BOOL bPartialOK)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_ENSUREVISIBLE, nItem, MAKELPARAM(bPartialOK, 0)); }
_AFXCMN_INLINE BOOL CListCtrl::Scroll(CSize size)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SCROLL, size.cx, size.cy); }
_AFXCMN_INLINE BOOL CListCtrl::RedrawItems(int nFirst, int nLast)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_REDRAWITEMS, nFirst, nLast); }
_AFXCMN_INLINE BOOL CListCtrl::Arrange(UINT nCode)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_ARRANGE, nCode, 0L); }
_AFXCMN_INLINE CEdit* CListCtrl::EditLabel(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); return (CEdit*)CWnd::FromHandle( (HWND)::SendMessage(m_hWnd, LVM_EDITLABEL, nItem, 0L)); }
_AFXCMN_INLINE CEdit* CListCtrl::GetEditControl() const
{ ASSERT(::IsWindow(m_hWnd)); return (CEdit*)CWnd::FromHandle( (HWND)::SendMessage(m_hWnd, LVM_GETEDITCONTROL, 0, 0L)); }
_AFXCMN_INLINE BOOL CListCtrl::GetColumn(int nCol, LVCOLUMN* pColumn) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETCOLUMN, nCol, (LPARAM)pColumn); }
_AFXCMN_INLINE BOOL CListCtrl::SetColumn(int nCol, const LVCOLUMN* pColumn)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETCOLUMN, nCol, (LPARAM)pColumn); }
_AFXCMN_INLINE int CListCtrl::InsertColumn(int nCol, const LVCOLUMN* pColumn)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_INSERTCOLUMN, nCol, (LPARAM)pColumn); }
_AFXCMN_INLINE BOOL CListCtrl::DeleteColumn(int nCol)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_DELETECOLUMN, nCol, 0); }
_AFXCMN_INLINE int CListCtrl::GetColumnWidth(int nCol) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETCOLUMNWIDTH, nCol, 0); }
_AFXCMN_INLINE BOOL CListCtrl::SetColumnWidth(int nCol, int cx)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETCOLUMNWIDTH, nCol, MAKELPARAM(cx, 0)); }
_AFXCMN_INLINE BOOL CListCtrl::GetViewRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETVIEWRECT, 0, (LPARAM)lpRect); }
_AFXCMN_INLINE COLORREF CListCtrl::GetTextColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, LVM_GETTEXTCOLOR, 0, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::SetTextColor(COLORREF cr)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETTEXTCOLOR, 0, cr); }
_AFXCMN_INLINE COLORREF CListCtrl::GetTextBkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, LVM_GETTEXTBKCOLOR, 0, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::SetTextBkColor(COLORREF cr)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETTEXTBKCOLOR, 0, cr); }
_AFXCMN_INLINE int CListCtrl::GetTopIndex() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETTOPINDEX, 0, 0); }
_AFXCMN_INLINE int CListCtrl::GetCountPerPage() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETCOUNTPERPAGE, 0, 0); }
_AFXCMN_INLINE BOOL CListCtrl::GetOrigin(LPPOINT lpPoint) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETORIGIN, 0, (LPARAM)lpPoint); }
_AFXCMN_INLINE BOOL CListCtrl::Update(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_UPDATE, nItem, 0L); }
_AFXCMN_INLINE BOOL CListCtrl::SetItemState(int nItem, LVITEM* pItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETITEMSTATE, nItem, (LPARAM)pItem); }
_AFXCMN_INLINE UINT CListCtrl::GetItemState(int nItem, UINT nMask) const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, LVM_GETITEMSTATE, nItem, nMask); }
_AFXCMN_INLINE void CListCtrl::SetItemCount(int nItems)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LVM_SETITEMCOUNT, nItems, 0); }
_AFXCMN_INLINE BOOL CListCtrl::SortItems(PFNLVCOMPARE pfnCompare, DWORD dwData)
{ ASSERT(::IsWindow(m_hWnd)); ASSERT((GetStyle() & LVS_OWNERDATA)==0); return (BOOL) ::SendMessage(m_hWnd, LVM_SORTITEMS, dwData, (LPARAM)pfnCompare); }
_AFXCMN_INLINE UINT CListCtrl::GetSelectedCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, LVM_GETSELECTEDCOUNT, 0, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CTreeCtrl::CTreeCtrl()
{ }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::InsertItem(LPTVINSERTSTRUCT lpInsertStruct)
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_INSERTITEM, 0, (LPARAM)lpInsertStruct); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::InsertItem(LPCTSTR lpszItem, int nImage,
int nSelectedImage, HTREEITEM hParent, HTREEITEM hInsertAfter)
{ ASSERT(::IsWindow(m_hWnd)); return InsertItem(TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE, lpszItem, nImage, nSelectedImage, 0, 0, 0, hParent, hInsertAfter); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::InsertItem(LPCTSTR lpszItem, HTREEITEM hParent, HTREEITEM hInsertAfter)
{ ASSERT(::IsWindow(m_hWnd)); return InsertItem(TVIF_TEXT, lpszItem, 0, 0, 0, 0, 0, hParent, hInsertAfter); }
_AFXCMN_INLINE BOOL CTreeCtrl::DeleteItem(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_DELETEITEM, 0, (LPARAM)hItem); }
#pragma warning(disable: 4310)
_AFXCMN_INLINE BOOL CTreeCtrl::DeleteAllItems()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT); }
#pragma warning(default: 4310)
_AFXCMN_INLINE BOOL CTreeCtrl::Expand(HTREEITEM hItem, UINT nCode)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_EXPAND, nCode, (LPARAM)hItem); }
_AFXCMN_INLINE UINT CTreeCtrl::GetCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, TVM_GETCOUNT, 0, 0); }
_AFXCMN_INLINE UINT CTreeCtrl::GetIndent() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, TVM_GETINDENT, 0, 0); }
_AFXCMN_INLINE void CTreeCtrl::SetIndent(UINT nIndent)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TVM_SETINDENT, nIndent, 0); }
_AFXCMN_INLINE CImageList* CTreeCtrl::GetImageList(UINT nImageList) const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST)::SendMessage(m_hWnd, TVM_GETIMAGELIST, (UINT)nImageList, 0)); }
_AFXCMN_INLINE CImageList* CTreeCtrl::SetImageList(CImageList* pImageList, int nImageListType)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST)::SendMessage(m_hWnd, TVM_SETIMAGELIST, (UINT)nImageListType, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetNextItem(HTREEITEM hItem, UINT nCode) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, nCode, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetChildItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetNextSiblingItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetPrevSiblingItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_PREVIOUS, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetParentItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetFirstVisibleItem() const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_FIRSTVISIBLE, 0); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetNextVisibleItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetPrevVisibleItem(HTREEITEM hItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_PREVIOUSVISIBLE, (LPARAM)hItem); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetSelectedItem() const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_CARET, 0); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetDropHilightItem() const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_DROPHILITE, 0); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::GetRootItem() const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_ROOT, 0); }
_AFXCMN_INLINE BOOL CTreeCtrl::Select(HTREEITEM hItem, UINT nCode)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_SELECTITEM, nCode, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SelectItem(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SelectDropTarget(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TVM_SELECTITEM, TVGN_DROPHILITE, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SelectSetFirstVisible(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TVM_SELECTITEM, TVGN_FIRSTVISIBLE, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::GetItem(TVITEM* pItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_GETITEM, 0, (LPARAM)pItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetItem(TVITEM* pItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_SETITEM, 0, (LPARAM)pItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetItemText(HTREEITEM hItem, LPCTSTR lpszItem)
{ ASSERT(::IsWindow(m_hWnd)); return SetItem(hItem, TVIF_TEXT, lpszItem, 0, 0, 0, 0, NULL); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetItemImage(HTREEITEM hItem, int nImage, int nSelectedImage)
{ ASSERT(::IsWindow(m_hWnd)); return SetItem(hItem, TVIF_IMAGE|TVIF_SELECTEDIMAGE, NULL, nImage, nSelectedImage, 0, 0, NULL); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetItemState(HTREEITEM hItem, UINT nState, UINT nStateMask)
{ ASSERT(::IsWindow(m_hWnd)); return SetItem(hItem, TVIF_STATE, NULL, 0, 0, nState, nStateMask, NULL); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetItemData(HTREEITEM hItem, DWORD dwData)
{ ASSERT(::IsWindow(m_hWnd)); return SetItem(hItem, TVIF_PARAM, NULL, 0, 0, 0, 0, (LPARAM)dwData); }
_AFXCMN_INLINE CEdit* CTreeCtrl::EditLabel(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (CEdit*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TVM_EDITLABEL, 0, (LPARAM)hItem)); }
_AFXCMN_INLINE HTREEITEM CTreeCtrl::HitTest(TVHITTESTINFO* pHitTestInfo) const
{ ASSERT(::IsWindow(m_hWnd)); return (HTREEITEM)::SendMessage(m_hWnd, TVM_HITTEST, 0, (LPARAM)pHitTestInfo); }
_AFXCMN_INLINE CEdit* CTreeCtrl::GetEditControl() const
{ ASSERT(::IsWindow(m_hWnd)); return (CEdit*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TVM_GETEDITCONTROL, 0, 0)); }
_AFXCMN_INLINE UINT CTreeCtrl::GetVisibleCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, TVM_GETVISIBLECOUNT, 0, 0); }
_AFXCMN_INLINE BOOL CTreeCtrl::SortChildren(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_SORTCHILDREN, 0, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::EnsureVisible(HTREEITEM hItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_ENSUREVISIBLE, 0, (LPARAM)hItem); }
_AFXCMN_INLINE BOOL CTreeCtrl::SortChildrenCB(LPTVSORTCB pSort)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TVM_SORTCHILDRENCB, 0, (LPARAM)pSort); }
_AFXCMN_INLINE CToolTipCtrl* CTreeCtrl::GetToolTips() const
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TVM_GETTOOLTIPS, 0, 0L)); }
_AFXCMN_INLINE CToolTipCtrl* CTreeCtrl::SetToolTips(CToolTipCtrl* pWndTip)
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TVM_SETTOOLTIPS, (WPARAM)pWndTip->GetSafeHwnd(), 0L)); }
_AFXCMN_INLINE COLORREF CTreeCtrl::GetBkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_GETBKCOLOR, 0, 0L); }
_AFXCMN_INLINE COLORREF CTreeCtrl::SetBkColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_SETBKCOLOR, 0, (LPARAM)clr); }
_AFXCMN_INLINE SHORT CTreeCtrl::GetItemHeight() const
{ ASSERT(::IsWindow(m_hWnd)); return (SHORT) ::SendMessage(m_hWnd, TVM_GETITEMHEIGHT, 0, 0L); }
_AFXCMN_INLINE SHORT CTreeCtrl::SetItemHeight(SHORT cyHeight)
{ ASSERT(::IsWindow(m_hWnd)); return (SHORT) ::SendMessage(m_hWnd, TVM_SETITEMHEIGHT, cyHeight, 0L); }
_AFXCMN_INLINE COLORREF CTreeCtrl::GetTextColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_GETTEXTCOLOR, 0, 0L); }
_AFXCMN_INLINE COLORREF CTreeCtrl::SetTextColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_SETTEXTCOLOR, 0, (LPARAM)clr); }
_AFXCMN_INLINE BOOL CTreeCtrl::SetInsertMark(HTREEITEM hItem, BOOL fAfter)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TVM_SETINSERTMARK, fAfter, (LPARAM)hItem); }
_AFXCMN_INLINE COLORREF CTreeCtrl::GetInsertMarkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_GETINSERTMARKCOLOR, 0, 0L); }
_AFXCMN_INLINE COLORREF CTreeCtrl::SetInsertMarkColor(COLORREF clrNew)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clrNew); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CHotKeyCtrl::CHotKeyCtrl()
{ }
_AFXCMN_INLINE void CHotKeyCtrl::SetHotKey(WORD wVirtualKeyCode, WORD wModifiers)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, HKM_SETHOTKEY, MAKEWORD(wVirtualKeyCode, wModifiers), 0L); }
_AFXCMN_INLINE DWORD CHotKeyCtrl::GetHotKey() const
{ ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, HKM_GETHOTKEY, 0, 0L); }
_AFXCMN_INLINE void CHotKeyCtrl::SetRules(WORD wInvalidComb, WORD wModifiers)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, HKM_SETRULES, wInvalidComb, MAKELPARAM(wModifiers, 0)); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE void CToolTipCtrl::Activate(BOOL bActivate)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_ACTIVATE, bActivate, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::SetToolInfo(LPTOOLINFO lpToolInfo)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETTOOLINFO, 0, (LPARAM)lpToolInfo); }
_AFXCMN_INLINE void CToolTipCtrl::RelayEvent(LPMSG lpMsg)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_RELAYEVENT, 0, (LPARAM)lpMsg); }
_AFXCMN_INLINE int CToolTipCtrl::GetToolCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_GETTOOLCOUNT, 0, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CSpinButtonCtrl::CSpinButtonCtrl()
{ }
_AFXCMN_INLINE UINT CSpinButtonCtrl::GetAccel(int nAccel, UDACCEL* pAccel) const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) LOWORD(::SendMessage(m_hWnd, UDM_GETACCEL, nAccel, (LPARAM)pAccel)); }
_AFXCMN_INLINE UINT CSpinButtonCtrl::GetBase() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) LOWORD(::SendMessage(m_hWnd, UDM_GETBASE, 0, 0l)); }
_AFXCMN_INLINE CWnd* CSpinButtonCtrl::GetBuddy() const
{ ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, UDM_GETBUDDY, 0, 0l)); }
_AFXCMN_INLINE int CSpinButtonCtrl::GetPos() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) (::SendMessage(m_hWnd, UDM_GETPOS, 0, 0l)); }
_AFXCMN_INLINE DWORD CSpinButtonCtrl::GetRange() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, UDM_GETRANGE, 0, 0l); }
_AFXCMN_INLINE BOOL CSpinButtonCtrl::SetAccel(int nAccel, UDACCEL* pAccel)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) LOWORD(::SendMessage(m_hWnd, UDM_SETACCEL, nAccel, (LPARAM)pAccel)); }
_AFXCMN_INLINE int CSpinButtonCtrl::SetBase(int nBase)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, UDM_SETBASE, nBase, 0L); }
_AFXCMN_INLINE CWnd* CSpinButtonCtrl::SetBuddy(CWnd* pWndBuddy)
{ ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, UDM_SETBUDDY, (WPARAM)pWndBuddy->GetSafeHwnd(), 0L)); }
_AFXCMN_INLINE int CSpinButtonCtrl::SetPos(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); return (int) (short) LOWORD(::SendMessage(m_hWnd, UDM_SETPOS, 0, MAKELPARAM(nPos, 0))); }
_AFXCMN_INLINE void CSpinButtonCtrl::SetRange(int nLower, int nUpper)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, UDM_SETRANGE, 0, MAKELPARAM(nUpper, nLower)); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CSliderCtrl::CSliderCtrl()
{ }
_AFXCMN_INLINE int CSliderCtrl::GetLineSize() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETLINESIZE, 0, 0l); }
_AFXCMN_INLINE int CSliderCtrl::SetLineSize(int nSize)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_SETLINESIZE, 0, nSize); }
_AFXCMN_INLINE int CSliderCtrl::GetPageSize() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETPAGESIZE, 0, 0l); }
_AFXCMN_INLINE int CSliderCtrl::SetPageSize(int nSize)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_SETPAGESIZE, 0, nSize); }
_AFXCMN_INLINE int CSliderCtrl::GetRangeMax() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETRANGEMAX, 0, 0l); }
_AFXCMN_INLINE int CSliderCtrl::GetRangeMin() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETRANGEMIN, 0, 0l); }
_AFXCMN_INLINE void CSliderCtrl::SetRangeMin(int nMin, BOOL bRedraw)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETRANGEMIN, bRedraw, nMin); }
_AFXCMN_INLINE void CSliderCtrl::SetRangeMax(int nMax, BOOL bRedraw)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETRANGEMAX, bRedraw, nMax); }
_AFXCMN_INLINE void CSliderCtrl::ClearSel(BOOL bRedraw)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_CLEARSEL, bRedraw, 0l); }
_AFXCMN_INLINE void CSliderCtrl::GetChannelRect(LPRECT lprc) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_GETCHANNELRECT, 0, (LPARAM)lprc); }
_AFXCMN_INLINE void CSliderCtrl::GetThumbRect(LPRECT lprc) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_GETTHUMBRECT, 0, (LPARAM)lprc); }
_AFXCMN_INLINE int CSliderCtrl::GetPos() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETPOS, 0, 0l); }
_AFXCMN_INLINE void CSliderCtrl::SetPos(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETPOS, TRUE, nPos); }
_AFXCMN_INLINE void CSliderCtrl::VerifyPos()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETPOS, FALSE, 0L); }
_AFXCMN_INLINE void CSliderCtrl::ClearTics(BOOL bRedraw)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_CLEARTICS, bRedraw, 0l); }
_AFXCMN_INLINE UINT CSliderCtrl::GetNumTics() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, TBM_GETNUMTICS, 0, 0l); }
_AFXCMN_INLINE DWORD* CSliderCtrl::GetTicArray() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD*) ::SendMessage(m_hWnd, TBM_GETPTICS, 0, 0l); }
_AFXCMN_INLINE int CSliderCtrl::GetTic(int nTic) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETTIC, nTic, 0L); }
_AFXCMN_INLINE int CSliderCtrl::GetTicPos(int nTic) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TBM_GETTICPOS, nTic, 0L); }
_AFXCMN_INLINE BOOL CSliderCtrl::SetTic(int nTic)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TBM_SETTIC, 0, nTic); }
_AFXCMN_INLINE void CSliderCtrl::SetTicFreq(int nFreq)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETTICFREQ, nFreq, 0L); }
_AFXCMN_INLINE CWnd* CSliderCtrl::GetBuddy(BOOL fLocation) const
{ ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, TBM_GETBUDDY, fLocation, 0l)); }
_AFXCMN_INLINE CWnd* CSliderCtrl::SetBuddy(CWnd* pWndBuddy, BOOL fLocation)
{ ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, TBM_SETBUDDY, fLocation, (LPARAM)pWndBuddy->GetSafeHwnd())); }
_AFXCMN_INLINE CToolTipCtrl* CSliderCtrl::GetToolTips() const
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TBM_GETTOOLTIPS, 0, 0L)); }
_AFXCMN_INLINE void CSliderCtrl::SetToolTips(CToolTipCtrl* pTip)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETTOOLTIPS, (WPARAM)pTip->GetSafeHwnd(), 0L); }
_AFXCMN_INLINE int CSliderCtrl::SetTipSide(int nLocation)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TBM_SETTIPSIDE, nLocation, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CProgressCtrl::CProgressCtrl()
{ }
_AFXCMN_INLINE void CProgressCtrl::SetRange(short nLower, short nUpper)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, PBM_SETRANGE, 0, MAKELPARAM(nLower, nUpper)); }
_AFXCMN_INLINE void CProgressCtrl::SetRange32(int nLower, int nUpper)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, PBM_SETRANGE32, (WPARAM) nLower, (LPARAM) nUpper); }
_AFXCMN_INLINE int CProgressCtrl::GetPos()
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_GETPOS, 0, 0); }
_AFXCMN_INLINE int CProgressCtrl::OffsetPos(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_DELTAPOS, nPos, 0L); }
_AFXCMN_INLINE int CProgressCtrl::SetStep(int nStep)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_SETSTEP, nStep, 0L); }
_AFXCMN_INLINE int CProgressCtrl::StepIt()
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_STEPIT, 0, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CHeaderCtrl::CHeaderCtrl()
{ }
_AFXCMN_INLINE int CHeaderCtrl::GetItemCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, HDM_GETITEMCOUNT, 0, 0L); }
_AFXCMN_INLINE int CHeaderCtrl::InsertItem(int nPos, HDITEM* phdi)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_INSERTITEM, nPos, (LPARAM)phdi); }
_AFXCMN_INLINE BOOL CHeaderCtrl::DeleteItem(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, HDM_DELETEITEM, nPos, 0L); }
_AFXCMN_INLINE BOOL CHeaderCtrl::GetItem(int nPos, HDITEM* pHeaderItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, HDM_GETITEM, nPos, (LPARAM)pHeaderItem); }
_AFXCMN_INLINE BOOL CHeaderCtrl::SetItem(int nPos, HDITEM* pHeaderItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, HDM_SETITEM, nPos, (LPARAM)pHeaderItem); }
_AFXCMN_INLINE BOOL CHeaderCtrl::Layout(HDLAYOUT* pHeaderLayout)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, HDM_LAYOUT, 0, (LPARAM)pHeaderLayout); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CImageList::operator HIMAGELIST() const
{ return m_hImageList;}
_AFXCMN_INLINE HIMAGELIST CImageList::GetSafeHandle() const
{ return (this == NULL) ? NULL : m_hImageList; }
_AFXCMN_INLINE int CImageList::GetImageCount() const
{ ASSERT(m_hImageList != NULL); return ImageList_GetImageCount(m_hImageList); }
_AFXCMN_INLINE int CImageList::Add(CBitmap* pbmImage, CBitmap* pbmMask)
{ ASSERT(m_hImageList != NULL); return ImageList_Add(m_hImageList, (HBITMAP)pbmImage->GetSafeHandle(), (HBITMAP)pbmMask->GetSafeHandle()); }
_AFXCMN_INLINE int CImageList::Add(CBitmap* pbmImage, COLORREF crMask)
{ ASSERT(m_hImageList != NULL); return ImageList_AddMasked(m_hImageList, (HBITMAP)pbmImage->GetSafeHandle(), crMask); }
_AFXCMN_INLINE BOOL CImageList::Remove(int nImage)
{ ASSERT(m_hImageList != NULL); return ImageList_Remove(m_hImageList, nImage); }
_AFXCMN_INLINE BOOL CImageList::Replace(int nImage, CBitmap* pbmImage, CBitmap* pbmMask)
{ ASSERT(m_hImageList != NULL); return ImageList_Replace(m_hImageList, nImage, (HBITMAP)pbmImage->GetSafeHandle(), (HBITMAP)pbmMask->GetSafeHandle()); }
_AFXCMN_INLINE int CImageList::Add(HICON hIcon)
{ ASSERT(m_hImageList != NULL); return ImageList_AddIcon(m_hImageList, hIcon); }
_AFXCMN_INLINE int CImageList::Replace(int nImage, HICON hIcon)
{ ASSERT(m_hImageList != NULL); return ImageList_ReplaceIcon(m_hImageList, nImage, hIcon); }
_AFXCMN_INLINE HICON CImageList::ExtractIcon(int nImage)
{ ASSERT(m_hImageList != NULL); return ImageList_ExtractIcon(NULL, m_hImageList, nImage); }
_AFXCMN_INLINE BOOL CImageList::Draw(CDC* pDC, int nImage, POINT pt, UINT nStyle)
{ ASSERT(m_hImageList != NULL); ASSERT(pDC != NULL); return ImageList_Draw(m_hImageList, nImage, pDC->GetSafeHdc(), pt.x, pt.y, nStyle); }
_AFXCMN_INLINE COLORREF CImageList::SetBkColor(COLORREF cr)
{ ASSERT(m_hImageList != NULL); return ImageList_SetBkColor(m_hImageList, cr); }
_AFXCMN_INLINE COLORREF CImageList::GetBkColor() const
{ ASSERT(m_hImageList != NULL); return ImageList_GetBkColor(m_hImageList); }
_AFXCMN_INLINE BOOL CImageList::SetOverlayImage(int nImage, int nOverlay)
{ ASSERT(m_hImageList != NULL); return ImageList_SetOverlayImage(m_hImageList, nImage, nOverlay); }
_AFXCMN_INLINE BOOL CImageList::GetImageInfo(int nImage, IMAGEINFO* pImageInfo) const
{ ASSERT(m_hImageList != NULL); return ImageList_GetImageInfo(m_hImageList, nImage, pImageInfo); }
_AFXCMN_INLINE BOOL CImageList::BeginDrag(int nImage, CPoint ptHotSpot)
{ ASSERT(m_hImageList != NULL); return ImageList_BeginDrag(m_hImageList, nImage, ptHotSpot.x, ptHotSpot.y); }
_AFXCMN_INLINE void PASCAL CImageList::EndDrag()
{ ImageList_EndDrag(); }
_AFXCMN_INLINE BOOL PASCAL CImageList::DragMove(CPoint pt)
{ return ImageList_DragMove(pt.x, pt.y); }
_AFXCMN_INLINE BOOL CImageList::SetDragCursorImage(int nDrag, CPoint ptHotSpot)
{ ASSERT(m_hImageList != NULL); return ImageList_SetDragCursorImage(m_hImageList, nDrag, ptHotSpot.x, ptHotSpot.y); }
_AFXCMN_INLINE BOOL PASCAL CImageList::DragShowNolock(BOOL bShow)
{return ImageList_DragShowNolock(bShow);}
_AFXCMN_INLINE CImageList* PASCAL CImageList::GetDragImage(LPPOINT lpPoint, LPPOINT lpPointHotSpot)
{return CImageList::FromHandle(ImageList_GetDragImage(lpPoint, lpPointHotSpot));}
_AFXCMN_INLINE BOOL PASCAL CImageList::DragEnter(CWnd* pWndLock, CPoint point)
{ return ImageList_DragEnter(pWndLock->GetSafeHwnd(), point.x, point.y); }
_AFXCMN_INLINE BOOL PASCAL CImageList::DragLeave(CWnd* pWndLock)
{ return ImageList_DragLeave(pWndLock->GetSafeHwnd()); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CTabCtrl::CTabCtrl()
{ }
_AFXCMN_INLINE CImageList* CTabCtrl::GetImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST)::SendMessage(m_hWnd, TCM_GETIMAGELIST, 0, 0L)); }
_AFXCMN_INLINE CImageList* CTabCtrl::SetImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST)::SendMessage(m_hWnd, TCM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE int CTabCtrl::GetItemCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_GETITEMCOUNT, 0, 0L); }
_AFXCMN_INLINE BOOL CTabCtrl::GetItem(int nItem, TCITEM* pTabCtrlItem) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_GETITEM, nItem, (LPARAM)pTabCtrlItem); }
_AFXCMN_INLINE BOOL CTabCtrl::SetItem(int nItem, TCITEM* pTabCtrlItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_SETITEM, nItem, (LPARAM)pTabCtrlItem); }
_AFXCMN_INLINE BOOL CTabCtrl::SetItemExtra(int nBytes)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_SETITEMEXTRA, (WPARAM) nBytes, 0); }
_AFXCMN_INLINE void CTabCtrl::SetCurFocus(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_SETCURFOCUS, (WPARAM) nItem, 0); }
_AFXCMN_INLINE BOOL CTabCtrl::InsertItem(int nItem, TCITEM* pTabCtrlItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_INSERTITEM, nItem, (LPARAM)pTabCtrlItem); }
_AFXCMN_INLINE BOOL CTabCtrl::InsertItem(int nItem, LPCTSTR lpszItem)
{ ASSERT(::IsWindow(m_hWnd)); return CTabCtrl::InsertItem(TCIF_TEXT, nItem, lpszItem, 0, 0); }
_AFXCMN_INLINE BOOL CTabCtrl::InsertItem(int nItem, LPCTSTR lpszItem, int nImage)
{ ASSERT(::IsWindow(m_hWnd)); return CTabCtrl::InsertItem(TCIF_TEXT|TCIF_IMAGE, nItem, lpszItem, nImage, 0); }
_AFXCMN_INLINE BOOL CTabCtrl::DeleteItem(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_DELETEITEM, nItem, 0L); }
_AFXCMN_INLINE BOOL CTabCtrl::DeleteAllItems()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_DELETEALLITEMS, 0, 0L); }
_AFXCMN_INLINE BOOL CTabCtrl::GetItemRect(int nItem, LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_GETITEMRECT, nItem, (LPARAM)lpRect); }
_AFXCMN_INLINE int CTabCtrl::GetCurSel() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_GETCURSEL, 0, 0L); }
_AFXCMN_INLINE int CTabCtrl::SetCurSel(int nItem)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_SETCURSEL, nItem, 0L); }
_AFXCMN_INLINE int CTabCtrl::HitTest(TCHITTESTINFO* pHitTestInfo) const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_HITTEST, 0, (LPARAM) pHitTestInfo); }
_AFXCMN_INLINE void CTabCtrl::AdjustRect(BOOL bLarger, LPRECT lpRect)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_ADJUSTRECT, bLarger, (LPARAM)lpRect); }
_AFXCMN_INLINE CSize CTabCtrl::SetItemSize(CSize size)
{ ASSERT(::IsWindow(m_hWnd)); return (CSize)::SendMessage(m_hWnd, TCM_SETITEMSIZE, 0, MAKELPARAM(size.cx,size.cy)); }
_AFXCMN_INLINE void CTabCtrl::RemoveImage(int nImage)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_REMOVEIMAGE, nImage, 0L); }
_AFXCMN_INLINE void CTabCtrl::SetPadding(CSize size)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_SETPADDING, 0, MAKELPARAM(size.cx, size.cy)); }
_AFXCMN_INLINE int CTabCtrl::GetRowCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_GETROWCOUNT, 0, 0L); }
_AFXCMN_INLINE CToolTipCtrl* CTabCtrl::GetToolTips() const
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, TCM_GETTOOLTIPS, 0, 0L)); }
_AFXCMN_INLINE void CTabCtrl::SetToolTips(CToolTipCtrl* pWndTip)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_SETTOOLTIPS, (WPARAM)pWndTip->GetSafeHwnd(), 0L); }
_AFXCMN_INLINE int CTabCtrl::GetCurFocus() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_GETCURFOCUS, 0, 0L); }
_AFXCMN_INLINE int CTabCtrl::SetMinTabWidth(int cx)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, TCM_SETMINTABWIDTH, 0, (LPARAM)cx); }
_AFXCMN_INLINE void CTabCtrl::DeselectAll(BOOL fExcludeFocus)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TCM_DESELECTALL, fExcludeFocus, 0); }
_AFXCMN_INLINE BOOL CTabCtrl::HighlightItem(int idItem, BOOL fHighlight /*= TRUE*/)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, TCM_HIGHLIGHTITEM, idItem, MAKELPARAM(fHighlight, 0)); }
_AFXCMN_INLINE DWORD CTabCtrl::GetExtendedStyle()
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TCM_GETEXTENDEDSTYLE, 0, 0); }
_AFXCMN_INLINE DWORD CTabCtrl::SetExtendedStyle(DWORD dwNewStyle, DWORD dwExMask /*= 0*/)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TCM_SETEXTENDEDSTYLE, dwExMask, dwNewStyle); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CAnimateCtrl::CAnimateCtrl()
{ }
_AFXCMN_INLINE BOOL CAnimateCtrl::Open(LPCTSTR lpszName)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_OPEN, 0, (LPARAM)lpszName); }
_AFXCMN_INLINE BOOL CAnimateCtrl::Open(UINT nID)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_OPEN, 0, nID); }
_AFXCMN_INLINE BOOL CAnimateCtrl::Play(UINT nFrom, UINT nTo, UINT nRep)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_PLAY, nRep, MAKELPARAM(nFrom, nTo)); }
_AFXCMN_INLINE BOOL CAnimateCtrl::Stop()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_STOP, 0, 0L); }
_AFXCMN_INLINE BOOL CAnimateCtrl::Close()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_OPEN, 0, 0L); }
_AFXCMN_INLINE BOOL CAnimateCtrl::Seek(UINT nTo)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, ACM_PLAY, 0, MAKELPARAM(nTo, nTo)); }
/////////////////////////////////////////////////////////////////////////////
#ifndef _AFX_NO_RICHEDIT_SUPPORT
_AFXCMN_INLINE CRichEditCtrl::CRichEditCtrl()
{ }
_AFXCMN_INLINE BOOL CRichEditCtrl::CanUndo() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_CANUNDO, 0, 0); }
_AFXCMN_INLINE int CRichEditCtrl::GetLineCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETLINECOUNT, 0, 0); }
_AFXCMN_INLINE BOOL CRichEditCtrl::GetModify() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_GETMODIFY, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::SetModify(BOOL bModified /* = TRUE */)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETMODIFY, bModified, 0);}
_AFXCMN_INLINE void CRichEditCtrl::GetRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_GETRECT, 0, (LPARAM)lpRect); }
_AFXCMN_INLINE CPoint CRichEditCtrl::GetCharPos(long lChar) const
{ ASSERT(::IsWindow(m_hWnd)); CPoint pt; ::SendMessage(m_hWnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)lChar); return pt;}
_AFXCMN_INLINE void CRichEditCtrl::SetOptions(WORD wOp, DWORD dwFlags)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETOPTIONS, (WPARAM)wOp, (LPARAM)dwFlags); }
_AFXCMN_INLINE void CRichEditCtrl::EmptyUndoBuffer()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EMPTYUNDOBUFFER, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo)
{ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REPLACESEL, (WPARAM) bCanUndo, (LPARAM)lpszNewText); }
_AFXCMN_INLINE void CRichEditCtrl::SetRect(LPCRECT lpRect)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETRECT, 0, (LPARAM)lpRect); }
_AFXCMN_INLINE BOOL CRichEditCtrl::Undo()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_UNDO, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::Clear()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::Copy()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::Cut()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
_AFXCMN_INLINE void CRichEditCtrl::Paste()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
_AFXCMN_INLINE BOOL CRichEditCtrl::SetReadOnly(BOOL bReadOnly /* = TRUE */ )
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETREADONLY, bReadOnly, 0L); }
_AFXCMN_INLINE int CRichEditCtrl::GetFirstVisibleLine() const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETFIRSTVISIBLELINE, 0, 0L); }
_AFXCMN_INLINE BOOL CRichEditCtrl::DisplayBand(LPRECT pDisplayRect)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_DISPLAYBAND, 0, (LPARAM)pDisplayRect); }
_AFXCMN_INLINE void CRichEditCtrl::GetSel(CHARRANGE &cr) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXGETSEL, 0, (LPARAM)&cr); }
_AFXCMN_INLINE void CRichEditCtrl::LimitText(long nChars)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXLIMITTEXT, 0, nChars); }
_AFXCMN_INLINE long CRichEditCtrl::LineFromChar(long nIndex) const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_EXLINEFROMCHAR, 0, nIndex); }
_AFXCMN_INLINE void CRichEditCtrl::SetSel(CHARRANGE &cr)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXSETSEL, 0, (LPARAM)&cr); }
_AFXCMN_INLINE long CRichEditCtrl::FindText(DWORD dwFlags, FINDTEXTEX* pFindText) const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_FINDTEXTEX, dwFlags, (LPARAM)pFindText); }
_AFXCMN_INLINE long CRichEditCtrl::FormatRange(FORMATRANGE* pfr, BOOL bDisplay)
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_FORMATRANGE, (WPARAM)bDisplay, (LPARAM)pfr); }
_AFXCMN_INLINE long CRichEditCtrl::GetEventMask() const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETEVENTMASK, 0, 0L); }
_AFXCMN_INLINE long CRichEditCtrl::GetLimitText() const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETLIMITTEXT, 0, 0L); }
_AFXCMN_INLINE long CRichEditCtrl::GetSelText(LPSTR lpBuf) const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETSELTEXT, 0, (LPARAM)lpBuf); }
_AFXCMN_INLINE void CRichEditCtrl::HideSelection(BOOL bHide, BOOL bPerm)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_HIDESELECTION, bHide, bPerm); }
_AFXCMN_INLINE void CRichEditCtrl::RequestResize()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REQUESTRESIZE, 0, 0L); }
_AFXCMN_INLINE WORD CRichEditCtrl::GetSelectionType() const
{ ASSERT(::IsWindow(m_hWnd)); return (WORD)::SendMessage(m_hWnd, EM_SELECTIONTYPE, 0, 0L); }
_AFXCMN_INLINE COLORREF CRichEditCtrl::SetBackgroundColor(BOOL bSysColor, COLORREF cr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF)::SendMessage(m_hWnd, EM_SETBKGNDCOLOR, bSysColor, cr); }
_AFXCMN_INLINE DWORD CRichEditCtrl::SetEventMask(DWORD dwEventMask)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD)::SendMessage(m_hWnd, EM_SETEVENTMASK, 0, dwEventMask); }
_AFXCMN_INLINE BOOL CRichEditCtrl::SetOLECallback(IRichEditOleCallback* pCallback)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETOLECALLBACK, 0, (LPARAM)pCallback); }
_AFXCMN_INLINE BOOL CRichEditCtrl::SetTargetDevice(HDC hDC, long lLineWidth)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTARGETDEVICE, (WPARAM)hDC, lLineWidth); }
_AFXCMN_INLINE BOOL CRichEditCtrl::SetTargetDevice(CDC &dc, long lLineWidth)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTARGETDEVICE, (WPARAM)dc.m_hDC, lLineWidth); }
_AFXCMN_INLINE long CRichEditCtrl::StreamIn(int nFormat, EDITSTREAM &es)
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_STREAMIN, nFormat, (LPARAM)&es); }
_AFXCMN_INLINE long CRichEditCtrl::StreamOut(int nFormat, EDITSTREAM &es)
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_STREAMOUT, nFormat, (LPARAM)&es); }
_AFXCMN_INLINE long CRichEditCtrl::GetTextLength() const
{ ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, WM_GETTEXTLENGTH, NULL, NULL); }
#endif //!_AFX_NO_RICHEDIT_SUPPORT
/////////////////////////////////////////////////////////////////////////////
#endif //_AFXCMN_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,322 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXCMN.H (via WINCTRL6.CPP)
#ifdef _AFXCMN_INLINE
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE BOOL CStatusBarCtrl::IsSimple() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_ISSIMPLE, 0, 0); }
_AFXCMN_INLINE void CStatusBarCtrl::SetTipText(int nPane, LPCTSTR pszTipText)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, SB_SETTIPTEXT, nPane, (LPARAM)pszTipText); }
_AFXCMN_INLINE COLORREF CStatusBarCtrl::SetBkColor(COLORREF cr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, SB_SETBKCOLOR, 0, (LPARAM)cr); }
_AFXCMN_INLINE BOOL CStatusBarCtrl::SetIcon(int nPane, HICON hIcon)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_SETICON, nPane, (LPARAM)hIcon); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE void CSpinButtonCtrl::SetRange32(int nLower, int nUpper)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, UDM_SETRANGE32, (WPARAM) nLower, (LPARAM) nUpper); }
_AFXCMN_INLINE void CSpinButtonCtrl::GetRange32(int& nLower, int& nUpper) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, UDM_GETRANGE32, (WPARAM) &nLower, (LPARAM) &nUpper); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE DWORD CToolBarCtrl::GetButtonSize() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETBUTTONSIZE, 0, 0L); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::GetDisabledImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETDISABLEDIMAGELIST, 0, 0)); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::GetHotImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETHOTIMAGELIST, 0, 0)); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::GetImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0)); }
_AFXCMN_INLINE DWORD CToolBarCtrl::GetStyle() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETSTYLE, 0, 0L); }
_AFXCMN_INLINE INT CToolBarCtrl::GetMaxTextRows() const
{ ASSERT(::IsWindow(m_hWnd)); return (INT) ::SendMessage(m_hWnd, TB_GETTEXTROWS, 0, 0L); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetRect(int nID, LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETRECT, nID, (LPARAM)lpRect); }
_AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonHighlighted(int nID) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONHIGHLIGHTED, nID, 0); }
_AFXCMN_INLINE void CToolBarCtrl::LoadImages(int iBitmapID, HINSTANCE hinst)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_LOADIMAGES, iBitmapID, (LPARAM)hinst); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetButtonWidth(int cxMin, int cxMax)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONWIDTH, 0, MAKELPARAM(cxMin, cxMax)); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::SetDisabledImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::SetHotImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETHOTIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE CImageList* CToolBarCtrl::SetImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetIndent(int iIndent)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETINDENT, iIndent, 0L); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetMaxTextRows(int iMaxRows)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETMAXTEXTROWS, iMaxRows, 0L); }
_AFXCMN_INLINE void CToolBarCtrl::SetStyle(DWORD dwStyle)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETSTYLE, 0, dwStyle); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetButtonInfo(int nID, TBBUTTONINFO* ptbbi) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETBUTTONINFO, nID, (LPARAM)ptbbi); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetButtonInfo(int nID, TBBUTTONINFO* ptbbi)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONINFO, nID, (LPARAM)ptbbi); }
_AFXCMN_INLINE DWORD CToolBarCtrl::SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETDRAWTEXTFLAGS, dwMask, dwDTFlags); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetAnchorHighlight() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETANCHORHIGHLIGHT, 0, 0); }
_AFXCMN_INLINE BOOL CToolBarCtrl::SetAnchorHighlight(BOOL fAnchor)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETANCHORHIGHLIGHT, fAnchor, 0); }
_AFXCMN_INLINE int CToolBarCtrl::GetHotItem() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETHOTITEM, 0, 0); }
_AFXCMN_INLINE int CToolBarCtrl::SetHotItem(int nHot)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_SETHOTITEM, nHot, 0); }
_AFXCMN_INLINE void CToolBarCtrl::GetInsertMark(TBINSERTMARK* ptbim) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_GETINSERTMARK, 0, (LPARAM)ptbim); }
_AFXCMN_INLINE void CToolBarCtrl::SetInsertMark(TBINSERTMARK* ptbim)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETINSERTMARK, 0, (LPARAM)ptbim); }
_AFXCMN_INLINE BOOL CToolBarCtrl::GetMaxSize(LPSIZE pSize) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETMAXSIZE, 0, (LPARAM)pSize); }
_AFXCMN_INLINE BOOL CToolBarCtrl::InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INSERTMARKHITTEST, (WPARAM)ppt, (LPARAM)ptbim); }
_AFXCMN_INLINE BOOL CToolBarCtrl::MapAccelerator(TCHAR chAccel, UINT* pIDBtn)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MAPACCELERATOR, (WPARAM)chAccel, (LPARAM)pIDBtn); }
_AFXCMN_INLINE BOOL CToolBarCtrl::MarkButton(int nID, BOOL bHighlight)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MARKBUTTON, nID, MAKELPARAM(bHighlight, 0)); }
_AFXCMN_INLINE BOOL CToolBarCtrl::MoveButton(UINT nOldPos, UINT nNewPos)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MOVEBUTTON, nOldPos, nNewPos); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE DWORD CListCtrl::SetExtendedStyle(DWORD dwNewStyle)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM) dwNewStyle); }
_AFXCMN_INLINE HCURSOR CListCtrl::SetHotCursor(HCURSOR hc)
{ ASSERT(::IsWindow(m_hWnd) && hc != NULL); return (HCURSOR) ::SendMessage(m_hWnd, LVM_SETHOTCURSOR, 0, (LPARAM) hc); }
_AFXCMN_INLINE int CListCtrl::SetHotItem(int iIndex)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SETHOTITEM, (WPARAM) iIndex, 0); }
_AFXCMN_INLINE void CListCtrl::SetWorkAreas(int nWorkAreas, LPRECT lpRect)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LVM_SETWORKAREAS, nWorkAreas, (LPARAM) lpRect); }
_AFXCMN_INLINE int CListCtrl::SubItemHitTest(LPLVHITTESTINFO pInfo)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SUBITEMHITTEST, 0, (LPARAM) pInfo); }
_AFXCMN_INLINE HCURSOR CListCtrl::GetHotCursor()
{ ASSERT(::IsWindow(m_hWnd)); return (HCURSOR) ::SendMessage(m_hWnd, LVM_GETHOTCURSOR, 0, 0); }
_AFXCMN_INLINE int CListCtrl::GetHotItem()
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETHOTITEM, 0, 0); }
_AFXCMN_INLINE DWORD CListCtrl::GetExtendedStyle()
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }
_AFXCMN_INLINE CSize CListCtrl::ApproximateViewRect(CSize sz, int iCount) const
{ ASSERT(::IsWindow(m_hWnd)); return CSize((DWORD) ::SendMessage(m_hWnd, LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(sz.cx, sz.cy))); }
_AFXCMN_INLINE BOOL CListCtrl::GetBkImage(LVBKIMAGE* plvbkImage) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETBKIMAGE, 0, (LPARAM)plvbkImage); }
_AFXCMN_INLINE DWORD CListCtrl::GetHoverTime() const
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_GETHOVERTIME, 0, 0); }
_AFXCMN_INLINE void CListCtrl::GetWorkAreas(int nWorkAreas, LPRECT prc) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LVM_GETWORKAREAS, nWorkAreas, (LPARAM)prc); }
_AFXCMN_INLINE BOOL CListCtrl::SetBkImage(LVBKIMAGE* plvbkImage)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, LVM_SETBKIMAGE, 0, (LPARAM)plvbkImage); }
_AFXCMN_INLINE DWORD CListCtrl::SetHoverTime(DWORD dwHoverTime)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD)::SendMessage(m_hWnd, LVM_SETHOVERTIME, 0, dwHoverTime); }
_AFXCMN_INLINE UINT CListCtrl::GetNumberOfWorkAreas() const
{ ASSERT(::IsWindow(m_hWnd)); UINT nWorkAreas; ::SendMessage(m_hWnd, LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)&nWorkAreas); return nWorkAreas; }
_AFXCMN_INLINE int CListCtrl::SetSelectionMark(int iIndex)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SETSELECTIONMARK, 0, (LPARAM) iIndex); }
_AFXCMN_INLINE int CListCtrl::GetSelectionMark()
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETSELECTIONMARK, 0, 0); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE BOOL CHeaderCtrl::GetItemRect(int nIndex, LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ASSERT(lpRect != NULL); return (BOOL)::SendMessage(m_hWnd, HDM_GETITEMRECT, nIndex, (LPARAM)lpRect); }
_AFXCMN_INLINE int CHeaderCtrl::OrderToIndex(int nOrder) const
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_ORDERTOINDEX, nOrder, 0); }
_AFXCMN_INLINE int CHeaderCtrl::SetHotDivider(CPoint pt)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(pt.x, pt.y)); }
_AFXCMN_INLINE int CHeaderCtrl::SetHotDivider(int nIndex)
{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_SETHOTDIVIDER, FALSE, nIndex); }
_AFXCMN_INLINE CImageList* CHeaderCtrl::GetImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_GETIMAGELIST, 0, 0L)); }
_AFXCMN_INLINE CImageList* CHeaderCtrl::SetImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE CImageList* CHeaderCtrl::CreateDragImage(int nIndex)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_CREATEDRAGIMAGE, nIndex, 0L)); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CReBarCtrl::CReBarCtrl()
{ }
_AFXCMN_INLINE UINT CReBarCtrl::GetBandCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBANDCOUNT, 0, 0L); }
_AFXCMN_INLINE BOOL CReBarCtrl::GetBandInfo(UINT uBand, REBARBANDINFO* prbbi) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBANDINFO, uBand, (LPARAM)prbbi); }
_AFXCMN_INLINE UINT CReBarCtrl::GetBarHeight() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBARHEIGHT, 0, 0L); }
_AFXCMN_INLINE BOOL CReBarCtrl::GetBarInfo(REBARINFO* prbi) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBARINFO, 0, (LPARAM)prbi); }
_AFXCMN_INLINE COLORREF CReBarCtrl::GetBkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETBKCOLOR, 0, 0L); }
_AFXCMN_INLINE IDropTarget* CReBarCtrl::GetDropTarget() const
{ ASSERT(::IsWindow(m_hWnd)); IDropTarget* pdt; ::SendMessage(m_hWnd, RB_GETDROPTARGET, 0, (LPARAM)&pdt); return pdt; }
_AFXCMN_INLINE BOOL CReBarCtrl::GetRect(UINT uBand, LPRECT prc) const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETRECT, uBand, (LPARAM)prc); }
_AFXCMN_INLINE UINT CReBarCtrl::GetRowCount() const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWCOUNT, 0, 0L); }
_AFXCMN_INLINE UINT CReBarCtrl::GetRowHeight(UINT uRow) const
{ ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWHEIGHT, uRow, 0L); }
_AFXCMN_INLINE COLORREF CReBarCtrl::GetTextColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETTEXTCOLOR, 0, 0L); }
_AFXCMN_INLINE CToolTipCtrl* CReBarCtrl::GetToolTips() const
{ ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_GETTOOLTIPS, 0, 0L)); }
_AFXCMN_INLINE int CReBarCtrl::IDToIndex(UINT uBandID) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_IDTOINDEX, uBandID, 0L); }
_AFXCMN_INLINE BOOL CReBarCtrl::SetBandInfo(UINT uBand, REBARBANDINFO* prbbi)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBANDINFO, uBand, (LPARAM)prbbi); }
_AFXCMN_INLINE BOOL CReBarCtrl::SetBarInfo(REBARINFO* prbi)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBARINFO, 0, (LPARAM)prbi); }
_AFXCMN_INLINE COLORREF CReBarCtrl::SetBkColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETBKCOLOR, 0, (LPARAM)clr); }
_AFXCMN_INLINE CWnd* CReBarCtrl::SetOwner(CWnd* pWnd)
{ ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_SETPARENT, (WPARAM)pWnd->m_hWnd, 0L)); }
_AFXCMN_INLINE COLORREF CReBarCtrl::SetTextColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETTEXTCOLOR, 0, (LPARAM)clr); }
_AFXCMN_INLINE void CReBarCtrl::SetToolTips(CToolTipCtrl* pTip)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_SETTOOLTIPS, (WPARAM)pTip->m_hWnd, 0L); }
_AFXCMN_INLINE void CReBarCtrl::BeginDrag(UINT uBand, DWORD dwPos)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_BEGINDRAG, uBand, dwPos); }
_AFXCMN_INLINE BOOL CReBarCtrl::DeleteBand(UINT uBand)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_DELETEBAND, uBand, 0L); }
_AFXCMN_INLINE void CReBarCtrl::DragMove(DWORD dwPos)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_DRAGMOVE, 0, dwPos); }
_AFXCMN_INLINE void CReBarCtrl::EndDrag()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_ENDDRAG, 0, 0L); }
_AFXCMN_INLINE int CReBarCtrl::HitTest(RBHITTESTINFO* prbht)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_HITTEST, 0, (LPARAM)prbht); }
_AFXCMN_INLINE BOOL CReBarCtrl::InsertBand(UINT uIndex, REBARBANDINFO* prbbi)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_INSERTBAND, uIndex, (LPARAM)prbbi); }
_AFXCMN_INLINE void CReBarCtrl::MaximizeBand(UINT uBand)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MAXIMIZEBAND, uBand, 0L); }
_AFXCMN_INLINE void CReBarCtrl::MinimizeBand(UINT uBand)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MINIMIZEBAND, uBand, 0L); }
_AFXCMN_INLINE BOOL CReBarCtrl::SizeToRect(CRect& rect)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SIZETORECT, 0, (LPARAM)&rect); }
_AFXCMN_INLINE BOOL CReBarCtrl::ShowBand(UINT uBand, BOOL fShow /*= TRUE*/)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SHOWBAND, uBand, fShow); }
_AFXCMN_INLINE void CReBarCtrl::GetBandBorders(UINT uBand, LPRECT prc) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_GETBANDBORDERS, uBand, (LPARAM)prc); }
_AFXCMN_INLINE CPalette* CReBarCtrl::GetPalette() const
{ ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_GETPALETTE, 0, 0L)); }
_AFXCMN_INLINE CPalette* CReBarCtrl::SetPalette(HPALETTE hPal)
{ ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_SETPALETTE, 0, (LPARAM)hPal)); }
_AFXCMN_INLINE BOOL CReBarCtrl::MoveBand(UINT uFrom, UINT uTo)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_MOVEBAND, uFrom, uTo); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE void CToolTipCtrl::SetDelayTime(UINT nDelay)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETDELAYTIME, 0, nDelay); }
_AFXCMN_INLINE int CToolTipCtrl::GetDelayTime(DWORD dwDuration) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_GETDELAYTIME, dwDuration, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::GetMargin(LPRECT lprc) const
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_GETMARGIN, 0, (LPARAM)lprc); }
_AFXCMN_INLINE int CToolTipCtrl::GetMaxTipWidth() const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_GETMAXTIPWIDTH, 0, 0L); }
_AFXCMN_INLINE COLORREF CToolTipCtrl::GetTipBkColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TTM_GETTIPBKCOLOR, 0, 0L); }
_AFXCMN_INLINE COLORREF CToolTipCtrl::GetTipTextColor() const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TTM_GETTIPTEXTCOLOR, 0, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::Pop()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_POP, 0, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::SetDelayTime(DWORD dwDuration, int iTime)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETDELAYTIME, dwDuration, MAKELPARAM(iTime, 0)); }
_AFXCMN_INLINE void CToolTipCtrl::SetMargin(LPRECT lprc)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETMARGIN, 0, (LPARAM)lprc); }
_AFXCMN_INLINE int CToolTipCtrl::SetMaxTipWidth(int iWidth)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_SETMAXTIPWIDTH, 0, iWidth); }
_AFXCMN_INLINE void CToolTipCtrl::SetTipBkColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETTIPBKCOLOR, clr, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::SetTipTextColor(COLORREF clr)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETTIPTEXTCOLOR, clr, 0L); }
_AFXCMN_INLINE void CToolTipCtrl::Update()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_UPDATE, 0, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CComboBoxEx::CComboBoxEx()
{ }
_AFXCMN_INLINE DWORD CComboBoxEx::GetExtendedStyle() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_GETEXTENDEDSTYLE, 0, 0); }
_AFXCMN_INLINE DWORD CComboBoxEx::SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, CBEM_SETEXTENDEDSTYLE, (DWORD) dwExMask, (LPARAM) dwExStyles); }
_AFXCMN_INLINE BOOL CComboBoxEx::HasEditChanged()
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_HASEDITCHANGED, 0, 0); }
_AFXCMN_INLINE CEdit* CComboBoxEx::GetEditCtrl()
{ ASSERT(::IsWindow(m_hWnd)); return (CEdit*) CEdit::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETEDITCONTROL, 0, 0)); }
_AFXCMN_INLINE CComboBox* CComboBoxEx::GetComboBoxCtrl()
{ ASSERT(::IsWindow(m_hWnd)); return (CComboBox*) CComboBox::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETCOMBOCONTROL, 0, 0)); }
_AFXCMN_INLINE CImageList* CComboBoxEx::SetImageList(CImageList* pImageList)
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
_AFXCMN_INLINE CImageList* CComboBoxEx::GetImageList() const
{ ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_GETIMAGELIST, 0, 0)); }
// While CComboBoxEx derives from CComboBox, there are some
// CB_messages the underlying ComboBoxEx control doesn't support.
_AFXCMN_INLINE int CComboBoxEx::Dir(UINT attr, LPCTSTR lpszWildCard)
{ UNUSED_ALWAYS(attr); UNUSED_ALWAYS(lpszWildCard);
ASSERT(FALSE); return CB_ERR; }
_AFXCMN_INLINE int CComboBoxEx::FindString(int nIndexStart, LPCTSTR lpszFind) const
{ UNUSED_ALWAYS(nIndexStart); UNUSED_ALWAYS(lpszFind);
ASSERT(FALSE); return CB_ERR; }
_AFXCMN_INLINE int CComboBoxEx::AddString(LPCTSTR lpszString)
{ UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR;}
_AFXCMN_INLINE BOOL CComboBoxEx::SetEditSel(int nStartChar, int nEndChar)
{ UNUSED_ALWAYS(nStartChar); UNUSED_ALWAYS(nEndChar);
ASSERT(FALSE); return FALSE; }
_AFXCMN_INLINE int CComboBoxEx::InsertString(int nIndex, LPCTSTR lpszString)
{ UNUSED_ALWAYS(nIndex); UNUSED_ALWAYS(lpszString);
ASSERT(FALSE); return CB_ERR; }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE int CProgressCtrl::SetPos(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_SETPOS, nPos, 0L); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE CIPAddressCtrl::CIPAddressCtrl()
{ }
_AFXCMN_INLINE void CIPAddressCtrl::ClearAddress()
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_CLEARADDRESS, 0, 0L); }
_AFXCMN_INLINE BOOL CIPAddressCtrl::IsBlank() const
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, IPM_ISBLANK, 0, 0L); }
_AFXCMN_INLINE int CIPAddressCtrl::GetAddress(DWORD& dwAddress)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, IPM_GETADDRESS, 0, (LPARAM) &dwAddress); }
_AFXCMN_INLINE void CIPAddressCtrl::SetAddress(DWORD dwAddress)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETADDRESS, 0, (LPARAM) dwAddress); }
_AFXCMN_INLINE void CIPAddressCtrl::SetAddress(BYTE nField0, BYTE nField1, BYTE nField2, BYTE nField3)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETADDRESS, 0, (LPARAM) MAKEIPADDRESS(nField0, nField1, nField2, nField3)); }
_AFXCMN_INLINE void CIPAddressCtrl::SetFieldFocus(WORD nField)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETFOCUS, (WPARAM) nField, 0); }
_AFXCMN_INLINE void CIPAddressCtrl::SetFieldRange(int nField, BYTE nLower, BYTE nUpper)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETRANGE, (WPARAM) nField, MAKEIPRANGE(nLower, nUpper)); }
/////////////////////////////////////////////////////////////////////////////
_AFXCMN_INLINE BOOL CImageList::SetImageCount(UINT uNewCount)
{ ASSERT(m_hImageList != NULL); return ImageList_SetImageCount(m_hImageList, uNewCount); }
_AFXCMN_INLINE BOOL CImageList::Copy(int iDst, int iSrc, UINT uFlags /* = ILCF_MOVE */)
{ ASSERT(m_hImageList != NULL); return ImageList_Copy(m_hImageList, iDst, m_hImageList, iSrc, uFlags); }
_AFXCMN_INLINE BOOL CImageList::Copy(int iDst, CImageList* pSrc, int iSrc, UINT uFlags /* = ILCF_MOVE */)
{ ASSERT(m_hImageList != NULL); ASSERT(pSrc != NULL && (HIMAGELIST)*pSrc != NULL); return ImageList_Copy(m_hImageList, iDst, *pSrc, iSrc, uFlags); }
/////////////////////////////////////////////////////////////////////////////
#endif //_AFXCMN_INLINE
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,527 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXCOLL.H
#ifdef _AFXCOLL_INLINE
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CByteArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CByteArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CByteArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE BYTE CByteArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CByteArray::SetAt(int nIndex, BYTE newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE BYTE& CByteArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const BYTE* CByteArray::GetData() const
{ return (const BYTE*)m_pData; }
_AFXCOLL_INLINE BYTE* CByteArray::GetData()
{ return (BYTE*)m_pData; }
_AFXCOLL_INLINE int CByteArray::Add(BYTE newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE BYTE CByteArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE BYTE& CByteArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CWordArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CWordArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CWordArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE WORD CWordArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CWordArray::SetAt(int nIndex, WORD newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE WORD& CWordArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const WORD* CWordArray::GetData() const
{ return (const WORD*)m_pData; }
_AFXCOLL_INLINE WORD* CWordArray::GetData()
{ return (WORD*)m_pData; }
_AFXCOLL_INLINE int CWordArray::Add(WORD newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE WORD CWordArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE WORD& CWordArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CDWordArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CDWordArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CDWordArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE DWORD CDWordArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CDWordArray::SetAt(int nIndex, DWORD newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE DWORD& CDWordArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const DWORD* CDWordArray::GetData() const
{ return (const DWORD*)m_pData; }
_AFXCOLL_INLINE DWORD* CDWordArray::GetData()
{ return (DWORD*)m_pData; }
_AFXCOLL_INLINE int CDWordArray::Add(DWORD newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE DWORD CDWordArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE DWORD& CDWordArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CUIntArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CUIntArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CUIntArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE UINT CUIntArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CUIntArray::SetAt(int nIndex, UINT newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE UINT& CUIntArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const UINT* CUIntArray::GetData() const
{ return (const UINT*)m_pData; }
_AFXCOLL_INLINE UINT* CUIntArray::GetData()
{ return (UINT*)m_pData; }
_AFXCOLL_INLINE int CUIntArray::Add(UINT newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE UINT CUIntArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE UINT& CUIntArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CPtrArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CPtrArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CPtrArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE void* CPtrArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CPtrArray::SetAt(int nIndex, void* newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE void*& CPtrArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const void** CPtrArray::GetData() const
{ return (const void**)m_pData; }
_AFXCOLL_INLINE void** CPtrArray::GetData()
{ return (void**)m_pData; }
_AFXCOLL_INLINE int CPtrArray::Add(void* newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE void* CPtrArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE void*& CPtrArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CObArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CObArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CObArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE CObject* CObArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CObArray::SetAt(int nIndex, CObject* newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE CObject*& CObArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const CObject** CObArray::GetData() const
{ return (const CObject**)m_pData; }
_AFXCOLL_INLINE CObject** CObArray::GetData()
{ return (CObject**)m_pData; }
_AFXCOLL_INLINE int CObArray::Add(CObject* newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE CObject* CObArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE CObject*& CObArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CStringArray::GetSize() const
{ return m_nSize; }
_AFXCOLL_INLINE int CStringArray::GetUpperBound() const
{ return m_nSize-1; }
_AFXCOLL_INLINE void CStringArray::RemoveAll()
{ SetSize(0); }
_AFXCOLL_INLINE CString CStringArray::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE void CStringArray::SetAt(int nIndex, LPCTSTR newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE void CStringArray::SetAt(int nIndex, const CString& newElement)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
m_pData[nIndex] = newElement; }
_AFXCOLL_INLINE CString& CStringArray::ElementAt(int nIndex)
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
_AFXCOLL_INLINE const CString* CStringArray::GetData() const
{ return (const CString*)m_pData; }
_AFXCOLL_INLINE CString* CStringArray::GetData()
{ return (CString*)m_pData; }
_AFXCOLL_INLINE int CStringArray::Add(LPCTSTR newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE int CStringArray::Add(const CString& newElement)
{ int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
_AFXCOLL_INLINE CString CStringArray::operator[](int nIndex) const
{ return GetAt(nIndex); }
_AFXCOLL_INLINE CString& CStringArray::operator[](int nIndex)
{ return ElementAt(nIndex); }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CPtrList::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CPtrList::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void*& CPtrList::GetHead()
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE void* CPtrList::GetHead() const
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE void*& CPtrList::GetTail()
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE void* CPtrList::GetTail() const
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE POSITION CPtrList::GetHeadPosition() const
{ return (POSITION) m_pNodeHead; }
_AFXCOLL_INLINE POSITION CPtrList::GetTailPosition() const
{ return (POSITION) m_pNodeTail; }
_AFXCOLL_INLINE void*& CPtrList::GetNext(POSITION& rPosition) // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE void* CPtrList::GetNext(POSITION& rPosition) const // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE void*& CPtrList::GetPrev(POSITION& rPosition) // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE void* CPtrList::GetPrev(POSITION& rPosition) const // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE void*& CPtrList::GetAt(POSITION position)
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE void* CPtrList::GetAt(POSITION position) const
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE void CPtrList::SetAt(POSITION pos, void* newElement)
{ CNode* pNode = (CNode*) pos;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
pNode->data = newElement; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CObList::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CObList::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE CObject*& CObList::GetHead()
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE CObject* CObList::GetHead() const
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE CObject*& CObList::GetTail()
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE CObject* CObList::GetTail() const
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE POSITION CObList::GetHeadPosition() const
{ return (POSITION) m_pNodeHead; }
_AFXCOLL_INLINE POSITION CObList::GetTailPosition() const
{ return (POSITION) m_pNodeTail; }
_AFXCOLL_INLINE CObject*& CObList::GetNext(POSITION& rPosition) // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE CObject* CObList::GetNext(POSITION& rPosition) const // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE CObject*& CObList::GetPrev(POSITION& rPosition) // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE CObject* CObList::GetPrev(POSITION& rPosition) const // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE CObject*& CObList::GetAt(POSITION position)
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE CObject* CObList::GetAt(POSITION position) const
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE void CObList::SetAt(POSITION pos, CObject* newElement)
{ CNode* pNode = (CNode*) pos;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
pNode->data = newElement; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CStringList::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CStringList::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE CString& CStringList::GetHead()
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE CString CStringList::GetHead() const
{ ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
_AFXCOLL_INLINE CString& CStringList::GetTail()
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE CString CStringList::GetTail() const
{ ASSERT(m_pNodeTail != NULL);
return m_pNodeTail->data; }
_AFXCOLL_INLINE POSITION CStringList::GetHeadPosition() const
{ return (POSITION) m_pNodeHead; }
_AFXCOLL_INLINE POSITION CStringList::GetTailPosition() const
{ return (POSITION) m_pNodeTail; }
_AFXCOLL_INLINE CString& CStringList::GetNext(POSITION& rPosition) // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE CString CStringList::GetNext(POSITION& rPosition) const // return *Position++
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pNext;
return pNode->data; }
_AFXCOLL_INLINE CString& CStringList::GetPrev(POSITION& rPosition) // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE CString CStringList::GetPrev(POSITION& rPosition) const // return *Position--
{ CNode* pNode = (CNode*) rPosition;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
rPosition = (POSITION) pNode->pPrev;
return pNode->data; }
_AFXCOLL_INLINE CString& CStringList::GetAt(POSITION position)
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE CString CStringList::GetAt(POSITION position) const
{ CNode* pNode = (CNode*) position;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
return pNode->data; }
_AFXCOLL_INLINE void CStringList::SetAt(POSITION pos, LPCTSTR newElement)
{ CNode* pNode = (CNode*) pos;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
pNode->data = newElement; }
_AFXCOLL_INLINE void CStringList::SetAt(POSITION pos, const CString& newElement)
{ CNode* pNode = (CNode*) pos;
ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
pNode->data = newElement; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapWordToPtr::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapWordToPtr::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapWordToPtr::SetAt(WORD key, void* newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapWordToPtr::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapWordToPtr::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapPtrToWord::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapPtrToWord::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapPtrToWord::SetAt(void* key, WORD newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapPtrToWord::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapPtrToWord::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapPtrToPtr::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapPtrToPtr::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapPtrToPtr::SetAt(void* key, void* newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapPtrToPtr::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapPtrToPtr::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapWordToOb::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapWordToOb::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapWordToOb::SetAt(WORD key, CObject* newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapWordToOb::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapWordToOb::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapStringToPtr::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapStringToPtr::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapStringToPtr::SetAt(LPCTSTR key, void* newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapStringToPtr::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapStringToPtr::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapStringToOb::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapStringToOb::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapStringToOb::SetAt(LPCTSTR key, CObject* newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapStringToOb::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapStringToOb::GetHashTableSize() const
{ return m_nHashTableSize; }
////////////////////////////////////////////////////////////////////////////
_AFXCOLL_INLINE int CMapStringToString::GetCount() const
{ return m_nCount; }
_AFXCOLL_INLINE BOOL CMapStringToString::IsEmpty() const
{ return m_nCount == 0; }
_AFXCOLL_INLINE void CMapStringToString::SetAt(LPCTSTR key, LPCTSTR newValue)
{ (*this)[key] = newValue; }
_AFXCOLL_INLINE POSITION CMapStringToString::GetStartPosition() const
{ return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
_AFXCOLL_INLINE UINT CMapStringToString::GetHashTableSize() const
{ return m_nHashTableSize; }
/////////////////////////////////////////////////////////////////////////////
#endif //_AFXCOLL_INLINE
@@ -0,0 +1,480 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
/////////////////////////////////////////////////////////////////////////////
// AFXCOM_.H
//
// THIS FILE IS FOR MFC IMPLEMENTATION ONLY.
#ifndef __AFXCOM_H__
#define __AFXCOM_H__
#ifndef _OBJBASE_H_
#include <objbase.h>
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
/////////////////////////////////////////////////////////////////////////////
#ifndef _AFX_NOFORCE_LIBS
#pragma comment(lib, "uuid.lib")
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
#ifndef ASSERT
#ifndef _INC_CRTDBG
#include <crtdbg.h>
#endif // _INC_CRTDBG
#define ASSERT(x) _ASSERT(x)
#endif // ASSERT
/////////////////////////////////////////////////////////////////////////////
template<class _Interface, const IID* _IID>
class _CIP
{
public:
// Declare interface type so that the type may be available outside
// the scope of this template.
typedef _Interface Interface;
// When the compiler supports references in template params,
// _CLSID will be changed to a reference. To avoid conversion
// difficulties this function should be used to obtain the
// CLSID.
static const IID& GetIID()
{ ASSERT(_IID != NULL); return *_IID; }
// Construct empty in preperation for assignment.
_CIP();
// Copy the pointer and AddRef().
_CIP(const _CIP& cp) : _pInterface(cp._pInterface)
{ _AddRef(); }
// Saves and AddRef()'s the interface
_CIP(Interface* pInterface) : _pInterface(pInterface)
{ _AddRef(); }
// Copies the pointer. If bAddRef is TRUE, the interface will
// be AddRef()ed.
_CIP(Interface* pInterface, BOOL bAddRef)
: _pInterface(pInterface)
{
if (bAddRef)
{
ASSERT(pInterface != NULL);
_AddRef();
}
}
// Calls CoCreateClass with the provided CLSID.
_CIP(const CLSID& clsid, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
: _pInterface(NULL)
{
CreateObject(clsid, dwClsContext);
}
// Calls CoCreateClass with the provided CLSID retrieved from
// the string.
_CIP(LPOLESTR str, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
: _pInterface(NULL)
{
CreateObject(str, dwClsContext);
}
// Saves and AddRef()s the interface.
_CIP& operator=(Interface* pInterface)
{
if (_pInterface != pInterface)
{
Interface* pOldInterface = _pInterface;
_pInterface = pInterface;
_AddRef();
if (pOldInterface != NULL)
pOldInterface->Release();
}
return *this;
}
// Copies and AddRef()'s the interface.
_CIP& operator=(const _CIP& cp)
{ return operator=(cp._pInterface); }
// Releases any current interface and loads the class with the
// provided CLSID.
_CIP& operator=(const CLSID& clsid)
{
CreateObject(clsid);
return *this;
}
// Calls CoCreateClass with the provided CLSID retrieved from
// the string.
_CIP& operator=(LPOLESTR str)
{
CreateObject(str);
return *this;
}
~_CIP();
// Saves/sets the interface without AddRef()ing. This call
// will release any previously aquired interface.
void Attach(Interface* pInterface)
{
_Release();
_pInterface = pInterface;
}
// Saves/sets the interface only AddRef()ing if bAddRef is TRUE.
// This call will release any previously aquired interface.
void Attach(Interface* pInterface, BOOL bAddRef)
{
_Release();
_pInterface = pInterface;
if (bAddRef)
{
ASSERT(pInterface != NULL);
pInterface->AddRef();
}
}
// Simply NULL the interface pointer so that it isn't Released()'ed.
void Detach()
{
ASSERT(_pInterface);
_pInterface = NULL;
}
// Return the interface. This value may be NULL
operator Interface*() const
{ return _pInterface; }
// Queries for the unknown and return it
operator IUnknown*()
{ return _pInterface; }
// Provides minimal level assertion before use.
operator Interface&() const
{ ASSERT(_pInterface); return *_pInterface; }
// Allows an instance of this class to act as though it were the
// actual interface. Also provides minimal assertion verification.
Interface& operator*() const
{ ASSERT(_pInterface); return *_pInterface; }
// Returns the address of the interface pointer contained in this
// class. This is useful when using the COM/OLE interfaces to create
// this interface.
Interface** operator&()
{
_Release();
_pInterface = NULL;
return &_pInterface;
}
// Allows this class to be used as the interface itself.
// Also provides simple assertion verification.
Interface* operator->() const
{ ASSERT(_pInterface != NULL); return _pInterface; }
// This operator is provided so that simple boolean expressions will
// work. For example: "if (p) ...".
// Returns TRUE if the pointer is not NULL.
operator BOOL() const
{ return _pInterface != NULL; }
// Returns TRUE if the interface is NULL.
// This operator will be removed when support for type bool
// is added to the compiler.
BOOL operator!()
{ return _pInterface == NULL; }
// Provides assertion verified, Release()ing of this interface.
void Release()
{
ASSERT(_pInterface != NULL);
_pInterface->Release();
_pInterface = NULL;
}
// Provides assertion verified AddRef()ing of this interface.
void AddRef()
{ ASSERT(_pInterface != NULL); _pInterface->AddRef(); }
// Another way to get the interface pointer without casting.
Interface* GetInterfacePtr() const
{ return _pInterface; }
// Loads an interface for the provided CLSID.
// Returns an HRESULT. Any previous interface is released.
HRESULT CreateObject(
const CLSID& clsid, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
{
_Release();
HRESULT hr = CoCreateInstance(clsid, NULL, dwClsContext,
GetIID(), reinterpret_cast<void**>(&_pInterface));
ASSERT(SUCCEEDED(hr));
return hr;
}
// Creates the class specified by clsidString. clsidString may
// contain a class id, or a prog id string.
HRESULT CreateObject(
LPOLESTR clsidString, DWORD dwClsContext=CLSCTX_INPROC_SERVER)
{
ASSERT(clsidString != NULL);
CLSID clsid;
HRESULT hr;
if (clsidString[0] == '{')
hr = CLSIDFromString(clsidString, &clsid);
else
hr = CLSIDFromProgID(clsidString, &clsid);
ASSERT(SUCCEEDED(hr));
if (FAILED(hr))
return hr;
return CreateObject(clsid, dwClsContext);
}
// Performs a QI on pUnknown for the interface type returned
// for this class. The interface is stored. If pUnknown is
// NULL, or the QI fails, E_NOINTERFACE is returned and
// _pInterface is set to NULL.
HRESULT QueryInterface(IUnknown* pUnknown)
{
if (pUnknown == NULL) // Can't QI NULL
{
operator=(static_cast<Interface*>(NULL));
return E_NOINTERFACE;
}
// Query for this interface
Interface* pInterface;
HRESULT hr = pUnknown->QueryInterface(GetIID(),
reinterpret_cast<void**>(&pInterface));
if (FAILED(hr))
{
// If failed intialize interface to NULL and return HRESULT.
Attach(NULL);
return hr;
}
// Save the interface without AddRef()ing.
Attach(pInterface);
return hr;
}
private:
// Releases only if the interface is not null.
// The interface is not set to NULL.
void _Release()
{
if (_pInterface != NULL)
_pInterface->Release();
}
// AddRefs only if the interface is not NULL
void _AddRef()
{
if (_pInterface != NULL)
_pInterface->AddRef();
}
// The Interface.
Interface* _pInterface;
}; // class _CIP
template<class _Interface, const IID* _IID>
_CIP<_Interface, _IID>::_CIP<_Interface, _IID>()
: _pInterface(NULL)
{
}
template<class _Interface, const IID* _IID>
_CIP<_Interface, _IID>::~_CIP<_Interface, _IID>()
{
// If we still have an interface then Release() it. The interface
// may be NULL if Detach() has previosly been called, or if it was
// never set.
_Release();
}
template<class _Interface, const IID* _IID>
class CIP : public _CIP<_Interface, _IID>
{
public:
// Simplified name for base class and provide derived classes
// access to base type
typedef _CIP<_Interface, _IID> BC;
// Provideds derived classes access to the interface type.
typedef _Interface Interface;
// Construct empty in preperation for assignment.
CIP() { }
~CIP();
// Copy the pointer and AddRef().
CIP(const CIP& cp) : _CIP<_Interface, _IID>(cp) { }
// Saves and AddRef()s the interface.
CIP(Interface* pInterface) : _CIP<_Interface, _IID>(pInterface) { }
// Saves the interface and AddRef()s only if bAddRef is TRUE.
CIP(Interface* pInterface, BOOL bAddRef)
: _CIP<_Interface, _IID>(pInterface, bAddRef) { }
// Queries for this interface.
CIP(IUnknown* pUnknown)
{
if (pUnknown == NULL)
return;
Interface* pInterface;
HRESULT hr = pUnknown->QueryInterface(GetIID(),
reinterpret_cast<void**>(&pInterface));
ASSERT(SUCCEEDED(hr));
Attach(pInterface);
}
// Creates the interface from the CLSID.
CIP(const CLSID& clsid) : _CIP<_Interface, _IID>(clsid) { }
// Creates the interface from the CLSID.
CIP(LPOLESTR str) : _CIP<_Interface, _IID>(str) { }
// Copies and AddRef()'s the interface.
CIP& operator=(const CIP& cp)
{ _CIP<_Interface, _IID>::operator=(cp); return *this; }
// Saves and AddRef()s the interface.
CIP& operator=(Interface* pInterface)
{ _CIP<_Interface, _IID>::operator=(pInterface); return *this; }
CIP& operator=(IUnknown* pUnknown)
{
HRESULT hr = QueryInterface(pUnknown);
ASSERT(SUCCEEDED(hr));
return *this;
}
// Releases any current interface and loads the class with the
// provided CLSID.
CIP& operator=(const CLSID& clsid)
{ _CIP<_Interface, _IID>::operator=(clsid); return *this; }
// Releases any current interface and loads the class with the
// provided CLSID.
CIP& operator=(LPOLESTR str)
{ _CIP<_Interface, _IID>::operator=(str); return *this; }
}; // class CIP
template<class _Interface, const IID* _IID>
CIP<_Interface, _IID>::~CIP()
{
}
#if _MSC_VER > 1020
template<>
#endif
class CIP<IUnknown, &IID_IUnknown> : public _CIP<IUnknown, &IID_IUnknown>
{
public:
// Simplified name for base class and provide derived classes
// access to base type
typedef _CIP<IUnknown, &IID_IUnknown> BC;
// Provideds derived classes access to the interface type.
typedef IUnknown Interface;
// Construct empty in preperation for assignment.
CIP() { }
// Copy the pointer and AddRef().
CIP(const CIP& cp) : _CIP<IUnknown, &IID_IUnknown>(cp) { }
// Saves and AddRef()s the interface.
CIP(Interface* pInterface)
: _CIP<IUnknown, &IID_IUnknown>(pInterface) { }
// Saves and then AddRef()s only if bAddRef is TRUE.
CIP(Interface* pInterface, BOOL bAddRef)
: _CIP<IUnknown, &IID_IUnknown>(pInterface, bAddRef) { }
// Creates the interface from the CLSID.
CIP(const CLSID& clsid) : _CIP<IUnknown, &IID_IUnknown>(clsid) { }
// Creates the interface from the CLSID.
CIP(LPOLESTR str) : _CIP<IUnknown, &IID_IUnknown>(str) { }
// Copies and AddRef()'s the interface.
CIP& operator=(const CIP& cp)
{ _CIP<IUnknown, &IID_IUnknown>::operator=(cp); return *this; }
// Saves and AddRef()s the interface. The previously saved
// interface is released.
CIP& operator=(Interface* pInterface)
{ _CIP<IUnknown, &IID_IUnknown>::operator=(pInterface); return *this; }
// Releases any current interface and loads the class with the
// provided CLSID.
CIP& operator=(const CLSID& clsid)
{ _CIP<IUnknown, &IID_IUnknown>::operator=(clsid); return *this; }
// Releases any current interface and loads the class with the
// provided CLSID.
CIP& operator=(LPOLESTR str)
{ _CIP<IUnknown, &IID_IUnknown>::operator=(str); return *this; }
// Queries for the unknown and return it
operator IUnknown*()
{ return GetInterfacePtr(); }
// Verifies that pUnknown is not null and performs assignment.
HRESULT QueryInterface(IUnknown* pUnknown)
{
_CIP<IUnknown, &IID_IUnknown>::operator=(pUnknown);
return pUnknown != NULL ? S_OK : E_NOINTERFACE;
}
}; // CIP<IUnknown, &IID_IUnknown>
#define IPTR(x) CIP<x, &IID_##x>
#define DEFINE_IPTR(x) typedef IPTR(x) x##Ptr;
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXCOM_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,64 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXCONV_H__
#define __AFXCONV_H__
#ifndef _OBJBASE_H_
#include <objbase.h>
#endif
/////////////////////////////////////////////////////////////////////////////
// Global UNICODE<>ANSI translation helpers
#ifdef _WINGDI_
LPDEVMODEW AFXAPI AfxDevModeA2W(LPDEVMODEW lpDevModeW, LPDEVMODEA lpDevModeA);
LPDEVMODEA AFXAPI AfxDevModeW2A(LPDEVMODEA lpDevModeA, LPDEVMODEW lpDevModeW);
LPTEXTMETRICW AFXAPI AfxTextMetricA2W(LPTEXTMETRICW lptmW, LPTEXTMETRICA lptmA);
LPTEXTMETRICA AFXAPI AfxTextMetricW2A(LPTEXTMETRICA lptmA, LPTEXTMETRICW lptmW);
#ifndef ATLDEVMODEA2W
#define ATLDEVMODEA2W AfxDevModeA2W
#define ATLDEVMODEW2A AfxDevModeW2A
#define ATLTEXTMETRICA2W AfxTextMetricA2W
#define ATLTEXTMETRICW2A AfxTextMetricW2A
#endif
#endif //_WINGDI
LPWSTR AFXAPI AfxA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars);
LPSTR AFXAPI AfxW2AHelper(LPSTR lpa, LPCWSTR lpw, int nChars);
#ifndef ATLA2WHELPER
#define ATLA2WHELPER AfxA2WHelper
#define ATLW2AHELPER AfxW2AHelper
#endif
#define OLESTDDELIMOLE OLESTR("\\")
#if defined(_UNICODE)
// in these cases the default (TCHAR) is the same as OLECHAR
AFX_INLINE LPOLESTR TASKSTRINGT2OLE(LPOLESTR lp) { return lp; }
AFX_INLINE LPTSTR TASKSTRINGOLE2T(LPOLESTR lp) { return lp; }
AFX_INLINE BSTR BSTR2TBSTR(BSTR bstr) { return bstr;}
#elif defined(OLE2ANSI)
// in these cases the default (TCHAR) is the same as OLECHAR
AFX_INLINE LPOLESTR TASKSTRINGT2OLE(LPOLESTR lp) { return lp; }
AFX_INLINE LPTSTR TASKSTRINGOLE2T(LPOLESTR lp) { return lp; }
AFX_INLINE BSTR BSTR2TBSTR(BSTR bstr) { return bstr; }
#else
#define TASKSTRINGT2OLE(lpa) AfxTaskStringA2W(lpa)
#define TASKSTRINGOLE2T(lpo) AfxTaskStringW2A(lpo)
#define BSTR2TBSTR(bstr) AfxBSTR2ABSTR(bstr)
#endif
#include <atlconv.h>
#endif //__AFXCONV_H__
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,115 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXCTL.H
#ifdef _AFXCTL_INLINE
/////////////////////////////////////////////////////////////////////////////
// COleControl inlines
_AFXCTL_INLINE BOOL COleControl::IsOptimizedDraw()
{ return m_bOptimizedDraw; }
_AFXCTL_INLINE BOOL COleControl::IsConvertingVBX()
{ return m_bConvertVBX; }
_AFXCTL_INLINE void COleControl::FireKeyDown(USHORT* pnChar, short nShiftState)
{ FireEvent(DISPID_KEYDOWN, EVENT_PARAM(VTS_PI2 VTS_I2), pnChar,
nShiftState); }
_AFXCTL_INLINE void COleControl::FireKeyUp(USHORT* pnChar, short nShiftState)
{ FireEvent(DISPID_KEYUP, EVENT_PARAM(VTS_PI2 VTS_I2), pnChar,
nShiftState); }
_AFXCTL_INLINE void COleControl::FireKeyPress(USHORT* pnChar)
{ FireEvent(DISPID_KEYPRESS, EVENT_PARAM(VTS_PI2), pnChar); }
_AFXCTL_INLINE void COleControl::FireMouseDown(short nButton,
short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
{ FireEvent(DISPID_MOUSEDOWN,
EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
nButton, nShiftState, x, y); }
_AFXCTL_INLINE void COleControl::FireMouseUp(short nButton,
short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
{ FireEvent(DISPID_MOUSEUP,
EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
nButton, nShiftState, x, y); }
_AFXCTL_INLINE void COleControl::FireMouseMove(short nButton,
short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
{ FireEvent(DISPID_MOUSEMOVE,
EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
nButton, nShiftState, x, y); }
_AFXCTL_INLINE void COleControl::FireClick()
{ FireEvent(DISPID_CLICK, EVENT_PARAM(VTS_NONE)); }
_AFXCTL_INLINE void COleControl::FireDblClick()
{ FireEvent(DISPID_DBLCLICK, EVENT_PARAM(VTS_NONE)); }
_AFXCTL_INLINE void COleControl::FireReadyStateChange()
{ FireEvent(DISPID_READYSTATECHANGE, EVENT_PARAM(VTS_I4), m_lReadyState); }
_AFXCTL_INLINE void COleControl::InternalSetReadyState(long lNewReadyState)
{ ASSERT((lNewReadyState >=0) && (lNewReadyState <= READYSTATE_COMPLETE));
if (m_lReadyState != lNewReadyState)
{m_lReadyState = lNewReadyState; FireReadyStateChange(); } }
_AFXCTL_INLINE BOOL COleControl::ExchangeVersion(
CPropExchange* pPX, DWORD dwVersionDefault, BOOL bConvert)
{ return pPX->ExchangeVersion(m_dwVersionLoaded, dwVersionDefault, bConvert); }
_AFXCTL_INLINE DWORD COleControl::GetStockEventMask() const
{ return *GetEventMap()->lpStockEventMask; }
_AFXCTL_INLINE DWORD COleControl::GetStockPropMask() const
{ return *GetDispatchMap()->lpStockPropMask; }
_AFXCTL_INLINE void COleControl::RequestAsynchronousExchange(DWORD dwVersion)
{ m_bDataPathPropertiesLoaded = FALSE; m_dwDataPathVersionToReport = dwVersion; }
// CPropExchange inlines
_AFXCTL_INLINE CPropExchange::CPropExchange() : m_dwVersion(0), m_bAsync(FALSE)
{ }
_AFXCTL_INLINE BOOL CPropExchange::IsLoading()
{ return m_bLoading; }
_AFXCTL_INLINE DWORD CPropExchange::GetVersion()
{ return m_dwVersion; }
_AFXCTL_INLINE BOOL CPropExchange::IsAsynchronous()
{ return m_bAsync; }
// CDataPathProperty inlines
_AFXCTL_INLINE CDataPathProperty::CDataPathProperty(COleControl* pControl)
: m_pControl(pControl) {}
_AFXCTL_INLINE CDataPathProperty::CDataPathProperty(LPCTSTR lpszPath, COleControl* pControl)
: m_pControl(pControl), m_strPath(lpszPath) {}
_AFXCTL_INLINE void CDataPathProperty::SetPath(LPCTSTR lpszPath)
{ ASSERT_VALID(this); m_strPath = lpszPath; }
_AFXCTL_INLINE CString CDataPathProperty::GetPath() const
{ ASSERT_VALID(this); return m_strPath; }
_AFXCTL_INLINE COleControl* CDataPathProperty::GetControl()
{ ASSERT_VALID(this); return m_pControl; }
_AFXCTL_INLINE void CDataPathProperty::SetControl(COleControl* pControl)
{ ASSERT_VALID(this); m_pControl=pControl; }
// CCachedDataPathProperty inlines
_AFXCTL_INLINE CCachedDataPathProperty::CCachedDataPathProperty(COleControl* pControl)
: CDataPathProperty(pControl) {}
_AFXCTL_INLINE CCachedDataPathProperty::CCachedDataPathProperty(LPCTSTR lpszPath, COleControl* pControl)
: CDataPathProperty(lpszPath, pControl) {}
// inline DDP_ routines
_AFXCTL_INLINE void AFXAPI DDP_LBString(CDataExchange* pDX, int id,
CString& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
_AFXCTL_INLINE void AFXAPI DDP_LBStringExact(CDataExchange* pDX, int id,
CString& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
_AFXCTL_INLINE void AFXAPI DDP_LBIndex(CDataExchange* pDX, int id,
int& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
_AFXCTL_INLINE void AFXAPI DDP_CBString(CDataExchange* pDX, int id,
CString& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
_AFXCTL_INLINE void AFXAPI DDP_CBStringExact(CDataExchange* pDX, int id,
CString& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
_AFXCTL_INLINE void AFXAPI DDP_CBIndex(CDataExchange* pDX, int id,
int& member, LPCTSTR pszPropName)
{ DDP_Text(pDX, id, member, pszPropName); }
#endif //_AFXCTL_INLINE
@@ -0,0 +1,284 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXCTL_RC__
#define __AFXCTL_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// OLE Control Resources
#ifndef _AFX_NO_STOCKPPG_RESOURCES
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
AFX_IDB_TRUETYPE BITMAP DISCARDABLE "RES\\TRUETYPE.BMP"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
AFX_IDD_PROPPAGE_FONT DIALOG DISCARDABLE 13, 54, 250, 110
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Property &Name:",IDC_STATIC,3,5,61,8
COMBOBOX AFX_IDC_FONTPROP,65,3,100,71,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "&Font:",IDC_STATIC,3,19,91,8
COMBOBOX AFX_IDC_FONTNAMES,3,29,91,77,CBS_SIMPLE |
CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT |
CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL |
WS_TABSTOP
LTEXT "Font St&yle:",IDC_STATIC,102,19,53,8
COMBOBOX AFX_IDC_FONTSTYLES,104,29,53,53,CBS_DROPDOWNLIST |
CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "&Size:",IDC_STATIC,167,19,40,8
COMBOBOX AFX_IDC_FONTSIZES,167,29,36,53,CBS_DROPDOWN | CBS_SORT |
CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Effects",IDC_STATIC,104,44,142,24,WS_GROUP
CONTROL "Stri&keout",AFX_IDC_STRIKEOUT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,109,55,65,10
CONTROL "&Underline",AFX_IDC_UNDERLINE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,175,55,65,10
GROUPBOX "Sample",IDC_STATIC,104,71,142,36,WS_GROUP
CTEXT "AaBbYyZz",AFX_IDC_SAMPLEBOX,110,80,130,22,SS_NOPREFIX |
NOT WS_VISIBLE
END
AFX_IDD_PROPPAGE_COLOR DIALOG DISCARDABLE 0, 0, 250, 62
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Property &Name:",IDC_STATIC,3,3,100,8
COMBOBOX AFX_IDC_COLORPROP,3,13,100,54,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "System &Color:",IDC_STATIC,3,29,100,8
COMBOBOX AFX_IDC_SYSTEMCOLORS,3,39,100,54,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",AFX_IDC_COLOR_BLACK,"Button",BS_OWNERDRAW | WS_GROUP |
WS_TABSTOP,118,4,15,11
CONTROL "",AFX_IDC_COLOR_BLUE,"Button",BS_OWNERDRAW,138,4,15,11
CONTROL "",AFX_IDC_COLOR_CYAN,"Button",BS_OWNERDRAW,158,4,15,11
CONTROL "",AFX_IDC_COLOR_DARKBLUE,"Button",BS_OWNERDRAW,178,4,15,
11
CONTROL "",AFX_IDC_COLOR_DARKCYAN,"Button",BS_OWNERDRAW,118,18,
15,11
CONTROL "",AFX_IDC_COLOR_DARKGREEN,"Button",BS_OWNERDRAW,138,18,
15,11
CONTROL "",AFX_IDC_COLOR_DARKMAGENTA,"Button",BS_OWNERDRAW,158,
18,15,11
CONTROL "",AFX_IDC_COLOR_GRAY,"Button",BS_OWNERDRAW,178,18,15,11
CONTROL "",AFX_IDC_COLOR_DARKRED,"Button",BS_OWNERDRAW,118,32,15,
11
CONTROL "",AFX_IDC_COLOR_GREEN,"Button",BS_OWNERDRAW,138,32,15,
11
CONTROL "",AFX_IDC_COLOR_LIGHTBROWN,"Button",BS_OWNERDRAW,158,32,
15,11
CONTROL "",AFX_IDC_COLOR_LIGHTGRAY,"Button",BS_OWNERDRAW,178,32,
15,11
CONTROL "",AFX_IDC_COLOR_MAGENTA,"Button",BS_OWNERDRAW,118,46,15,
11
CONTROL "",AFX_IDC_COLOR_RED,"Button",BS_OWNERDRAW,138,46,15,11
CONTROL "",AFX_IDC_COLOR_WHITE,"Button",BS_OWNERDRAW,158,46,15,
11
CONTROL "",AFX_IDC_COLOR_YELLOW,"Button",BS_OWNERDRAW,178,46,15,
11
END
AFX_IDD_PROPPAGE_PICTURE DIALOG DISCARDABLE 0, 0, 250, 62
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Property &Name:",IDC_STATIC,3,3,100,8
COMBOBOX AFX_IDC_PROPNAME,3,13,100,30,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Browse...",AFX_IDC_BROWSE,3,35,54,14
PUSHBUTTON "&Clear",AFX_IDC_CLEAR,61,35,54,14
RTEXT "Preview:",IDC_STATIC,107,3,42,16
CONTROL "",AFX_IDC_PICTURE,"Static",SS_BLACKFRAME,151,4,93,54
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
AFX_IDD_PROPPAGE_FONT DLGINIT
BEGIN
1002, 0x403, 12, 0
0x6f42, 0x646c, 0x4920, 0x6174, 0x696c, 0x0063,
0
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_PROPPAGE_UNKNOWN "(Unknown)"
AFX_IDS_COLOR_DESKTOP "Desktop"
AFX_IDS_COLOR_APPWORKSPACE "Application Workspace"
AFX_IDS_COLOR_WNDBACKGND "Window Background"
AFX_IDS_COLOR_WNDTEXT "Window Text"
AFX_IDS_COLOR_MENUBAR "Menu Bar"
AFX_IDS_COLOR_MENUTEXT "Menu Text"
AFX_IDS_COLOR_ACTIVEBAR "Active Title Bar"
AFX_IDS_COLOR_INACTIVEBAR "Inactive Title Bar"
AFX_IDS_COLOR_ACTIVETEXT "Active Title Bar Text"
AFX_IDS_COLOR_INACTIVETEXT "Inactive Title Bar Text"
AFX_IDS_COLOR_ACTIVEBORDER "Active Border"
AFX_IDS_COLOR_INACTIVEBORDER "Inactive Border"
END
#endif // !_AFX_NO_STOCKPPG_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_COLOR_WNDFRAME "Window Frame"
AFX_IDS_COLOR_SCROLLBARS "Scroll Bars"
AFX_IDS_COLOR_BTNFACE "Button Face"
AFX_IDS_COLOR_BTNSHADOW "Button Shadow"
AFX_IDS_COLOR_BTNTEXT "Button Text"
AFX_IDS_COLOR_BTNHIGHLIGHT "Button Highlight"
AFX_IDS_COLOR_DISABLEDTEXT "Disabled Text"
AFX_IDS_COLOR_HIGHLIGHT "Highlight"
AFX_IDS_COLOR_HIGHLIGHTTEXT "Highlighted Text"
AFX_IDS_REGULAR "Regular"
AFX_IDS_BOLD "Bold"
AFX_IDS_ITALIC "Italic"
AFX_IDS_BOLDITALIC "Bold Italic"
AFX_IDS_SAMPLETEXT "AaBbYyZz"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_DISPLAYSTRING_FONT "(Font)"
AFX_IDS_DISPLAYSTRING_COLOR "(Color)"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_DISPLAYSTRING_PICTURE "(Picture - %s)"
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_PICTUREFILTER "All Picture Types|*.bmp;*.cur;*.dib;*.emf;*.ico;*.wmf|Bitmaps (*.bmp;*.dib)|*.bmp;*.dib|Icons/Cursors (*.ico;*.cur)|*.ico;*.cur|Metafiles (*.wmf;*.emf)|*.wmf;*.emf|All files (*.*)|*.*||"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_PICTYPE_UNKNOWN "Unknown"
AFX_IDS_PICTYPE_NONE "None"
AFX_IDS_PICTYPE_BITMAP "Bitmap"
AFX_IDS_PICTYPE_METAFILE "Metafile"
AFX_IDS_PICTYPE_ICON "Icon"
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_COLOR_PPG "Color Property Page"
AFX_IDS_COLOR_PPG_CAPTION "Colors"
AFX_IDS_FONT_PPG "Font Property Page"
AFX_IDS_FONT_PPG_CAPTION "Fonts"
AFX_IDS_PICTURE_PPG "Picture Property Page"
AFX_IDS_PICTURE_PPG_CAPTION "Pictures"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_BORDERSTYLE_0 "0 - None"
AFX_IDS_BORDERSTYLE_1 "1 - Fixed Single"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_VERB_EDIT "&Edit"
AFX_IDS_VERB_PROPERTIES "&Properties..."
END
#ifndef _AFX_NO_STOCKPPG_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_PICTURECANTOPEN "Unable to open the picture file %1. The file may not exist, or may not be readable."
AFX_IDP_PICTURECANTLOAD "Unable to load the picture file %1. The file may have an invalid format."
AFX_IDP_PICTURETOOLARGE "Unable to load the picture file %1. The file is too large to fit in memory."
AFX_IDP_PICTUREREADFAILED
"Unable to load the picture file %1. Unexplained read failure."
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_PICTUREBROWSETITLE "Browse Pictures"
END
#endif // !_AFX_NO_STOCKPPG_RESOURCES
#ifndef _AFX_NO_CTLERROR_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_ILLEGALFUNCTIONCALL "Illegal function call"
AFX_IDP_E_OVERFLOW "Overflow"
AFX_IDP_E_OUTOFMEMORY "Out of memory"
AFX_IDP_E_DIVISIONBYZERO "Division by zero"
AFX_IDP_E_OUTOFSTRINGSPACE "Out of string space"
AFX_IDP_E_OUTOFSTACKSPACE "Out of stack space"
AFX_IDP_E_BADFILENAMEORNUMBER "Bad file name or number"
AFX_IDP_E_FILENOTFOUND "File not found"
AFX_IDP_E_BADFILEMODE "Bad file mode"
AFX_IDP_E_FILEALREADYOPEN "File already open"
AFX_IDP_E_DEVICEIOERROR "Device I/O error"
AFX_IDP_E_FILEALREADYEXISTS "File already exists"
AFX_IDP_E_BADRECORDLENGTH "Bad record length"
AFX_IDP_E_DISKFULL "Disk full"
AFX_IDP_E_BADRECORDNUMBER "Bad record number"
AFX_IDP_E_BADFILENAME "Bad file name"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_TOOMANYFILES "Too many files"
AFX_IDP_E_DEVICEUNAVAILABLE "Device unavailable"
AFX_IDP_E_PERMISSIONDENIED "Permission denied"
AFX_IDP_E_DISKNOTREADY "Disk not ready"
AFX_IDP_E_PATHFILEACCESSERROR "Path/File access error"
AFX_IDP_E_PATHNOTFOUND "Path not found"
AFX_IDP_E_INVALIDPATTERNSTRING "Invalid pattern string"
AFX_IDP_E_INVALIDUSEOFNULL "Invalid use of null"
AFX_IDP_E_INVALIDFILEFORMAT "Invalid file format"
AFX_IDP_E_INVALIDPROPERTYVALUE "Invalid property value"
AFX_IDP_E_INVALIDPROPERTYARRAYINDEX "Invalid array index"
AFX_IDP_E_SETNOTSUPPORTEDATRUNTIME "Property cannot be set at run time"
AFX_IDP_E_SETNOTSUPPORTED "Property is read-only"
AFX_IDP_E_NEEDPROPERTYARRAYINDEX
"Must specify array index when using property array"
AFX_IDP_E_SETNOTPERMITTED "Property cannot be set on this control"
AFX_IDP_E_GETNOTSUPPORTEDATRUNTIME "Property cannot be read at run time"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_GETNOTSUPPORTED "Property is write-only"
AFX_IDP_E_PROPERTYNOTFOUND "Property not found"
AFX_IDP_E_INVALIDCLIPBOARDFORMAT "Invalid clipboard format"
AFX_IDP_E_INVALIDPICTURE "Invalid picture"
AFX_IDP_E_PRINTERERROR "Printer error"
AFX_IDP_E_CANTSAVEFILETOTEMP
"Cannot create temporary file necessary to save"
AFX_IDP_E_SEARCHTEXTNOTFOUND "Search text not found"
AFX_IDP_E_REPLACEMENTSTOOLONG "Replacement text too long"
END
#endif //!_AFX_NO_CTLERROR_RESOURCES
#endif //!_AFXDLL
#endif //__AFXOLECL_RC__
@@ -0,0 +1,135 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXCVIEW_H__
#define __AFXCVIEW_H__
#ifdef _AFX_NO_AFXCMN_SUPPORT
#error Windows common control classes not supported in this library variant.
#endif
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifndef __AFXCMN_H__
#include <afxcmn.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXRICH - MFC RichEdit classes
// Classes declared in this file
//CObject
//CCmdTarget;
//CWnd
//CView
//CCtrlView
class CListView;// list control view
class CTreeView;// tree control view
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// CListView
class CListView : public CCtrlView
{
DECLARE_DYNCREATE(CListView)
// Construction
public:
CListView();
// Attributes
public:
CListCtrl& GetListCtrl() const;
// Overridables
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
void RemoveImageList(int nImageList);
virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//{{AFX_MSG(CListView)
afx_msg void OnNcDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CTreeView
class CTreeView : public CCtrlView
{
DECLARE_DYNCREATE(CTreeView)
// Construction
public:
CTreeView();
// Attributes
public:
CTreeCtrl& GetTreeCtrl() const;
protected:
void RemoveImageList(int nImageList);
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//{{AFX_MSG(CTreeView)
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXCVIEW_INLINE AFX_INLINE
#include <afxcview.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXCVIEW_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,29 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXCVIEW.H
#ifdef _AFXCVIEW_INLINE
// CListView
_AFXCVIEW_INLINE CListView::CListView() : CCtrlView(WC_LISTVIEW,
AFX_WS_DEFAULT_VIEW)
{ }
_AFXCVIEW_INLINE CListCtrl& CListView::GetListCtrl() const
{ return *(CListCtrl*)this; }
_AFXCVIEW_INLINE CTreeView::CTreeView() : CCtrlView(WC_TREEVIEW,
AFX_WS_DEFAULT_VIEW)
{ }
_AFXCVIEW_INLINE CTreeCtrl& CTreeView::GetTreeCtrl() const
{ return *(CTreeCtrl*)this; }
#endif //_AFXCVIEW_INLINE
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,77 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXDAO.H
/////////////////////////////////////////////////////////////////////////////
// General database inlines
#ifdef _AFXDAOCORE_INLINE
// CDaoWorkspace inlines
_AFXDAOCORE_INLINE BOOL CDaoWorkspace::IsOpen() const
{ ASSERT_VALID(this); return m_bOpen; }
_AFXDAOCORE_INLINE BOOL CDaoWorkspace::IsNew() const
{ ASSERT_VALID(this); return m_bNew; }
// CDaoDatabase inlines
_AFXDAOCORE_INLINE BOOL CDaoDatabase::IsOpen() const
{ ASSERT_VALID(this); return m_bOpen; }
// CDaoTableDef inlines
_AFXDAOCORE_INLINE BOOL CDaoTableDef::IsOpen() const
{ ASSERT_VALID(this); return m_bOpen; }
// CDaoQueryDef inlines
_AFXDAOCORE_INLINE BOOL CDaoQueryDef::IsOpen() const
{ ASSERT_VALID(this); return m_bOpen; }
// CDaoRecordset inlines
_AFXDAOCORE_INLINE BOOL CDaoRecordset::IsOpen() const
{ ASSERT_VALID(this); return m_bOpen; }
#endif // _AFXDAOCORE_INLINE
#ifdef _AFXDAODFX_INLINE
// CDaoFieldExchange
_AFXDAODFX_INLINE void CDaoFieldExchange::SetFieldType(UINT nFieldType)
{ ASSERT(nFieldType == outputColumn || nFieldType == param);
m_nFieldType = nFieldType; }
#endif // _AFXDAODFX_INLINE
#ifdef _AFXDAOVIEW_INLINE
// CDaoRecordView inlines
_AFXDAOVIEW_INLINE void CDaoRecordView::OnUpdateRecordFirst(CCmdUI* pCmdUI)
{ ASSERT_VALID(this);
pCmdUI->Enable(m_nStatus & AFX_DAOVIEW_SCROLL_BACKWARD); }
_AFXDAOVIEW_INLINE void CDaoRecordView::OnUpdateRecordNext(CCmdUI* pCmdUI)
{ ASSERT_VALID(this);
pCmdUI->Enable(m_nStatus & AFX_DAOVIEW_SCROLL_NEXT); }
_AFXDAOVIEW_INLINE void CDaoRecordView::OnUpdateRecordPrev(CCmdUI* pCmdUI)
{ ASSERT_VALID(this);
pCmdUI->Enable(m_nStatus & AFX_DAOVIEW_SCROLL_BACKWARD); }
_AFXDAOVIEW_INLINE void CDaoRecordView::OnUpdateRecordLast(CCmdUI* pCmdUI)
{ ASSERT_VALID(this);
pCmdUI->Enable(m_nStatus & AFX_DAOVIEW_SCROLL_LAST); }
_AFXDAOVIEW_INLINE void CDaoRecordView::OnMove(int cx, int cy)
{ CFormView::OnMove(cx, cy); }
#endif // _AFXDAOVIEW_INLINE
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,113 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXDB.H
/////////////////////////////////////////////////////////////////////////////
// General database inlines
#ifdef _AFXDBCORE_INLINE
// CDatabase inlines
_AFXDBCORE_INLINE BOOL CDatabase::IsOpen() const
{ ASSERT_VALID(this); return m_hdbc != SQL_NULL_HDBC; }
_AFXDBCORE_INLINE BOOL CDatabase::CanUpdate() const
{ ASSERT(IsOpen()); return m_bUpdatable; }
_AFXDBCORE_INLINE BOOL CDatabase::CanTransact() const
{ ASSERT(IsOpen()); return m_bTransactions; }
_AFXDBCORE_INLINE void CDatabase::SetLoginTimeout(DWORD dwSeconds)
{ ASSERT_VALID(this); m_dwLoginTimeout = dwSeconds; }
_AFXDBCORE_INLINE void CDatabase::SetQueryTimeout(DWORD dwSeconds)
{ ASSERT_VALID(this); m_dwQueryTimeout = dwSeconds; }
_AFXDBCORE_INLINE const CString& CDatabase::GetConnect() const
{ ASSERT_VALID(this); return m_strConnect; }
_AFXDBCORE_INLINE DWORD CDatabase::GetBookmarkPersistence() const
{ ASSERT_VALID(this); return m_dwBookmarkAttributes; }
_AFXDBCORE_INLINE int CDatabase::GetCursorCommitBehavior() const
{ ASSERT_VALID(this); return m_nCursorCommitBehavior; }
_AFXDBCORE_INLINE int CDatabase::GetCursorRollbackBehavior() const
{ ASSERT_VALID(this); return m_nCursorRollbackBehavior; }
_AFXDBCORE_INLINE void CDatabase::ThrowDBException(RETCODE nRetCode)
{ ASSERT_VALID(this); AfxThrowDBException(nRetCode, this, m_hstmt); }
_AFXDBCORE_INLINE void CDatabase::SetSynchronousMode(BOOL /* bSynchronous */ )
{ ASSERT_VALID(this); TRACE0("Error: SetSynchronousMode is obsolete and has not effect.\n"); }
// CRecordset inlines
_AFXDBCORE_INLINE const CString& CRecordset::GetSQL() const
{ ASSERT(IsOpen()); return m_strSQL; }
_AFXDBCORE_INLINE const CString& CRecordset::GetTableName() const
{ ASSERT(IsOpen()); return m_strTableName; }
_AFXDBCORE_INLINE BOOL CRecordset::IsBOF() const
{ ASSERT(IsOpen()); return m_bBOF; }
_AFXDBCORE_INLINE BOOL CRecordset::IsEOF() const
{ ASSERT(IsOpen()); return m_bEOF; }
_AFXDBCORE_INLINE BOOL CRecordset::IsDeleted() const
{ ASSERT(IsOpen()); return m_bDeleted; }
_AFXDBCORE_INLINE BOOL CRecordset::CanUpdate() const
{ ASSERT(IsOpen()); return m_bUpdatable; }
_AFXDBCORE_INLINE BOOL CRecordset::CanScroll() const
{ ASSERT(IsOpen()); return m_bScrollable; }
_AFXDBCORE_INLINE BOOL CRecordset::CanAppend() const
{ ASSERT(IsOpen()); return m_bAppendable; }
_AFXDBCORE_INLINE BOOL CRecordset::CanRestart() const
{ ASSERT(IsOpen()); return !(m_dwOptions & executeDirect); }
_AFXDBCORE_INLINE BOOL CRecordset::CanTransact() const
{ ASSERT(m_pDatabase->IsOpen());
return m_pDatabase->m_bTransactions; }
_AFXDBCORE_INLINE short CRecordset::GetODBCFieldCount() const
{ ASSERT(IsOpen()); return m_nResultCols; }
_AFXDBCORE_INLINE DWORD CRecordset::GetRowsetSize() const
{ ASSERT(IsOpen()); return m_dwRowsetSize; }
_AFXDBCORE_INLINE DWORD CRecordset::GetRowsFetched() const
{ ASSERT(IsOpen()); return m_dwRowsFetched; }
_AFXDBCORE_INLINE WORD CRecordset::GetRowStatus(WORD wRow) const
{ ASSERT(IsOpen()); ASSERT(wRow > 0); return m_rgRowStatus[wRow-1]; }
_AFXDBCORE_INLINE long CRecordset::GetRecordCount() const
{ ASSERT(IsOpen()); return m_lRecordCount; }
_AFXDBCORE_INLINE void CRecordset::GetStatus(CRecordsetStatus& rStatus) const
{ ASSERT(IsOpen());
rStatus.m_lCurrentRecord = m_lCurrentRecord;
rStatus.m_bRecordCountFinal = m_bEOFSeen; }
_AFXDBCORE_INLINE void CRecordset::ThrowDBException(RETCODE nRetCode, HSTMT hstmt)
{ ASSERT_VALID(this); AfxThrowDBException(nRetCode, m_pDatabase,
(hstmt == SQL_NULL_HSTMT)? m_hstmt : hstmt); }
_AFXDBCORE_INLINE void CRecordset::MoveNext()
{ ASSERT(IsOpen()); Move(1, SQL_FETCH_NEXT); }
_AFXDBCORE_INLINE void CRecordset::MovePrev()
{ ASSERT(IsOpen()); Move(-1, SQL_FETCH_PRIOR); }
_AFXDBCORE_INLINE void CRecordset::MoveFirst()
{ ASSERT(IsOpen()); Move(1, SQL_FETCH_FIRST); }
_AFXDBCORE_INLINE void CRecordset::MoveLast()
{ ASSERT(IsOpen()); Move(-1, SQL_FETCH_LAST); }
_AFXDBCORE_INLINE void CRecordset::SetAbsolutePosition(long nRows)
{ ASSERT(IsOpen()); Move(nRows, SQL_FETCH_ABSOLUTE); }
#endif //_AFXDBCORE_INLINE
#ifdef _AFXDBRFX_INLINE
_AFXDBRFX_INLINE void CFieldExchange::SetFieldType(UINT nFieldType)
{ ASSERT(nFieldType == outputColumn ||
nFieldType == inputParam ||
nFieldType == outputParam ||
nFieldType == inoutParam);
m_nFieldType = nFieldType; }
#endif //_AFXDBRFX_INLINE
#ifdef _AFXDBVIEW_INLINE
// CRecordView inlines
_AFXDBVIEW_INLINE void CRecordView::OnMove(int cx, int cy)
{ CFormView::OnMove(cx, cy); }
#endif
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,105 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXDB_RC__
#define __AFXDB_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// Database Resources
// Database strings
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_SQL_CONNECT_FAIL
"Attempt to connect to datasource failed"
AFX_IDP_SQL_RECORDSET_FORWARD_ONLY
"Recordset supports forward movement only."
AFX_IDP_SQL_EMPTY_COLUMN_LIST
"Attempt to open a table failed - there were no columns to retrieve were specified."
AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH
"Unexpected column data types were returned from query."
AFX_IDP_SQL_ILLEGAL_MODE "Attempt to Update or Delete failed."
AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED "Multiple rows were updated."
AFX_IDP_SQL_NO_CURRENT_RECORD "Operation failed, no current record."
AFX_IDP_SQL_NO_ROWS_AFFECTED
"No rows were affected by the update or delete operation."
AFX_IDP_SQL_RECORDSET_READONLY "Recordset is read-only"
AFX_IDP_SQL_SQL_NO_TOTAL
"ODBC driver doesn't support MFC LongBinary data model."
AFX_IDP_SQL_ODBC_LOAD_FAILED
"Attempt to load required component ODBC32.DLL failed."
AFX_IDP_SQL_DYNASET_NOT_SUPPORTED
"ODBC driver does not support dynasets."
AFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED
"ODBC static cursors required for snapshot support."
AFX_IDP_SQL_API_CONFORMANCE
"ODBC driver incompatible with MFC database classes (API_CONFORMANCE >= SQL_OAC_LEVEL1 required)."
AFX_IDP_SQL_SQL_CONFORMANCE
"ODBC driver incompatible with MFC database classes (SQL_CONFORMANCE >= SQL_OSC_MINIMUM required)."
AFX_IDP_SQL_NO_DATA_FOUND
"Attempt to scroll past end or before beginning of data."
AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED
"Dynasets not supported by ODBC driver."
AFX_IDP_SQL_ODBC_V2_REQUIRED
"ODBC Level 2 compliant driver required."
AFX_IDP_SQL_NO_POSITIONED_UPDATES
"Positioned updates not supported by ODBC driver."
AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED
"Requested lock mode is not supported."
AFX_IDP_SQL_DATA_TRUNCATED
"Data truncated."
AFX_IDP_SQL_ROW_FETCH
"Error retrieving record."
AFX_IDP_SQL_INCORRECT_ODBC
"A required ODBC entry point was not found. Make sure ODBC is installed correctly."
AFX_IDP_SQL_UPDATE_DELETE_FAILED
"Update or Delete failed."
AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED
"Dynamic cursors not supported by ODBC driver."
AFX_IDP_SQL_FIELD_NOT_FOUND
"Invalid field name or field index."
AFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED
"Bookmarks not supported for ODBC driver."
AFX_IDP_SQL_BOOKMARKS_NOT_ENABLED
"Bookmarks not enabled on recordset."
AFX_IDP_DAO_ENGINE_INITIALIZATION
"Unable to initialize DAO/Jet db engine."
AFX_IDP_DAO_DFX_BIND
"Bad DFX value parameter."
AFX_IDP_DAO_OBJECT_NOT_OPEN
"DAO TableDef or QueryDef not Open."
AFX_IDP_DAO_ROWTOOSHORT
"GetRows failed. Not enough memory allocated for row."
AFX_IDP_DAO_BADBINDINFO
"GetRows binding error. Probably caused by datatype mismatch."
AFX_IDP_DAO_COLUMNUNAVAILABLE
"GetRows failed. The requested column is not a member of this recordset."
AFX_IDS_DELETED "<Deleted>"
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXDB_RC__
@@ -0,0 +1,74 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Do not include this file directly (included by AFXDB.H & AFXDAO.H)
#ifndef __AFXDB__H__
#define __AFXDB__H__
//////////////////////////////////////////////////////////////////////////////
// Recordset Field exchange for ODBC & DAO classes (RFX_ and DFX_)
#define AFX_RFX_SHORT_PSEUDO_NULL (0x7EE4)
#define AFX_RFX_INT_PSEUDO_NULL (0x7EE4)
#define AFX_RFX_LONG_PSEUDO_NULL (0x4a4d4120L)
#define AFX_RFX_BYTE_PSEUDO_NULL 255
#define AFX_RFX_SINGLE_PSEUDO_NULL (-9.123e19f)
#define AFX_RFX_DOUBLE_PSEUDO_NULL (-9.123e19)
#define AFX_RFX_BOOL_PSEUDO_NULL 2
#define AFX_RFX_DATE_PSEUDO_NULL CTime(0)
#define AFX_RFX_TIMESTAMP_PSEUDO_NULL 99
#define AFX_RFX_NO_TYPE 0
#define AFX_RFX_BOOL 1
#define AFX_RFX_BYTE 2
#define AFX_RFX_INT 3
#define AFX_RFX_LONG 4
#define AFX_RFX_SINGLE 6
#define AFX_RFX_DOUBLE 7
#define AFX_RFX_DATE 8
#define AFX_RFX_BINARY 9
#define AFX_RFX_TEXT 10
#define AFX_RFX_LONGBINARY 11
#define AFX_RFX_SHORT 12
#define AFX_RFX_CURRENCY 13
#define AFX_RFX_OLEDATETIME 14
#define AFX_RFX_TIMESTAMP 15
#define AFX_RFX_OLEDATE 16
#define AFX_RFX_LPTSTR 17
//////////////////////////////////////////////////////////////////////////////
// CLongBinary - a Long (generally > 32k in length) Binary object
class CLongBinary : public CObject
{
DECLARE_DYNAMIC(CLongBinary)
// Constructors
public:
CLongBinary();
// Attributes
HGLOBAL m_hData;
DWORD m_dwDataLength;
// Implementation
public:
virtual ~CLongBinary();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif //_DEBUG
};
//////////////////////////////////////////////////////////////////////////////
#endif // __AFXDB__H__
@@ -0,0 +1,79 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Do not include this file directly (included by AFXWIN.H)
/////////////////////////////////////////////////////////////////////////////
// Standard Dialog Data Exchange routines
class COleCurrency; // forward reference (see afxdisp.h)
class COleDateTime; // forward reference (see afxdisp.h)
// simple text operations
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, BYTE& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, short& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, int& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, UINT& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, long& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, DWORD& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, CString& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, LPTSTR value, int nMaxLen);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, float& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, double& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, COleCurrency& value);
void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, COleDateTime& value);
// special control types
void AFXAPI DDX_Check(CDataExchange* pDX, int nIDC, int& value);
void AFXAPI DDX_Radio(CDataExchange* pDX, int nIDC, int& value);
void AFXAPI DDX_LBString(CDataExchange* pDX, int nIDC, CString& value);
void AFXAPI DDX_CBString(CDataExchange* pDX, int nIDC, CString& value);
void AFXAPI DDX_LBIndex(CDataExchange* pDX, int nIDC, int& index);
void AFXAPI DDX_CBIndex(CDataExchange* pDX, int nIDC, int& index);
void AFXAPI DDX_LBStringExact(CDataExchange* pDX, int nIDC, CString& value);
void AFXAPI DDX_CBStringExact(CDataExchange* pDX, int nIDC, CString& value);
void AFXAPI DDX_Scroll(CDataExchange* pDX, int nIDC, int& value);
void AFXAPI DDX_Slider(CDataExchange* pDX, int nIDC, int& value);
void AFXAPI DDX_MonthCalCtrl(CDataExchange* pDX, int nIDC, CTime& value);
void AFXAPI DDX_MonthCalCtrl(CDataExchange* pDX, int nIDC, COleDateTime& value);
void AFXAPI DDX_DateTimeCtrl(CDataExchange* pDX, int nIDC, CTime& value);
void AFXAPI DDX_DateTimeCtrl(CDataExchange* pDX, int nIDC, COleDateTime& value);
// for getting access to the actual controls
void AFXAPI DDX_Control(CDataExchange* pDX, int nIDC, CWnd& rControl);
/////////////////////////////////////////////////////////////////////////////
// Standard Dialog Data Validation routines
// range - value must be >= minVal and <= maxVal
// NOTE: you will require casts for 'minVal' and 'maxVal' to use the
// UINT, DWORD or float types
void AFXAPI DDV_MinMaxByte(CDataExchange* pDX, BYTE value, BYTE minVal, BYTE maxVal);
void AFXAPI DDV_MinMaxShort(CDataExchange* pDX, short value, short minVal, short maxVal);
void AFXAPI DDV_MinMaxInt(CDataExchange* pDX, int value, int minVal, int maxVal);
void AFXAPI DDV_MinMaxLong(CDataExchange* pDX, long value, long minVal, long maxVal);
void AFXAPI DDV_MinMaxUInt(CDataExchange* pDX, UINT value, UINT minVal, UINT maxVal);
void AFXAPI DDV_MinMaxDWord(CDataExchange* pDX, DWORD value, DWORD minVal, DWORD maxVal);
void AFXAPI DDV_MinMaxFloat(CDataExchange* pDX, float const& value, float minVal, float maxVal);
void AFXAPI DDV_MinMaxDouble(CDataExchange* pDX, double const& value, double minVal, double maxVal);
// special control types
void AFXAPI DDV_MinMaxSlider(CDataExchange* pDX, DWORD value, DWORD minVal, DWORD maxVal);
void AFXAPI DDV_MinMaxDateTime(CDataExchange* pDX, CTime& refValue, const CTime* refMinRange, const CTime* refMaxRange);
void AFXAPI DDV_MinMaxDateTime(CDataExchange* pDX, COleDateTime& refValue, const COleDateTime* refMinRange, const COleDateTime* refMaxRange);
void AFXAPI DDV_MinMaxMonth(CDataExchange* pDX, CTime& refValue, const CTime* pMinRange, const CTime* pMaxRange);
void AFXAPI DDV_MinMaxMonth(CDataExchange* pDX, COleDateTime& refValue, const COleDateTime* refMinRange, const COleDateTime* refMaxRange);
// number of characters
void AFXAPI DDV_MaxChars(CDataExchange* pDX, CString const& value, int nChars);
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,785 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXDLGS_H__
#define __AFXDLGS_H__
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifndef _INC_COMMDLG
#include <commdlg.h> // common dialog APIs
#endif
// Avoid mapping GetFileTitle to GetFileTitle[A/W]
#ifdef GetFileTitle
#undef GetFileTitle
AFX_INLINE short APIENTRY GetFileTitle(LPCTSTR lpszFile, LPTSTR lpszTitle, WORD cbBuf)
#ifdef UNICODE
{ return ::GetFileTitleW(lpszFile, lpszTitle, cbBuf); }
#else
{ return ::GetFileTitleA(lpszFile, lpszTitle, cbBuf); }
#endif
#endif
#ifndef _AFX_NO_RICHEDIT_SUPPORT
#ifndef _RICHEDIT_
#include <richedit.h>
#endif
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifndef _AFX_NOFORCE_LIBS
/////////////////////////////////////////////////////////////////////////////
// Win32 libraries
#endif //!_AFX_NOFORCE_LIBS
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXDLGS - MFC Standard dialogs
// Classes declared in this file
// CDialog
class CCommonDialog; // implementation base class
// modeless dialogs
class CFindReplaceDialog; // Find/FindReplace dialog
// modal dialogs
class CFileDialog; // FileOpen/FileSaveAs dialogs
class CColorDialog; // Color picker dialog
class CFontDialog; // Font chooser dialog
class CPrintDialog; // Print/PrintSetup dialogs
class CPageSetupDialog; // Page Setup dialog
// CWnd
class CPropertySheet; // implements tabbed dialogs
class CPropertySheetEx;
// CDialog
class CPropertyPage; // Used with CPropertySheet for tabbed dialogs
class CPropertyPageEx;
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// CCommonDialog - base class for all common dialogs
#ifdef _AFXDLL
class CCommonDialog : public CDialog
#else
class AFX_NOVTABLE CCommonDialog : public CDialog
#endif
{
public:
CCommonDialog(CWnd* pParentWnd);
// Implementation
protected:
virtual void OnOK();
virtual void OnCancel();
//{{AFX_MSG(CCommonDialog)
afx_msg BOOL OnHelpInfo(HELPINFO*);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CFileDialog - used for FileOpen... or FileSaveAs...
class CFileDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CFileDialog)
public:
// Attributes
OPENFILENAME m_ofn; // open file parameter block
// Constructors
CFileDialog(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);
// Operations
virtual int DoModal();
// Helpers for parsing file name after successful return
// or during Overridable callbacks if OFN_EXPLORER is set
CString GetPathName() const; // return full path and filename
CString GetFileName() const; // return only filename
CString GetFileExt() const; // return only ext
CString GetFileTitle() const; // return file title
BOOL GetReadOnlyPref() const; // return TRUE if readonly checked
// Enumerating multiple file selections
POSITION GetStartPosition() const;
CString GetNextPathName(POSITION& pos) const;
// Helpers for custom templates
void SetTemplate(UINT nWin3ID, UINT nWin4ID);
void SetTemplate(LPCTSTR lpWin3ID, LPCTSTR lpWin4ID);
// Other operations available while the dialog is visible
CString GetFolderPath() const; // return full path
void SetControlText(int nID, LPCSTR lpsz);
void HideControl(int nID);
void SetDefExt(LPCSTR lpsz);
// Overridable callbacks
protected:
friend UINT CALLBACK _AfxCommDlgProc(HWND, UINT, WPARAM, LPARAM);
virtual UINT OnShareViolation(LPCTSTR lpszPathName);
virtual BOOL OnFileNameOK();
virtual void OnLBSelChangedNotify(UINT nIDBox, UINT iCurSel, UINT nCode);
// only called back if OFN_EXPLORER is set
virtual void OnInitDone();
virtual void OnFileNameChange();
virtual void OnFolderChange();
virtual void OnTypeChange();
// Implementation
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
BOOL m_bOpenFileDialog; // TRUE for file open, FALSE for file save
CString m_strFilter; // filter string
// separate fields with '|', terminate with '||\0'
TCHAR m_szFileTitle[64]; // contains file title after return
TCHAR m_szFileName[_MAX_PATH]; // contains full path name after return
OPENFILENAME* m_pofnTemp;
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
};
/////////////////////////////////////////////////////////////////////////////
// CFontDialog - used to select a font
class CFontDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CFontDialog)
public:
// Attributes
// font choosing parameter block
CHOOSEFONT m_cf;
// Constructors
CFontDialog(LPLOGFONT lplfInitial = NULL,
DWORD dwFlags = CF_EFFECTS | CF_SCREENFONTS,
CDC* pdcPrinter = NULL,
CWnd* pParentWnd = NULL);
#ifndef _AFX_NO_RICHEDIT_SUPPORT
CFontDialog(const CHARFORMAT& charformat,
DWORD dwFlags = CF_SCREENFONTS,
CDC* pdcPrinter = NULL,
CWnd* pParentWnd = NULL);
#endif
// Operations
virtual int DoModal();
// Get the selected font (works during DoModal displayed or after)
void GetCurrentFont(LPLOGFONT lplf);
// Helpers for parsing information after successful return
CString GetFaceName() const; // return the face name of the font
CString GetStyleName() const; // return the style name of the font
int GetSize() const; // return the pt size of the font
COLORREF GetColor() const; // return the color of the font
int GetWeight() const; // return the chosen font weight
BOOL IsStrikeOut() const; // return TRUE if strikeout
BOOL IsUnderline() const; // return TRUE if underline
BOOL IsBold() const; // return TRUE if bold font
BOOL IsItalic() const; // return TRUE if italic font
#ifndef _AFX_NO_RICHEDIT_SUPPORT
void GetCharFormat(CHARFORMAT& cf) const;
#endif
// Implementation
LOGFONT m_lf; // default LOGFONT to store the info
#ifndef _AFX_NO_RICHEDIT_SUPPORT
DWORD FillInLogFont(const CHARFORMAT& cf);
#endif
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
TCHAR m_szStyleName[64]; // contains style name after return
};
/////////////////////////////////////////////////////////////////////////////
// CColorDialog - used to select a color
class CColorDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CColorDialog)
public:
// Attributes
// color chooser parameter block
CHOOSECOLOR m_cc;
// Constructors
CColorDialog(COLORREF clrInit = 0, DWORD dwFlags = 0,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// Set the current color while dialog is displayed
void SetCurrentColor(COLORREF clr);
// Helpers for parsing information after successful return
COLORREF GetColor() const;
static COLORREF* PASCAL GetSavedCustomColors();
// Overridable callbacks
protected:
friend UINT CALLBACK _AfxCommDlgProc(HWND, UINT, WPARAM, LPARAM);
virtual BOOL OnColorOK(); // validate color
// Implementation
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
#ifndef _AFX_NO_GRAYDLG_SUPPORT
protected:
//{{AFX_MSG(CColorDialog)
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
#endif //!_AFX_NO_GRAYDLG_SUPPORT
};
// for backward compatibility clrSavedCustom is defined as GetSavedCustomColors
#define clrSavedCustom GetSavedCustomColors()
/////////////////////////////////////////////////////////////////////////////
// Page Setup dialog
class CPageSetupDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CPageSetupDialog)
public:
// Attributes
PAGESETUPDLG m_psd;
// Constructors
CPageSetupDialog(DWORD dwFlags = PSD_MARGINS | PSD_INWININIINTLMEASURE,
CWnd* pParentWnd = NULL);
// Attributes
LPDEVMODE GetDevMode() const; // return DEVMODE
CString GetDriverName() const; // return driver name
CString GetDeviceName() const; // return device name
CString GetPortName() const; // return output port name
HDC CreatePrinterDC();
CSize GetPaperSize() const;
void GetMargins(LPRECT lpRectMargins, LPRECT lpRectMinMargins) const;
// Operations
virtual int DoModal();
// Overridables
virtual UINT PreDrawPage(WORD wPaper, WORD wFlags, LPPAGESETUPDLG pPSD);
virtual UINT OnDrawPage(CDC* pDC, UINT nMessage, LPRECT lpRect);
// Implementation
protected:
static UINT CALLBACK PaintHookProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam);
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// CPrintDialog - used for Print... and PrintSetup...
class CPrintDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CPrintDialog)
public:
// Attributes
// print dialog parameter block (note this is a reference)
PRINTDLG& m_pd;
// Constructors
CPrintDialog(BOOL bPrintSetupOnly,
// TRUE for Print Setup, FALSE for Print Dialog
DWORD dwFlags = PD_ALLPAGES | PD_USEDEVMODECOPIES | PD_NOPAGENUMS
| PD_HIDEPRINTTOFILE | PD_NOSELECTION,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// GetDefaults will not display a dialog but will get
// device defaults
BOOL GetDefaults();
// Helpers for parsing information after successful return
int GetCopies() const; // num. copies requested
BOOL PrintCollate() const; // TRUE if collate checked
BOOL PrintSelection() const; // TRUE if printing selection
BOOL PrintAll() const; // TRUE if printing all pages
BOOL PrintRange() const; // TRUE if printing page range
int GetFromPage() const; // starting page if valid
int GetToPage() const; // starting page if valid
LPDEVMODE GetDevMode() const; // return DEVMODE
CString GetDriverName() const; // return driver name
CString GetDeviceName() const; // return device name
CString GetPortName() const; // return output port name
HDC GetPrinterDC() const; // return HDC (caller must delete)
// This helper creates a DC based on the DEVNAMES and DEVMODE structures.
// This DC is returned, but also stored in m_pd.hDC as though it had been
// returned by CommDlg. It is assumed that any previously obtained DC
// has been/will be deleted by the user. This may be
// used without ever invoking the print/print setup dialogs.
HDC CreatePrinterDC();
// Implementation
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
private:
PRINTDLG m_pdActual; // the Print/Print Setup need to share this
protected:
// The following handle the case of print setup... from the print dialog
CPrintDialog(PRINTDLG& pdInit);
virtual CPrintDialog* AttachOnSetup();
//{{AFX_MSG(CPrintDialog)
afx_msg void OnPrintSetup();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// Find/FindReplace modeless dialogs
class CFindReplaceDialog : public CCommonDialog
{
DECLARE_DYNAMIC(CFindReplaceDialog)
public:
// Attributes
FINDREPLACE m_fr;
// Constructors
CFindReplaceDialog();
// Note: you must allocate these on the heap.
// If you do not, you must derive and override PostNcDestroy()
BOOL Create(BOOL bFindDialogOnly, // TRUE for Find, FALSE for FindReplace
LPCTSTR lpszFindWhat,
LPCTSTR lpszReplaceWith = NULL,
DWORD dwFlags = FR_DOWN,
CWnd* pParentWnd = NULL);
// find/replace parameter block
static CFindReplaceDialog* PASCAL GetNotifier(LPARAM lParam);
// Operations
// Helpers for parsing information after successful return
CString GetReplaceString() const;// get replacement string
CString GetFindString() const; // get find string
BOOL SearchDown() const; // TRUE if search down, FALSE is up
BOOL FindNext() const; // TRUE if command is find next
BOOL MatchCase() const; // TRUE if matching case
BOOL MatchWholeWord() const; // TRUE if matching whole words only
BOOL ReplaceCurrent() const; // TRUE if replacing current string
BOOL ReplaceAll() const; // TRUE if replacing all occurrences
BOOL IsTerminating() const; // TRUE if terminating dialog
// Implementation
protected:
virtual void PostNcDestroy();
#ifdef _DEBUG
public:
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
TCHAR m_szFindWhat[128];
TCHAR m_szReplaceWith[128];
};
////////////////////////////////////////////////////////////////////////////
// CPropertyPage -- one page of a tabbed dialog
// MFC needs to use the original Win95 version of the PROPSHEETPAGE structure.
typedef struct _AFX_OLDPROPSHEETPAGE {
DWORD dwSize;
DWORD dwFlags;
HINSTANCE hInstance;
union {
LPCTSTR pszTemplate;
#ifdef _WIN32
LPCDLGTEMPLATE pResource;
#else
const VOID FAR *pResource;
#endif
} DUMMYUNIONNAME;
union {
HICON hIcon;
LPCSTR pszIcon;
} DUMMYUNIONNAME2;
LPCTSTR pszTitle;
DLGPROC pfnDlgProc;
LPARAM lParam;
LPFNPSPCALLBACK pfnCallback;
UINT FAR * pcRefParent;
} AFX_OLDPROPSHEETPAGE;
// same goes for PROPSHEETHEADER
typedef struct _AFX_OLDPROPSHEETHEADER {
DWORD dwSize;
DWORD dwFlags;
HWND hwndParent;
HINSTANCE hInstance;
union {
HICON hIcon;
LPCTSTR pszIcon;
}DUMMYUNIONNAME;
LPCTSTR pszCaption;
UINT nPages;
union {
UINT nStartPage;
LPCTSTR pStartPage;
}DUMMYUNIONNAME2;
union {
LPCPROPSHEETPAGE ppsp;
HPROPSHEETPAGE FAR *phpage;
}DUMMYUNIONNAME3;
PFNPROPSHEETCALLBACK pfnCallback;
} AFX_OLDPROPSHEETHEADER;
class CPropertyPage : public CDialog
{
DECLARE_DYNAMIC(CPropertyPage)
// Construction
public:
CPropertyPage();
CPropertyPage(UINT nIDTemplate, UINT nIDCaption = 0);
CPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
void Construct(UINT nIDTemplate, UINT nIDCaption = 0);
void Construct(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
// Attributes
AFX_OLDPROPSHEETPAGE m_psp;
// Operations
void CancelToClose();
void SetModified(BOOL bChanged = TRUE);
LRESULT QuerySiblings(WPARAM wParam, LPARAM lParam);
// Overridables
public:
virtual BOOL OnApply();
virtual void OnReset();
virtual void OnOK();
virtual void OnCancel();
virtual BOOL OnSetActive();
virtual BOOL OnKillActive();
virtual BOOL OnQueryCancel();
virtual LRESULT OnWizardBack();
virtual LRESULT OnWizardNext();
virtual BOOL OnWizardFinish();
// Implementation
public:
virtual ~CPropertyPage();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
void EndDialog(int nEndID); // called for error scenarios
protected:
// private implementation data
CString m_strCaption;
BOOL m_bFirstSetActive;
// implementation helpers
void CommonConstruct(LPCTSTR lpszTemplateName, UINT nIDCaption);
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual BOOL PreTranslateMessage(MSG*);
LRESULT MapWizardResult(LRESULT lToMap);
BOOL IsButtonEnabled(int iButton);
void PreProcessPageTemplate(PROPSHEETPAGE& psp, BOOL bWizard);
#ifndef _AFX_NO_OCC_SUPPORT
void Cleanup();
const DLGTEMPLATE* InitDialogInfo(const DLGTEMPLATE* pTemplate);
#endif
// Generated message map functions
//{{AFX_MSG(CPropertyPage)
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
friend class CPropertySheet;
friend class CPropertySheetEx;
};
class CPropertyPageEx : public CPropertyPage
{
DECLARE_DYNAMIC(CPropertyPageEx)
// Construction
public:
CPropertyPageEx();
CPropertyPageEx(UINT nIDTemplate, UINT nIDCaption = 0,
UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0);
CPropertyPageEx(LPCTSTR lpszTemplateName, UINT nIDCaption = 0,
UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0);
void Construct(UINT nIDTemplate, UINT nIDCaption = 0,
UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0);
void Construct(LPCTSTR lpszTemplateName, UINT nIDCaption = 0,
UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0);
// Implementation
public:
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// private implementation data
CString m_strHeaderTitle; // this is displayed in the header
CString m_strHeaderSubTitle; //
// implementation helpers
void CommonConstruct(LPCTSTR lpszTemplateName, UINT nIDCaption,
UINT nIDHeaderTitle, UINT nIDHeaderSubTitle);
friend class CPropertySheet;
friend class CPropertySheetEx;
};
////////////////////////////////////////////////////////////////////////////
// CPropertySheet -- a tabbed "dialog" (really a popup-window)
class CTabCtrl; // forward reference (see afxcmn.h)
class CPropertySheet : public CWnd
{
DECLARE_DYNAMIC(CPropertySheet)
// Construction
public:
CPropertySheet();
CPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0);
CPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0);
void Construct(UINT nIDCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0);
void Construct(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0);
// for modeless creation
BOOL Create(CWnd* pParentWnd = NULL, DWORD dwStyle = (DWORD)-1,
DWORD dwExStyle = 0);
// the default style, expressed by passing -1 as dwStyle, is actually:
// WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME | DS_CONTEXT_HELP | WS_VISIBLE
// Attributes
public:
AFX_OLDPROPSHEETHEADER m_psh;
int GetPageCount() const;
CPropertyPage* GetActivePage() const;
int GetActiveIndex() const;
CPropertyPage* GetPage(int nPage) const;
int GetPageIndex(CPropertyPage* pPage);
BOOL SetActivePage(int nPage);
BOOL SetActivePage(CPropertyPage* pPage);
void SetTitle(LPCTSTR lpszText, UINT nStyle = 0);
CTabCtrl* GetTabControl() const;
void SetWizardMode();
void SetFinishText(LPCTSTR lpszText);
void SetWizardButtons(DWORD dwFlags);
void EnableStackedTabs(BOOL bStacked);
// Operations
public:
virtual int DoModal();
void AddPage(CPropertyPage* pPage);
void RemovePage(CPropertyPage* pPage);
void RemovePage(int nPage);
void EndDialog(int nEndID); // used to terminate a modal dialog
BOOL PressButton(int nButton);
// Implementation
public:
virtual ~CPropertySheet();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
void CommonConstruct(CWnd* pParentWnd, UINT iSelectPage);
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void BuildPropPageArray();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual BOOL OnInitDialog();
virtual BOOL ContinueModal();
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
AFX_OLDPROPSHEETHEADER* GetPropSheetHeader(); // should be virtual, but can't break binary compat yet
BOOL IsWizard() const;
protected:
CPtrArray m_pages; // array of CPropertyPage pointers
CString m_strCaption; // caption of the pseudo-dialog
CWnd* m_pParentWnd; // parent window of property sheet
BOOL m_bStacked; // EnableStackedTabs sets this
BOOL m_bModeless; // TRUE when Create called instead of DoModal
// Generated message map functions
//{{AFX_MSG(CPropertySheet)
afx_msg BOOL OnNcCreate(LPCREATESTRUCT);
afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg LRESULT OnCommandHelp(WPARAM, LPARAM);
afx_msg void OnClose();
afx_msg void OnSysCommand(UINT nID, LPARAM);
afx_msg LRESULT OnSetDefID(WPARAM, LPARAM);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
friend class CPropertyPage;
};
////////////////////////////////////////////////////////////////////////////
// CPropertySheetEx -- a tabbed "dialog" (really a popup-window), extended
// for IE4
class CPropertySheetEx : public CPropertySheet
{
DECLARE_DYNAMIC(CPropertySheetEx)
// Construction
public:
CPropertySheetEx();
CPropertySheetEx(UINT nIDCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0, HBITMAP hbmWatermark = NULL,
HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
CPropertySheetEx(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0, HBITMAP hbmWatermark = NULL,
HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
void Construct(UINT nIDCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0, HBITMAP hbmWatermark = NULL,
HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
void Construct(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
UINT iSelectPage = 0, HBITMAP hbmWatermark = NULL,
HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
// Attributes
public:
PROPSHEETHEADER m_psh;
// Operations
public:
void AddPage(CPropertyPageEx* pPage);
// Implementation
public:
virtual ~CPropertySheetEx();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
void CommonConstruct(CWnd* pParentWnd, UINT iSelectPage,
HBITMAP hbmWatermark, HPALETTE hpalWatermark, HBITMAP hbmHeader);
virtual void BuildPropPageArray();
void SetWizardMode();
friend class CPropertyPage;
friend class CPropertyPageEx;
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXDLGS_INLINE AFX_INLINE
#include <afxdlgs.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXDLGS_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,116 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXDLGS.H
#ifdef _AFXDLGS_INLINE
// CCommonDialog
_AFXDLGS_INLINE CCommonDialog::CCommonDialog(CWnd* pParentWnd)
: CDialog((UINT)0, pParentWnd) { }
// CFileDialog
_AFXDLGS_INLINE BOOL CFileDialog::GetReadOnlyPref() const
{ return m_ofn.Flags & OFN_READONLY ? TRUE : FALSE; }
_AFXDLGS_INLINE void CFileDialog::SetTemplate(UINT nWin3ID, UINT nWin4ID)
{ SetTemplate(MAKEINTRESOURCE(nWin3ID), MAKEINTRESOURCE(nWin4ID)); }
_AFXDLGS_INLINE POSITION CFileDialog::GetStartPosition() const
{ return (POSITION)m_ofn.lpstrFile; }
// CFontDialog
_AFXDLGS_INLINE CString CFontDialog::GetFaceName() const
{ return (LPCTSTR)m_cf.lpLogFont->lfFaceName; }
_AFXDLGS_INLINE CString CFontDialog::GetStyleName() const
{ return m_cf.lpszStyle; }
_AFXDLGS_INLINE int CFontDialog::GetSize() const
{ return m_cf.iPointSize; }
_AFXDLGS_INLINE int CFontDialog::GetWeight() const
{ return (int)m_cf.lpLogFont->lfWeight; }
_AFXDLGS_INLINE BOOL CFontDialog::IsItalic() const
{ return m_cf.lpLogFont->lfItalic ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFontDialog::IsStrikeOut() const
{ return m_cf.lpLogFont->lfStrikeOut ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFontDialog::IsBold() const
{ return m_cf.lpLogFont->lfWeight == FW_BOLD ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFontDialog::IsUnderline() const
{ return m_cf.lpLogFont->lfUnderline ? TRUE : FALSE; }
_AFXDLGS_INLINE COLORREF CFontDialog::GetColor() const
{ return m_cf.rgbColors; }
// CColorDialog
_AFXDLGS_INLINE COLORREF CColorDialog::GetColor() const
{ return m_cc.rgbResult; }
// CPrintDialog
_AFXDLGS_INLINE BOOL CPrintDialog::PrintSelection() const
{ return m_pd.Flags & PD_SELECTION ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CPrintDialog::PrintRange() const
{ return m_pd.Flags & PD_PAGENUMS ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CPrintDialog::PrintAll() const
{ return !PrintRange() && !PrintSelection() ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CPrintDialog::PrintCollate() const
{ return m_pd.Flags & PD_COLLATE ? TRUE : FALSE; }
_AFXDLGS_INLINE int CPrintDialog::GetFromPage() const
{ return (PrintRange() ? m_pd.nFromPage :-1); }
_AFXDLGS_INLINE int CPrintDialog::GetToPage() const
{ return (PrintRange() ? m_pd.nToPage :-1); }
_AFXDLGS_INLINE HDC CPrintDialog::GetPrinterDC() const
{ ASSERT_VALID(this);
ASSERT(m_pd.Flags & PD_RETURNDC);
return m_pd.hDC; }
// CFindReplaceDialog
_AFXDLGS_INLINE BOOL CFindReplaceDialog::IsTerminating() const
{ return m_fr.Flags & FR_DIALOGTERM ? TRUE : FALSE ; }
_AFXDLGS_INLINE CString CFindReplaceDialog::GetReplaceString() const
{ return m_fr.lpstrReplaceWith; }
_AFXDLGS_INLINE CString CFindReplaceDialog::GetFindString() const
{ return m_fr.lpstrFindWhat; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::SearchDown() const
{ return m_fr.Flags & FR_DOWN ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::FindNext() const
{ return m_fr.Flags & FR_FINDNEXT ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::MatchCase() const
{ return m_fr.Flags & FR_MATCHCASE ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::MatchWholeWord() const
{ return m_fr.Flags & FR_WHOLEWORD ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::ReplaceCurrent() const
{ return m_fr. Flags & FR_REPLACE ? TRUE : FALSE; }
_AFXDLGS_INLINE BOOL CFindReplaceDialog::ReplaceAll() const
{ return m_fr.Flags & FR_REPLACEALL ? TRUE : FALSE; }
// CPropertySheet
_AFXDLGS_INLINE CPropertyPage* CPropertySheet::GetPage(int nPage) const
{ return STATIC_DOWNCAST(CPropertyPage, (CObject*)m_pages[nPage]); }
_AFXDLGS_INLINE void CPropertySheet::SetWizardMode()
{ m_psh.dwFlags |= PSH_WIZARD; }
_AFXDLGS_INLINE void CPropertySheet::SetFinishText(LPCTSTR lpszText)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText); }
_AFXDLGS_INLINE void CPropertySheet::SetWizardButtons(DWORD dwFlags)
{ ASSERT(::IsWindow(m_hWnd)); ::PostMessage(m_hWnd, PSM_SETWIZBUTTONS, 0, dwFlags); }
_AFXDLGS_INLINE CTabCtrl* CPropertySheet::GetTabControl() const
{ ASSERT(::IsWindow(m_hWnd)); return (CTabCtrl*)CWnd::FromHandle(
(HWND)::SendMessage(m_hWnd, PSM_GETTABCONTROL, 0, 0)); }
_AFXDLGS_INLINE BOOL CPropertySheet::PressButton(int nButton)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, PSM_PRESSBUTTON, nButton, 0); }
_AFXDLGS_INLINE BOOL CPropertySheet::IsWizard() const
{ return ((((CPropertySheet*)this)->GetPropSheetHeader()->dwFlags & (PSH_WIZARD | PSH_WIZARD97)) != 0); }
// CPropertySheetEx
_AFXDLGS_INLINE void CPropertySheetEx::SetWizardMode()
{ m_psh.dwFlags |= PSH_WIZARD; }
// CPageSetupDialog
_AFXDLGS_INLINE CSize CPageSetupDialog::GetPaperSize() const
{ return CSize(m_psd.ptPaperSize.x, m_psd.ptPaperSize.y); }
/////////////////////////////////////////////////////////////////////////////
#endif //_AFXDLGS_INLINE
@@ -0,0 +1,68 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
/////////////////////////////////////////////////////////////////////////////
// AFXDLLX.H: Extra header for building an MFC Extension DLL
//
// This file is really a source file that you should include in the
// main source file of your DLL. It must only be included once, and
// not multiple times (you will get linker errors if it is included
// multiple times). If you do not use _AFXEXT, it is not required
// but you may want the feature it provides.
//
// Previous versions of 32-bit MFC did not require this file. This version
// requires this file to support dynamic loading of extension DLLs. In
// other words, if your application does LoadLibrary on any extension
// DLL (instead of binding to the DLL at link time), this file is
// required.
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
// The following symbol used to force inclusion of this module for _AFXEXT
#if defined(_X86_)
extern "C" { int _afxForceEXTDLL; }
#else
extern "C" { int __afxForceEXTDLL; }
#endif
/////////////////////////////////////////////////////////////////////////////
// RawDllMain that saves current app class list and factory list
extern "C" BOOL WINAPI ExtRawDllMain(HINSTANCE, DWORD dwReason, LPVOID);
extern "C" BOOL (WINAPI* _pRawDllMain)(HINSTANCE, DWORD, LPVOID) = &ExtRawDllMain;
extern "C"
BOOL WINAPI ExtRawDllMain(HINSTANCE, DWORD dwReason, LPVOID)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
// save critical data pointers before running the constructors
AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
pModuleState->m_pClassInit = pModuleState->m_classList;
pModuleState->m_pFactoryInit = pModuleState->m_factoryList;
pModuleState->m_classList.m_pHead = NULL;
pModuleState->m_factoryList.m_pHead = NULL;
}
return TRUE; // ok
}
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,106 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// afxdll_.h - extensions to AFXWIN.H used for the 'AFXDLL' version
// This file contains MFC library implementation details as well
// as APIs for writing MFC Extension DLLs.
// Please refer to Technical Note 033 (TN033) for more details.
/////////////////////////////////////////////////////////////////////////////
#ifndef _AFXDLL
#error file must be compiled with _AFXDLL
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// AFX_EXTENSION_MODULE - special struct used during DLL initialization
struct AFX_EXTENSION_MODULE
{
BOOL bInitialized;
HMODULE hModule;
HMODULE hResource;
CRuntimeClass* pFirstSharedClass;
COleObjectFactory* pFirstSharedFactory;
};
/////////////////////////////////////////////////////////////////////////////
// CDynLinkLibrary - for implementation of MFC Extension DLLs
class COleObjectFactory;
class CDynLinkLibrary : public CCmdTarget
{
DECLARE_DYNAMIC(CDynLinkLibrary)
public:
// Constructor
CDynLinkLibrary(AFX_EXTENSION_MODULE& state, BOOL bSystem = FALSE);
CDynLinkLibrary(HINSTANCE hModule, HINSTANCE hResource);
// Attributes
HMODULE m_hModule;
HMODULE m_hResource; // for shared resources
CTypedSimpleList<CRuntimeClass*> m_classList;
#ifndef _AFX_NO_OLE_SUPPORT
CTypedSimpleList<COleObjectFactory*> m_factoryList;
#endif
BOOL m_bSystem; // TRUE only for MFC DLLs
// Implementation
public:
CDynLinkLibrary* m_pNextDLL; // simple singly linked list
virtual ~CDynLinkLibrary();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif //_DEBUG
};
// call in every DLL_PROCESS_ATTACH
BOOL AFXAPI AfxInitExtensionModule(AFX_EXTENSION_MODULE&, HMODULE hMod);
// call on every DLL_PROCESS_DETACH
void AFXAPI AfxTermExtensionModule(AFX_EXTENSION_MODULE&, BOOL bAll = FALSE);
// special function(s) for stand-alone DLLs (and controls)
void AFXAPI AfxCoreInitModule();
#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
void AFXAPI AfxOleInitModule();
void AFXAPI AfxNetInitModule();
void AFXAPI AfxDbInitModule();
#else
#define AfxOleInitModule()
#define AfxNetInitModule()
#define AfxDbInitModule()
#endif
// special functions for loading and freeing MFC extension DLLs
// (necessary if your app is multithreaded and loads extension
// DLLs dynamically)
HINSTANCE AFXAPI AfxLoadLibrary(LPCTSTR lpszModuleName);
BOOL AFXAPI AfxFreeLibrary(HINSTANCE hInstLib);
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,395 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1996-1998 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 __AFXDOCOB_H__
#define __AFXDOCOB_H__
//WINBUG: these error codes are needed by MFC's IPrint implementation
// but aren't available in the SDK headers. Someday, these #define's
// can be removed.
#ifndef PRINT_E_CANCELLED
#define PRINT_E_CANCELLED 0x80040160L
#endif
#ifndef PRINT_E_NOSUCHPAGE
#define PRINT_E_NOSUCHPAGE 0x80040161L
#endif
#ifdef _AFX_NO_OLE_SUPPORT
#error OLE classes not supported in this library variant.
#endif
#ifndef __AFXOLE_H__
#include <afxole.h>
#endif
#ifndef __docobj_h__
#include <docobj.h> // defines Document Object interfaces
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
// AFXDLL support
#undef AFX_DATA
#define AFX_DATA AFX_OLE_DATA
/////////////////////////////////////////////////////////////////////////////
// AFXDOCOB.H - MFC OLE Document Object support
//CCmdUI
class COleCmdUI;
//CCmdTarg
class CDocObjectServer;
//COleIPFrameWnd
class COleDocIPFrameWnd;
/////////////////////////////////////////////////////////////////////////////
// COleCmdUI
class COleCmdUI : public CCmdUI
{
public:
COleCmdUI(OLECMD* rgCmds, ULONG cCmds, const GUID* m_pGroup);
virtual void Enable(BOOL bOn);
virtual void SetCheck(int nCheck);
virtual void SetText(LPCTSTR lpszText);
virtual BOOL DoUpdate(CCmdTarget* pTarget, BOOL bDisableIfNoHandler);
DWORD m_nCmdTextFlag;
protected:
OLECMD* m_rgCmds;
const GUID* m_pguidCmdGroup;
public:
CString m_strText;
friend class CCmdTarget;
};
#define ON_OLECMD(pguid, olecmdid, id) \
{ pguid, (ULONG)olecmdid, (UINT)id },
#define ON_OLECMD_OPEN() \
ON_OLECMD(NULL, OLECMDID_OPEN, ID_FILE_OPEN)
#define ON_OLECMD_NEW() \
ON_OLECMD(NULL, OLECMDID_NEW, ID_FILE_NEW)
#define ON_OLECMD_SAVE() \
ON_OLECMD(NULL, OLECMDID_SAVE, ID_FILE_SAVE)
#define ON_OLECMD_SAVE_AS() \
ON_OLECMD(NULL, OLECMDID_SAVEAS, ID_FILE_SAVE_AS)
#define ON_OLECMD_SAVE_COPY_AS() \
ON_OLECMD(NULL, OLECMDID_SAVECOPYAS, ID_FILE_SAVE_COPY_AS)
#define ON_OLECMD_PRINT() \
ON_OLECMD(NULL, OLECMDID_PRINT, ID_FILE_PRINT)
#define ON_OLECMD_PRINTPREVIEW() \
ON_OLECMD(NULL, OLECMDID_PRINTPREVIEW, ID_FILE_PRINT_PREVIEW)
#define ON_OLECMD_PAGESETUP() \
ON_OLECMD(NULL, OLECMDID_PAGESETUP, ID_FILE_PAGE_SETUP)
#define ON_OLECMD_CUT() \
ON_OLECMD(NULL, OLECMDID_CUT, ID_EDIT_CUT)
#define ON_OLECMD_COPY() \
ON_OLECMD(NULL, OLECMDID_COPY, ID_EDIT_COPY)
#define ON_OLECMD_PASTE() \
ON_OLECMD(NULL, OLECMDID_PASTE, ID_EDIT_PASTE)
#define ON_OLECMD_PASTESPECIAL() \
ON_OLECMD(NULL, OLECMDID_PASTESPECIAL, ID_EDIT_PASTE_SPECIAL)
#define ON_OLECMD_UNDO() \
ON_OLECMD(NULL, OLECMDID_UNDO, ID_EDIT_UNDO)
#define ON_OLECMD_REDO() \
ON_OLECMD(NULL, OLECMDID_REDO, ID_EDIT_REDO)
#define ON_OLECMD_SELECTALL() \
ON_OLECMD(NULL, OLECMDID_SELECTALL, ID_EDIT_SELECT_ALL)
#define ON_OLECMD_CLEARSELECTION() \
ON_OLECMD(NULL, OLECMDID_CLEARSELECTION, ID_EDIT_CLEAR)
/////////////////////////////////////////////////////////////////////////////
// CDocObjectServer class
class CDocObjectServer : public CCmdTarget
{
DECLARE_DYNAMIC(CDocObjectServer)
// Constructors
public:
CDocObjectServer(COleServerDoc* pOwner,
LPOLEDOCUMENTSITE pDocSite = NULL);
// Attributes
public:
// Operations
public:
void ActivateDocObject();
// Overridables
protected:
// Document Overridables
// View Overridables
virtual void OnApplyViewState(CArchive& ar);
virtual void OnSaveViewState(CArchive& ar);
virtual HRESULT OnActivateView();
// Implementation
public:
virtual ~CDocObjectServer();
void ReleaseDocSite();
void SetDocSite(LPOLEDOCUMENTSITE pNewSite);
COleDocIPFrameWnd* GetControllingFrame() const;
protected:
STDMETHODIMP OnExecOleCmd(const GUID* pguidCmdGroup,
DWORD nCmdID, DWORD nCmdExecOpt, VARIANTARG* pvarargIn,
VARIANTARG* pvarargOut);
BOOL DoPreparePrinting(CView* pView, CPrintInfo* printInfo);
void DoPrepareDC(CView* pView, CDC* pdcPrint, CPrintInfo* pprintInfo);
void DoPrint(CView* pView, CDC* pdcPrint, CPrintInfo* pprintInfo);
void DoBeginPrinting(CView* pView, CDC* pDC, CPrintInfo* pprintInfo);
void DoEndPrinting(CView* pView, CDC* pDC, CPrintInfo* pprintInfo);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Overrides
protected:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDocObjectServer)
public:
virtual void OnCloseDocument();
//}}AFX_VIRTUAL
// Implementation Data
protected:
// Document Data
LPOLEDOCUMENTSITE m_pDocSite;
COleServerDoc* m_pOwner;
// Print Data
LONG m_nFirstPage;
LPCONTINUECALLBACK m_pContinueCallback;
// View Data
LPOLEINPLACESITE m_pViewSite;
// Implementation Helpers
protected:
void OnSetItemRects(LPRECT lprcPosRect, LPRECT lprcClipRect);
// LPUNKNOWN GetInterfaceHook(const void* iid);
// Generated message map functions
protected:
//{{AFX_MSG(CDocObjectServer)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Interface Maps
public:
BEGIN_INTERFACE_PART(OleObject, IOleObject)
INIT_INTERFACE_PART(CDocObjServerDoc, DocOleObject)
STDMETHOD(SetClientSite)(LPOLECLIENTSITE);
STDMETHOD(GetClientSite)(LPOLECLIENTSITE*);
STDMETHOD(SetHostNames)(LPCOLESTR, LPCOLESTR);
STDMETHOD(Close)(DWORD);
STDMETHOD(SetMoniker)(DWORD, LPMONIKER);
STDMETHOD(GetMoniker)(DWORD, DWORD, LPMONIKER*);
STDMETHOD(InitFromData)(LPDATAOBJECT, BOOL, DWORD);
STDMETHOD(GetClipboardData)(DWORD, LPDATAOBJECT*);
STDMETHOD(DoVerb)(LONG, LPMSG, LPOLECLIENTSITE, LONG, HWND, LPCRECT);
STDMETHOD(EnumVerbs)(IEnumOLEVERB**);
STDMETHOD(Update)();
STDMETHOD(IsUpToDate)();
STDMETHOD(GetUserClassID)(CLSID*);
STDMETHOD(GetUserType)(DWORD, LPOLESTR*);
STDMETHOD(SetExtent)(DWORD, LPSIZEL);
STDMETHOD(GetExtent)(DWORD, LPSIZEL);
STDMETHOD(Advise)(LPADVISESINK, LPDWORD);
STDMETHOD(Unadvise)(DWORD);
STDMETHOD(EnumAdvise)(LPENUMSTATDATA*);
STDMETHOD(GetMiscStatus)(DWORD, LPDWORD);
STDMETHOD(SetColorScheme)(LPLOGPALETTE);
END_INTERFACE_PART(OleObject)
BEGIN_INTERFACE_PART(OleDocument, IOleDocument)
INIT_INTERFACE_PART(CDocObjectServer, OleDocument)
STDMETHOD(CreateView)(LPOLEINPLACESITE, LPSTREAM, DWORD, LPOLEDOCUMENTVIEW*);
STDMETHOD(GetDocMiscStatus)(LPDWORD);
STDMETHOD(EnumViews)(LPENUMOLEDOCUMENTVIEWS*, LPOLEDOCUMENTVIEW*);
END_INTERFACE_PART(OleDocument)
BEGIN_INTERFACE_PART(OleDocumentView, IOleDocumentView)
INIT_INTERFACE_PART(CDocObjectServer, OleDocumentView)
STDMETHOD(SetInPlaceSite)(LPOLEINPLACESITE);
STDMETHOD(GetInPlaceSite)(LPOLEINPLACESITE*);
STDMETHOD(GetDocument)(LPUNKNOWN*);
STDMETHOD(SetRect)(LPRECT);
STDMETHOD(GetRect)(LPRECT);
STDMETHOD(SetRectComplex)(LPRECT, LPRECT, LPRECT, LPRECT);
STDMETHOD(Show)(BOOL);
STDMETHOD(UIActivate)(BOOL);
STDMETHOD(Open)();
STDMETHOD(CloseView)(DWORD);
STDMETHOD(SaveViewState)(LPSTREAM);
STDMETHOD(ApplyViewState)(LPSTREAM);
STDMETHOD(Clone)(LPOLEINPLACESITE, LPOLEDOCUMENTVIEW*);
END_INTERFACE_PART(OleDocumentView)
BEGIN_INTERFACE_PART(OleCommandTarget, IOleCommandTarget)
INIT_INTERFACE_PART(CDocObjectServer, OleCommandTarget)
STDMETHOD(QueryStatus)(const GUID*, ULONG, OLECMD[], OLECMDTEXT*);
STDMETHOD(Exec)(const GUID*, DWORD, DWORD, VARIANTARG*, VARIANTARG*);
END_INTERFACE_PART(OleCommandTarget)
BEGIN_INTERFACE_PART(Print, IPrint)
INIT_INTERFACE_PART(CDocObjectServer, Print)
STDMETHOD(SetInitialPageNum)(LONG);
STDMETHOD(GetPageInfo)(LPLONG, LPLONG);
STDMETHOD(Print)(DWORD, DVTARGETDEVICE**, PAGESET**, LPSTGMEDIUM,
LPCONTINUECALLBACK, LONG, LPLONG, LPLONG);
END_INTERFACE_PART(Print)
DECLARE_INTERFACE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// COleDocIPFrameWnd class
class COleDocIPFrameWnd : public COleIPFrameWnd
{
DECLARE_DYNCREATE(COleDocIPFrameWnd)
// Constructors
public:
COleDocIPFrameWnd();
// Attributes
public:
// Operations
public:
// Overridables
protected:
// Implementation
public:
virtual ~COleDocIPFrameWnd();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COleDocIPFrameWnd)
//}}AFX_VIRTUAL
protected:
virtual void OnRequestPositionChange(LPCRECT lpRect);
virtual void RecalcLayout(BOOL bNotify = TRUE);
// Menu Merging support
HMENU m_hMenuHelpPopup;
virtual BOOL BuildSharedMenu();
virtual void DestroySharedMenu();
// Generated message map functions
//{{AFX_MSG(COleDocIPFrameWnd)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
class CDocObjectServerItem : public COleServerItem
{
DECLARE_DYNAMIC(CDocObjectServerItem)
// Constructors
protected:
CDocObjectServerItem(COleServerDoc* pServerDoc, BOOL bAutoDelete);
// Attributes
public:
COleServerDoc* GetDocument() const
{ return (COleServerDoc*) COleServerItem::GetDocument(); }
// Overridables
public:
// Implementation
public:
virtual ~CDocObjectServerItem();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Overrides
protected:
virtual void OnDoVerb(LONG iVerb);
virtual void OnHide();
virtual void OnOpen();
virtual void OnShow();
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDocObjectServerItem)
//}}AFX_VIRTUAL
};
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXDOCOB_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,161 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXDTCTL_H__
#define __AFXDTCTL_H__
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifndef __AFXDISP_H__
#include <afxdisp.h>
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
//CObject
class CImageList;
//CCmdTarget;
//CWnd
// class CListBox;
class CMonthCalCtrl;
class CDateTimeCtrl;
/////////////////////////////////////////////////////////////////////////////
// CDateTimeCtrl
class CDateTimeCtrl : public CWnd
{
DECLARE_DYNAMIC(CDateTimeCtrl)
// Constructors
CDateTimeCtrl();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
// Attributes
COLORREF GetMonthCalColor(int iColor) const;
COLORREF SetMonthCalColor(int iColor, COLORREF ref);
BOOL SetFormat(LPCTSTR pstrFormat);
CMonthCalCtrl* GetMonthCalCtrl() const;
CFont* GetMonthCalFont() const;
void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);
BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
// Operations
BOOL SetTime(const CTime* pTimeNew);
DWORD GetTime(CTime& timeDest) const;
BOOL SetTime(const COleDateTime& timeNew);
BOOL GetTime(COleDateTime& timeDest) const;
BOOL SetTime(LPSYSTEMTIME pTimeNew = NULL);
DWORD GetTime(LPSYSTEMTIME pTimeDest) const;
// Overridables
virtual ~CDateTimeCtrl();
};
/////////////////////////////////////////////////////////////////////////////
// CMonthCalCtrl
class CMonthCalCtrl : public CWnd
{
DECLARE_DYNAMIC(CMonthCalCtrl)
// Constructors
CMonthCalCtrl();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
BOOL Create(DWORD dwStyle, const POINT& pt, CWnd* pParentWnd, UINT nID);
//Attributes
BOOL GetMinReqRect(RECT* pRect) const;
int SetMonthDelta(int iDelta);
int GetMonthDelta() const;
BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);
int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;
COLORREF GetColor(int nRegion) const;
COLORREF SetColor(int nRegion, COLORREF ref);
DWORD HitTest(PMCHITTESTINFO pMCHitTest);
// Operations
BOOL SizeMinReq(BOOL bRepaint = TRUE);
void SetToday(const COleDateTime& refDateTime);
void SetToday(const CTime* pDateTime);
void SetToday(const LPSYSTEMTIME pDateTime);
BOOL GetToday(CTime& refTime) const;
BOOL GetToday(COleDateTime& refDateTime) const;
BOOL GetToday(LPSYSTEMTIME pDateTime) const;
BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;
BOOL SetCurSel(const LPSYSTEMTIME pDateTime);
BOOL SetCurSel(const CTime& refDateTime);
BOOL GetCurSel(CTime& refDateTime) const;
BOOL SetCurSel(const COleDateTime& refDateTime);
BOOL GetCurSel(COleDateTime& refDateTime) const;
BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);
BOOL SetMaxSelCount(int nMax);
int GetMaxSelCount() const;
BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);
DWORD GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
int GetMonthRange(COleDateTime& refMinRange, COleDateTime& refMaxRange,
DWORD dwFlags) const;
int GetMonthRange(CTime& refMinRange, CTime& refMaxRange,
DWORD dwFlags) const;
int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange,
DWORD dwFlags) const;
BOOL SetSelRange(const COleDateTime& pMinRange,
const COleDateTime& pMaxRange);
BOOL GetSelRange(COleDateTime& refMinRange,
COleDateTime& refMaxRange) const;
BOOL SetSelRange(const CTime& pMinRange, const CTime& pMaxRange);
BOOL GetSelRange(CTime& refMinRange, CTime& refMaxRange) const;
BOOL GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
BOOL SetSelRange(const LPSYSTEMTIME pMinRange,
const LPSYSTEMTIME pMaxRange);
// Overridables
virtual ~CMonthCalCtrl();
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXDTCTL_INLINE AFX_INLINE
#include <afxdtctl.inl>
#undef _AFXDTCTL_INLINE
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXDTCTL_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,65 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXDTCTL.H
/////////////////////////////////////////////////////////////////////////////
// Date/Time common control inlines
#ifdef _AFXDTCTL_INLINE
//CDateTimeCtrl
_AFXDTCTL_INLINE CDateTimeCtrl::CDateTimeCtrl()
{ }
_AFXDTCTL_INLINE CFont* CDateTimeCtrl::GetMonthCalFont() const
{ ASSERT(::IsWindow(m_hWnd)); return CFont::FromHandle((HFONT) ::SendMessage(m_hWnd, DTM_GETMCFONT, 0, 0)); }
_AFXDTCTL_INLINE CMonthCalCtrl* CDateTimeCtrl::GetMonthCalCtrl() const
{ ASSERT(::IsWindow(m_hWnd)); return (CMonthCalCtrl*) CWnd::FromHandle((HWND) ::SendMessage(m_hWnd, DTM_GETMONTHCAL, 0, 0)); }
_AFXDTCTL_INLINE void CDateTimeCtrl::SetMonthCalFont(HFONT hFont, BOOL bRedraw /* = TRUE */)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, DTM_SETMCFONT, (WPARAM) hFont, MAKELONG(bRedraw, 0)); }
_AFXDTCTL_INLINE COLORREF CDateTimeCtrl::SetMonthCalColor(int iColor, COLORREF ref)
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_SETMCCOLOR, (WPARAM) iColor, (LPARAM) ref); }
_AFXDTCTL_INLINE DWORD CDateTimeCtrl::GetTime(LPSYSTEMTIME pTimeDest) const
{ ASSERT(::IsWindow(m_hWnd)); ASSERT(pTimeDest != NULL); return (DWORD) ::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM) pTimeDest); }
_AFXDTCTL_INLINE COLORREF CDateTimeCtrl::GetMonthCalColor(int iColor) const
{ ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, DTM_GETMCCOLOR, (WPARAM) iColor, 0); }
_AFXDTCTL_INLINE BOOL CDateTimeCtrl::SetFormat(LPCTSTR pstrFormat)
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, DTM_SETFORMAT, 0, (LPARAM) pstrFormat); }
//CMonthCalCtrl
_AFXDTCTL_INLINE CMonthCalCtrl::CMonthCalCtrl()
{ }
_AFXDTCTL_INLINE DWORD CMonthCalCtrl::HitTest(PMCHITTESTINFO pMCHitTest)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, MCM_HITTEST, 0, (LPARAM) pMCHitTest); }
_AFXDTCTL_INLINE BOOL CMonthCalCtrl::GetMinReqRect(RECT* pRect) const
{ ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETMINREQRECT, 0, (LPARAM) pRect); }
_AFXDTCTL_INLINE int CMonthCalCtrl::SetMonthDelta(int iDelta)
{ ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_SETMONTHDELTA, (WPARAM) iDelta, 0); }
_AFXDTCTL_INLINE int CMonthCalCtrl::GetMonthDelta() const
{ ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMONTHDELTA, 0, 0); }
_AFXDTCTL_INLINE COLORREF CMonthCalCtrl::GetColor(int nRegion) const
{ ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_GETCOLOR, (WPARAM) nRegion, 0); }
_AFXDTCTL_INLINE COLORREF CMonthCalCtrl::SetColor(int nRegion, COLORREF ref)
{ ASSERT(m_hWnd != NULL); return (COLORREF) ::SendMessage(m_hWnd, MCM_SETCOLOR, (WPARAM) nRegion, (LPARAM) ref); }
_AFXDTCTL_INLINE BOOL CMonthCalCtrl::SetMaxSelCount(int nMax)
{ ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETMAXSELCOUNT, nMax, 0); }
_AFXDTCTL_INLINE int CMonthCalCtrl::GetMaxSelCount() const
{ ASSERT(m_hWnd != NULL); return (int) ::SendMessage(m_hWnd, MCM_GETMAXSELCOUNT, 0, 0); }
_AFXDTCTL_INLINE void CMonthCalCtrl::SetToday(const LPSYSTEMTIME pDateTime)
{ ASSERT(m_hWnd != NULL); ::SendMessage(m_hWnd, MCM_SETTODAY, 0, (LPARAM) pDateTime); }
_AFXDTCTL_INLINE BOOL CMonthCalCtrl::GetToday(LPSYSTEMTIME pDateTime) const
{ ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETTODAY, 0, (LPARAM) pDateTime); }
_AFXDTCTL_INLINE BOOL CMonthCalCtrl::SetCurSel(const LPSYSTEMTIME pDateTime)
{ ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_SETCURSEL, 0, (LPARAM) pDateTime); }
_AFXDTCTL_INLINE BOOL CMonthCalCtrl::GetCurSel(LPSYSTEMTIME pDateTime) const
{ ASSERT(m_hWnd != NULL); return (BOOL) ::SendMessage(m_hWnd, MCM_GETCURSEL, 0, (LPARAM) pDateTime); }
#endif //_AFXDTCTL_INLINE
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,142 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXEXT.H
#ifdef _AFXEXT_INLINE
// CCreateContext
_AFXEXT_INLINE CCreateContext::CCreateContext()
{ memset(this, 0, sizeof(*this)); }
// CMetaFileDC
_AFXEXT_INLINE BOOL CMetaFileDC::Create(LPCTSTR lpszFilename)
{ return Attach(::CreateMetaFile(lpszFilename)); }
_AFXEXT_INLINE HMETAFILE CMetaFileDC::Close()
{ return ::CloseMetaFile(Detach()); }
_AFXEXT_INLINE BOOL CMetaFileDC::CreateEnhanced(CDC* pDCRef,
LPCTSTR lpszFileName, LPCRECT lpBounds, LPCTSTR lpszDescription)
{ return Attach(::CreateEnhMetaFile(pDCRef->GetSafeHdc(),
lpszFileName, lpBounds, lpszDescription)); }
_AFXEXT_INLINE HENHMETAFILE CMetaFileDC::CloseEnhanced()
{ return ::CloseEnhMetaFile(Detach()); }
_AFXEXT_INLINE CPoint CMetaFileDC::SetViewportOrg(POINT point)
{ ASSERT(m_hDC != NULL); return SetViewportOrg(point.x, point.y); }
_AFXEXT_INLINE CSize CMetaFileDC::SetViewportExt(SIZE size)
{ ASSERT(m_hDC != NULL); return SetViewportExt(size.cx, size.cy); }
_AFXEXT_INLINE BOOL CMetaFileDC::TextOut(int x, int y, const CString& str)
{ ASSERT(m_hDC != NULL); return TextOut(x, y, (LPCTSTR)str, str.GetLength()); }
_AFXEXT_INLINE BOOL CMetaFileDC::ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
const CString& str, LPINT lpDxWidths)
{ ASSERT(m_hDC != NULL); return ::ExtTextOut(m_hDC, x, y, nOptions, lpRect,
str, str.GetLength(), lpDxWidths); }
_AFXEXT_INLINE CSize CMetaFileDC::TabbedTextOut(int x, int y, const CString& str,
int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
{ ASSERT(m_hDC != NULL); return ::TabbedTextOut(m_hDC, x, y, str, str.GetLength(),
nTabPositions, lpnTabStopPositions, nTabOrigin); }
_AFXEXT_INLINE int CMetaFileDC::DrawText(const CString& str, LPRECT lpRect, UINT nFormat)
{ ASSERT(m_hDC != NULL);
return DrawText((LPCTSTR)str, str.GetLength(), lpRect, nFormat); }
_AFXEXT_INLINE BOOL CMetaFileDC::PtVisible(POINT point) const
{ ASSERT(m_hDC != NULL); return PtVisible(point.x, point.y); }
// CSplitterWnd
_AFXEXT_INLINE int CSplitterWnd::GetRowCount() const
{ return m_nRows; }
_AFXEXT_INLINE int CSplitterWnd::GetColumnCount() const
{ return m_nCols; }
// obsolete functions
_AFXEXT_INLINE BOOL CSplitterWnd::IsChildPane(CWnd* pWnd, int& row, int& col)
{ return IsChildPane(pWnd, &row, &col); }
_AFXEXT_INLINE CWnd* CSplitterWnd::GetActivePane(int& row, int& col)
{ return GetActivePane(&row, &col); }
_AFXEXT_INLINE BOOL CSplitterWnd::IsTracking()
{ return m_bTracking; }
// CControlBar
_AFXEXT_INLINE int CControlBar::GetCount() const
{ return m_nCount; }
_AFXEXT_INLINE DWORD CControlBar::GetBarStyle()
{ return m_dwStyle; }
_AFXEXT_INLINE void CControlBar::SetBorders(LPCRECT lpRect)
{ SetBorders(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }
_AFXEXT_INLINE CRect CControlBar::GetBorders() const
{ return CRect(m_cxLeftBorder, m_cyTopBorder, m_cxRightBorder, m_cyBottomBorder); }
// CToolBar
_AFXEXT_INLINE BOOL CToolBar::LoadToolBar(UINT nIDResource)
{ return LoadToolBar(MAKEINTRESOURCE(nIDResource)); }
_AFXEXT_INLINE BOOL CToolBar::LoadBitmap(UINT nIDResource)
{ return LoadBitmap(MAKEINTRESOURCE(nIDResource)); }
_AFXEXT_INLINE CToolBarCtrl& CToolBar::GetToolBarCtrl() const
{ return *(CToolBarCtrl*)this; }
// CDialogBar
_AFXEXT_INLINE BOOL CDialogBar::Create(CWnd* pParentWnd, UINT nIDTemplate,
UINT nStyle, UINT nID)
{ return Create(pParentWnd, MAKEINTRESOURCE(nIDTemplate), nStyle, nID); }
// CStatusBar
_AFXEXT_INLINE CStatusBarCtrl& CStatusBar::GetStatusBarCtrl() const
{ return *(CStatusBarCtrl*)this; }
_AFXEXT_INLINE void CStatusBar::SetBorders(LPCRECT lpRect)
{ SetBorders(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }
_AFXEXT_INLINE void CStatusBar::SetBorders(int cxLeft, int cyTop, int cxRight, int cyBottom)
{ ASSERT(cyTop >= 2); CControlBar::SetBorders(cxLeft, cyTop, cxRight, cyBottom); }
#ifdef _DEBUG
// status bars do not support docking
_AFXEXT_INLINE void CStatusBar::EnableDocking(DWORD)
{ ASSERT(FALSE); }
#endif
// CReBar
_AFXEXT_INLINE CReBarCtrl& CReBar::GetReBarCtrl() const
{ return *(CReBarCtrl*)this; }
#ifdef _DEBUG
// rebars do not support docking
_AFXEXT_INLINE void CReBar::EnableDocking(DWORD)
{ ASSERT(FALSE); }
#endif
// CRectTracker
_AFXEXT_INLINE CRectTracker::CRectTracker()
{ Construct(); }
// CBitmapButton
_AFXEXT_INLINE CBitmapButton::CBitmapButton()
{ }
_AFXEXT_INLINE BOOL CBitmapButton::LoadBitmaps(UINT nIDBitmapResource,
UINT nIDBitmapResourceSel, UINT nIDBitmapResourceFocus,
UINT nIDBitmapResourceDisabled)
{ return LoadBitmaps(MAKEINTRESOURCE(nIDBitmapResource),
MAKEINTRESOURCE(nIDBitmapResourceSel),
MAKEINTRESOURCE(nIDBitmapResourceFocus),
MAKEINTRESOURCE(nIDBitmapResourceDisabled)); }
// CPrintInfo
_AFXEXT_INLINE void CPrintInfo::SetMinPage(UINT nMinPage)
{ m_pPD->m_pd.nMinPage = (WORD)nMinPage; }
_AFXEXT_INLINE void CPrintInfo::SetMaxPage(UINT nMaxPage)
{ m_pPD->m_pd.nMaxPage = (WORD)nMaxPage; }
_AFXEXT_INLINE UINT CPrintInfo::GetMinPage() const
{ return m_pPD->m_pd.nMinPage; }
_AFXEXT_INLINE UINT CPrintInfo::GetMaxPage() const
{ return m_pPD->m_pd.nMaxPage; }
_AFXEXT_INLINE UINT CPrintInfo::GetFromPage() const
{ return m_pPD->m_pd.nFromPage; }
_AFXEXT_INLINE UINT CPrintInfo::GetToPage() const
{ return m_pPD->m_pd.nToPage; }
// CEditView
_AFXEXT_INLINE CEdit& CEditView::GetEditCtrl() const
{ return *(CEdit*)this; }
#endif //_AFXEXT_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,283 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Non-Client HitTest help IDs
HID_HT_NOWHERE 0x40000
HID_HT_CAPTION 0x40002
HID_HT_SIZE 0x40004
HID_HT_HSCROLL 0x40006
HID_HT_VSCROLL 0x40007
HID_HT_MINBUTTON 0x40008
HID_HT_MAXBUTTON 0x40009
HID_HT_SIZE 0x4000A // alias: ID_HT_LEFT
HID_HT_SIZE 0x4000B // alias: ID_HT_RIGHT
HID_HT_SIZE 0x4000C // alias: ID_HT_TOP
HID_HT_SIZE 0x4000D // alias: ID_HT_TOPLEFT
HID_HT_SIZE 0x4000E // alias: ID_HT_TOPRIGHT
HID_HT_SIZE 0x4000F // alias: ID_HT_BOTTOM
HID_HT_SIZE 0x40010 // alias: ID_HT_BOTTOMLEFT
HID_HT_SIZE 0x40011 // alias: ID_HT_BOTTOMRIGHT
HID_HT_SIZE 0x40012 // alias: ID_HT_BORDER
HID_HT_OBJECT 0x40013
HID_HT_CLOSE 0x40014
HID_HT_HELP 0x40015
// WM_SYSCOMMAND help IDs
HID_SC_SIZE 0x1EF00
HID_SC_MOVE 0x1EF01
HID_SC_MINIMIZE 0x1EF02
HID_SC_MAXIMIZE 0x1EF03
HID_SC_NEXTWINDOW 0x1EF04
HID_SC_PREVWINDOW 0x1EF05
HID_SC_CLOSE 0x1EF06
HID_SC_RESTORE 0x1EF12
HID_SC_TASKLIST 0x1EF13
// File MRU and aliases
HID_FILE_MRU_FILE1 0x1E110
HID_FILE_MRU_FILE1 0x1E111 // aliases: MRU_2 - MRU_16
HID_FILE_MRU_FILE1 0x1E112
HID_FILE_MRU_FILE1 0x1E113
HID_FILE_MRU_FILE1 0x1E114
HID_FILE_MRU_FILE1 0x1E115
HID_FILE_MRU_FILE1 0x1E116
HID_FILE_MRU_FILE1 0x1E117
HID_FILE_MRU_FILE1 0x1E118
HID_FILE_MRU_FILE1 0x1E119
HID_FILE_MRU_FILE1 0x1E11A
HID_FILE_MRU_FILE1 0x1E11B
HID_FILE_MRU_FILE1 0x1E11C
HID_FILE_MRU_FILE1 0x1E11D
HID_FILE_MRU_FILE1 0x1E11E
HID_FILE_MRU_FILE1 0x1E11F
// Window menu list
HID_WINDOW_ALL 0x1EF1F
// OLE menu and aliases
HID_OLE_VERB_1 0x1E210
HID_OLE_VERB_1 0x1E211 // aliases: VERB_2 -> VERB_16
HID_OLE_VERB_1 0x1E212
HID_OLE_VERB_1 0x1E213
HID_OLE_VERB_1 0x1E214
HID_OLE_VERB_1 0x1E215
HID_OLE_VERB_1 0x1E216
HID_OLE_VERB_1 0x1E217
HID_OLE_VERB_1 0x1E218
HID_OLE_VERB_1 0x1E219
HID_OLE_VERB_1 0x1E21A
HID_OLE_VERB_1 0x1E21B
HID_OLE_VERB_1 0x1E21C
HID_OLE_VERB_1 0x1E21D
HID_OLE_VERB_1 0x1E21E
HID_OLE_VERB_1 0x1E21F
// Commands (HID_*)
HID_FILE_NEW 0x1E100
HID_FILE_OPEN 0x1E101
HID_FILE_CLOSE 0x1E102
HID_FILE_SAVE 0x1E103
HID_FILE_SAVE_AS 0x1E104
HID_FILE_PAGE_SETUP 0x1E105
HID_FILE_PRINT_SETUP 0x1E106
HID_FILE_PRINT 0x1E107
HID_FILE_PRINT_DIRECT 0x1E108
HID_FILE_PRINT_PREVIEW 0x1E109
HID_FILE_UPDATE 0x1E10A
HID_FILE_SAVE_COPY_AS 0x1E10B
HID_FILE_SEND_MAIL 0x1E10C
HID_EDIT_CLEAR 0x1E120
HID_EDIT_CLEAR_ALL 0x1E121
HID_EDIT_COPY 0x1E122
HID_EDIT_CUT 0x1E123
HID_EDIT_FIND 0x1E124
HID_EDIT_PASTE 0x1E125
HID_EDIT_PASTE_LINK 0x1E126
HID_EDIT_PASTE_SPECIAL 0x1E127
HID_EDIT_REPEAT 0x1E128
HID_EDIT_REPLACE 0x1E129
HID_EDIT_SELECT_ALL 0x1E12A
HID_EDIT_UNDO 0x1E12B
HID_EDIT_REDO 0x1E12C
HID_WINDOW_NEW 0x1E130
HID_WINDOW_ARRANGE 0x1E131
HID_WINDOW_CASCADE 0x1E132
HID_WINDOW_TILE_HORZ 0x1E133
HID_WINDOW_TILE_VERT 0x1E134
HID_WINDOW_SPLIT 0x1E135
HID_APP_ABOUT 0x1E140
HID_APP_EXIT 0x1E141
HID_HELP_INDEX 0x1E142
HID_HELP_FINDER 0x1E143
HID_HELP_USING 0x1E144
HID_CONTEXT_HELP 0x1E145
HID_NEXT_PANE 0x1E150
HID_PREV_PANE 0x1E151
HID_FORMAT_FONT 0x1E160
HID_OLE_INSERT_NEW 0x1E200
HID_OLE_EDIT_LINKS 0x1E201
HID_OLE_EDIT_CONVERT 0x1E202
HID_OLE_EDIT_CHANGE_ICON 0x1E203
HID_OLE_EDIT_PROPERTIES 0x1E204
HID_VIEW_TOOLBAR 0x1E800
HID_VIEW_STATUS_BAR 0x1E801
HID_RECORD_FIRST 0x1E900
HID_RECORD_LAST 0x1E901
HID_RECORD_NEXT 0x1E902
HID_RECORD_PREV 0x1E903
HID_WIZBACK 0x13023
HID_WIZNEXT 0x13024
HID_WIZFINISH 0x13025
// Dialogs (AFX_HIDD_*)
AFX_HIDD_FILEOPEN 0x27004
AFX_HIDD_FILESAVE 0x27005
AFX_HIDD_FONT 0x27006
AFX_HIDD_COLOR 0x27007
AFX_HIDD_PRINT 0x27008
AFX_HIDD_PRINTSETUP 0x27009
AFX_HIDD_FIND 0x2700A
AFX_HIDD_REPLACE 0x2700B
AFX_HIDD_NEWTYPEDLG 0x27801
AFX_HIDD_PRINTDLG 0x27802
AFX_HIDD_PREVIEW_TOOLBAR 0x27803
AFX_HIDD_PREVIEW_SHORTTOOLBAR 0x2780B
AFX_HIDD_INSERTOBJECT 0x27804
AFX_HIDD_CHANGEICON 0x27805
AFX_HIDD_CONVERT 0x27806
AFX_HIDD_PASTESPECIAL 0x27807
AFX_HIDD_EDITLINKS 0x27808
AFX_HIDD_FILEBROWSE 0x27809
AFX_HIDD_BUSY 0x2780A
AFX_HIDD_OBJECTPROPERTIES 0x2780C
AFX_HIDD_CHANGESOURCE 0x2780D
// Prompts/Errors (AFX_HIDP_*)
AFX_HIDP_NO_ERROR_AVAILABLE 0x3F020
AFX_HIDP_INVALID_FILENAME 0x3F100
AFX_HIDP_FAILED_TO_OPEN_DOC 0x3F101
AFX_HIDP_FAILED_TO_SAVE_DOC 0x3F102
AFX_HIDP_ASK_TO_SAVE 0x3F103
AFX_HIDP_FAILED_TO_CREATE_DOC 0x3F104
AFX_HIDP_FILE_TOO_LARGE 0x3F105
AFX_HIDP_FAILED_TO_START_PRINT 0x3F106
AFX_HIDP_FAILED_TO_LAUNCH_HELP 0x3F107
AFX_HIDP_INTERNAL_FAILURE 0x3F108
AFX_HIDP_COMMAND_FAILURE 0x3F109
AFX_HIDP_FAILED_MEMORY_ALLOC 0x3F10A
AFX_HIDP_UNREG_DONE 0x3F10B
AFX_HIDP_UNREG_FAILURE 0x3F10C
AFX_HIDP_DLL_LOAD_FAILED 0x3F10D
AFX_HIDP_DLL_BAD_VERSION 0x3F10E
AFX_HIDP_PARSE_INT 0x3F110
AFX_HIDP_PARSE_REAL 0x3F111
AFX_HIDP_PARSE_INT_RANGE 0x3F112
AFX_HIDP_PARSE_REAL_RANGE 0x3F113
AFX_HIDP_PARSE_STRING_SIZE 0x3F114
AFX_HIDP_PARSE_RADIO_BUTTON 0x3F115
AFX_HIDP_PARSE_BYTE 0x3F116
AFX_HIDP_PARSE_UINT 0x3F117
AFX_HIDP_PARSE_DATETIME 0x3F118
AFX_HIDP_PARSE_CURRENCY 0x3F119
AFX_HIDP_FAILED_INVALID_FORMAT 0x3F120
AFX_HIDP_FAILED_INVALID_PATH 0x3F121
AFX_HIDP_FAILED_DISK_FULL 0x3F122
AFX_HIDP_FAILED_ACCESS_READ 0x3F123
AFX_HIDP_FAILED_ACCESS_WRITE 0x3F124
AFX_HIDP_FAILED_IO_ERROR_READ 0x3F125
AFX_HIDP_FAILED_IO_ERROR_WRITE 0x3F126
AFX_HIDP_STATIC_OBJECT 0x3F180
AFX_HIDP_FAILED_TO_CONNECT 0x3F181
AFX_HIDP_SERVER_BUSY 0x3F182
AFX_HIDP_BAD_VERB 0x3F183
AFX_HIDP_FAILED_TO_NOTIFY 0x3F185
AFX_HIDP_FAILED_TO_LAUNCH 0x3F186
AFX_HIDP_ASK_TO_UPDATE 0x3F187
AFX_HIDP_FAILED_TO_UPDATE 0x3F188
AFX_HIDP_FAILED_TO_REGISTER 0x3F189
AFX_HIDP_FAILED_TO_AUTO_REGISTER 0x3F18A
AFX_HIDP_FAILED_TO_CONVERT 0x3F18B
AFX_HIDP_GET_NOT_SUPPORTED 0x3F18C
AFX_HIDP_SET_NOT_SUPPORTED 0x3F18D
AFX_HIDP_ASK_TO_DISCARD 0x3F18E
AFX_HIDP_FAILED_TO_CREATE 0x3F18F
AFX_HIDP_FAILED_MAPI_LOAD 0x3F190
AFX_HIDP_INVALID_MAPI_DLL 0x3F191
AFX_HIDP_FAILED_MAPI_SEND 0x3F192
AFX_HIDP_FILE_NONE 0x3F1A0
AFX_HIDP_FILE_GENERIC 0x3F1A1
AFX_HIDP_FILE_NOT_FOUND 0x3F1A2
AFX_HIDP_FILE_BAD_PATH 0x3F1A3
AFX_HIDP_FILE_TOO_MANY_OPEN 0x3F1A4
AFX_HIDP_FILE_ACCESS_DENIED 0x3F1A5
AFX_HIDP_FILE_INVALID_FILE 0x3F1A6
AFX_HIDP_FILE_REMOVE_CURRENT 0x3F1A7
AFX_HIDP_FILE_DIR_FULL 0x3F1A8
AFX_HIDP_FILE_BAD_SEEK 0x3F1A9
AFX_HIDP_FILE_HARD_IO 0x3F1AA
AFX_HIDP_FILE_SHARING 0x3F1AB
AFX_HIDP_FILE_LOCKING 0x3F1AC
AFX_HIDP_FILE_DISKFULL 0x3F1AD
AFX_HIDP_FILE_EOF 0x3F1AE
AFX_HIDP_ARCH_NONE 0x3F1B0
AFX_HIDP_ARCH_GENERIC 0x3F1B1
AFX_HIDP_ARCH_READONLY 0x3F1B2
AFX_HIDP_ARCH_ENDOFFILE 0x3F1B3
AFX_HIDP_ARCH_WRITEONLY 0x3F1B4
AFX_HIDP_ARCH_BADINDEX 0x3F1B5
AFX_HIDP_ARCH_BADCLASS 0x3F1B6
AFX_HIDP_ARCH_BADSCHEMA 0x3F1B7
AFX_HIDP_SQL_CONNECT_FAIL 0x3F281
AFX_HIDP_SQL_RECORDSET_FORWARD_ONLY 0x3F282
AFX_HIDP_SQL_EMPTY_COLUMN_LIST 0x3F283
AFX_HIDP_SQL_FIELD_SCHEMA_MISMATCH 0x3F284
AFX_HIDP_SQL_ILLEGAL_MODE 0x3F285
AFX_HIDP_SQL_MULTIPLE_ROWS_AFFECTED 0x3F286
AFX_HIDP_SQL_NO_CURRENT_RECORD 0x3F287
AFX_HIDP_SQL_NO_ROWS_AFFECTED 0x3F288
AFX_HIDP_SQL_RECORDSET_READONLY 0x3F289
AFX_HIDP_SQL_SQL_NO_TOTAL 0x3F28A
AFX_HIDP_SQL_ODBC_LOAD_FAILED 0x3F28B
AFX_HIDP_SQL_DYNASET_NOT_SUPPORTED 0x3F28C
AFX_HIDP_SQL_SNAPSHOT_NOT_SUPPORTED 0x3F28D
AFX_HIDP_SQL_API_CONFORMANCE 0x3F28E
AFX_HIDP_SQL_SQL_CONFORMANCE 0x3F28F
AFX_HIDP_SQL_NO_DATA_FOUND 0x3F290
AFX_HIDP_SQL_ROW_UPDATE_NOT_SUPPORTED 0x3F291
AFX_HIDP_SQL_ODBC_V2_REQUIRED 0x3F292
AFX_HIDP_SQL_NO_POSITIONED_UPDATES 0x3F293
AFX_HIDP_SQL_LOCK_MODE_NOT_SUPPORTED 0x3F294
AFX_HIDP_SQL_DATA_TRUNCATED 0x3F295
AFX_HIDP_SQL_ROW_FETCH 0x3F296
AFX_HIDP_SQL_INCORRECT_ODBC 0x3F297
AFX_HIDP_SQL_UPDATE_DELETE_FAILED 0x3F298
AFX_HIDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED 0x3F299
AFX_HIDP_SQL_FIELD_NOT_FOUND 0x3F29A
AFX_HIDP_SQL_BOOKMARKS_NOT_SUPPORTED 0x3F29B
AFX_HIDP_SQL_BOOKMARKS_NOT_ENABLED 0x3F29C
AFX_HIDP_DAO_ENGINE_INITIALIZATION 0x3F2B0
AFX_HIDP_DAO_DFX_BIND 0x3F2B1
AFX_HIDP_DAO_OBJECT_NOT_OPEN 0x3F2B2
AFX_HIDP_DAO_ROWTOOSHORT 0x3F2B3
AFX_HIDP_DAO_BADBINDINFO 0x3F2B4
AFX_HIDP_DAO_COLUMNUNAVAILABLE 0x3F2B5
// Frame Controls (AFX_HIDW_*)
AFX_HIDW_TOOLBAR 0x5E800
AFX_HIDW_STATUS_BAR 0x5E801
AFX_HIDW_PREVIEW_BAR 0x5E802
AFX_HIDW_RESIZE_BAR 0x5E803
AFX_HIDW_DOCKBAR_TOP 0x5E81B
AFX_HIDW_DOCKBAR_LEFT 0x5E81C
AFX_HIDW_DOCKBAR_RIGHT 0x5E81D
AFX_HIDW_DOCKBAR_BOTTOM 0x5E81E
AFX_HIDW_DOCKBAR_FLOAT 0x5E81F
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,219 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXHTML_H__
#define __AFXHTML_H__
#ifndef __AFXDISP_H__
#include <afxdisp.h>
#endif
#ifndef __exdisp_h__
#include <exdisp.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXHTML - MFC Visual HTML classes
// Classes declared in this file
//CObject
//CCmdTarget;
//CWnd
//CView
//CFormView
class CHtmlView;
#undef AFX_DATA
#define AFX_DATA AFX_OLE_DATA
/////////////////////////////////////////////////////////////////////////////
// CHtmlView
class CHtmlView : public CFormView
{
protected: // create from serialization only
CHtmlView();
DECLARE_DYNCREATE(CHtmlView)
DECLARE_EVENTSINK_MAP()
// Attributes
public:
CString GetType() const;
long GetLeft() const;
void SetLeft(long nNewValue);
long GetTop() const;
void SetTop(long nNewValue);
long GetHeight() const;
void SetHeight(long nNewValue);
void SetVisible(BOOL bNewValue);
BOOL GetVisible() const;
CString GetLocationName() const;
READYSTATE GetReadyState() const;
BOOL GetOffline() const;
void SetOffline(BOOL bNewValue);
BOOL GetSilent() const;
void SetSilent(BOOL bNewValue);
BOOL GetTopLevelContainer() const;
CString GetLocationURL() const;
BOOL GetBusy() const;
LPDISPATCH GetApplication() const;
LPDISPATCH GetParentBrowser() const;
LPDISPATCH GetContainer() const;
LPDISPATCH GetHtmlDocument() const;
CString GetFullName() const;
int GetToolBar() const;
void SetToolBar(int nNewValue);
BOOL GetMenuBar() const;
void SetMenuBar(BOOL bNewValue);
BOOL GetFullScreen() const;
void SetFullScreen(BOOL bNewValue);
OLECMDF QueryStatusWB(OLECMDID cmdID) const;
BOOL GetRegisterAsBrowser() const;
void SetRegisterAsBrowser(BOOL bNewValue);
BOOL GetRegisterAsDropTarget() const;
void SetRegisterAsDropTarget(BOOL bNewValue);
BOOL GetTheaterMode() const;
void SetTheaterMode(BOOL bNewValue);
BOOL GetAddressBar() const;
void SetAddressBar(BOOL bNewValue);
BOOL GetStatusBar() const;
void SetStatusBar(BOOL bNewValue);
// Operations
public:
void GoBack();
void GoForward();
void GoHome();
void GoSearch();
void Navigate(LPCTSTR URL, DWORD dwFlags = 0,
LPCTSTR lpszTargetFrameName = NULL,
LPCTSTR lpszHeaders = NULL, LPVOID lpvPostData = NULL,
DWORD dwPostDataLen = 0);
void Navigate2(LPITEMIDLIST pIDL, DWORD dwFlags = 0,
LPCTSTR lpszTargetFrameName = NULL);
void Navigate2(LPCTSTR lpszURL, DWORD dwFlags = 0,
LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeaders = NULL,
LPVOID lpvPostData = NULL, DWORD dwPostDataLen = 0);
void Navigate2(LPCTSTR lpszURL, DWORD dwFlags,
CByteArray& baPostedData,
LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeader = NULL);
void Refresh();
void Refresh2(int nLevel);
void Stop();
void PutProperty(LPCTSTR lpszProperty, const VARIANT& vtValue);
void PutProperty(LPCTSTR lpszPropertyName, double dValue);
void PutProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszValue);
void PutProperty(LPCTSTR lpszPropertyName, long lValue);
void PutProperty(LPCTSTR lpszPropertyName, short nValue);
BOOL GetProperty(LPCTSTR lpszProperty, CString& strValue);
COleVariant GetProperty(LPCTSTR lpszProperty);
void ExecWB(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT* pvaIn,
VARIANT* pvaOut);
BOOL LoadFromResource(LPCTSTR lpszResource);
BOOL LoadFromResource(UINT nRes);
// Overrides
public:
virtual void OnDraw(CDC* pDC);
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL);
//{{AFX_MSG(CHtmlView)
afx_msg void OnFilePrint();
//}}AFX_MSG
// Events
virtual void OnNavigateComplete2(LPCTSTR strURL);
virtual void OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags,
LPCTSTR lpszTargetFrameName, CByteArray& baPostedData,
LPCTSTR lpszHeaders, BOOL* pbCancel);
virtual void OnStatusTextChange(LPCTSTR lpszText);
virtual void OnProgressChange(long nProgress, long nProgressMax);
virtual void OnCommandStateChange(long nCommand, BOOL bEnable);
virtual void OnDownloadBegin();
virtual void OnDownloadComplete();
virtual void OnTitleChange(LPCTSTR lpszText);
virtual void OnPropertyChange(LPCTSTR lpszProperty);
virtual void OnNewWindow2(LPDISPATCH* ppDisp, BOOL* Cancel);
virtual void OnDocumentComplete(LPCTSTR lpszURL);
virtual void OnQuit();
virtual void OnVisible(BOOL bVisible);
virtual void OnToolBar(BOOL bToolBar);
virtual void OnMenuBar(BOOL bMenuBar);
virtual void OnStatusBar(BOOL bStatusBar);
virtual void OnFullScreen(BOOL bFullScreen);
virtual void OnTheaterMode(BOOL bTheaterMode);
// Implementation
public:
virtual ~CHtmlView();
CWnd m_wndBrowser;
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
IWebBrowser2* m_pBrowserApp;
// Event reflectors (not normally overridden)
protected:
virtual void NavigateComplete2(LPDISPATCH pDisp, VARIANT* URL);
virtual void BeforeNavigate2(LPDISPATCH pDisp, VARIANT* URL,
VARIANT* Flags, VARIANT* TargetFrameName, VARIANT* PostData,
VARIANT* Headers, BOOL* Cancel);
virtual void DocumentComplete(LPDISPATCH pDisp, VARIANT* URL);
// Generated message map functions
protected:
//{{AFX_MSG(CHtmlView)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnPaint();
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXHTML_INLINE AFX_INLINE
#include <afxhtml.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXHTML_H__
@@ -0,0 +1,94 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXHTML.H
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFXHTML_INLINE
_AFXHTML_INLINE void CHtmlView::SetRegisterAsBrowser(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsBrowser((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetRegisterAsDropTarget(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_RegisterAsDropTarget((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetTheaterMode(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_TheaterMode((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetVisible(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Visible((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetMenuBar(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_MenuBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetToolBar(int nNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_ToolBar(nNewValue); }
_AFXHTML_INLINE void CHtmlView::SetOffline(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Offline((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetSilent(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Silent((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::GoBack()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoBack(); }
_AFXHTML_INLINE void CHtmlView::GoForward()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoForward(); }
_AFXHTML_INLINE void CHtmlView::GoHome()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoHome(); }
_AFXHTML_INLINE void CHtmlView::GoSearch()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->GoSearch(); }
_AFXHTML_INLINE void CHtmlView::Refresh()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh(); }
_AFXHTML_INLINE void CHtmlView::Refresh2(int nLevel)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Refresh2(COleVariant((long) nLevel, VT_I4)); }
_AFXHTML_INLINE void CHtmlView::Stop()
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->Stop(); }
_AFXHTML_INLINE void CHtmlView::SetFullScreen(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_FullScreen((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetAddressBar(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_AddressBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
_AFXHTML_INLINE void CHtmlView::SetHeight(long nNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Height(nNewValue); }
_AFXHTML_INLINE void CHtmlView::PutProperty(LPCTSTR lpszPropertyName, long lValue)
{ ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lValue, VT_UI4)); }
_AFXHTML_INLINE void CHtmlView::PutProperty(LPCTSTR lpszPropertyName, short nValue)
{ ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(nValue, VT_UI2)); }
_AFXHTML_INLINE void CHtmlView::PutProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszValue)
{ ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(lpszValue, VT_BSTR)); }
_AFXHTML_INLINE void CHtmlView::PutProperty(LPCTSTR lpszPropertyName, double dValue)
{ ASSERT(m_pBrowserApp != NULL); ASSERT(m_pBrowserApp != NULL); PutProperty(lpszPropertyName, COleVariant(dValue)); }
_AFXHTML_INLINE void CHtmlView::SetTop(long nNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Top(nNewValue); }
_AFXHTML_INLINE void CHtmlView::SetLeft(long nNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_Left(nNewValue); }
_AFXHTML_INLINE void CHtmlView::SetStatusBar(BOOL bNewValue)
{ ASSERT(m_pBrowserApp != NULL); m_pBrowserApp->put_StatusBar((short) (bNewValue ? AFX_OLE_TRUE : AFX_OLE_FALSE)); }
#endif //_AFXHTML_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,697 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXINET_H_
#define __AFXINET_H_
#ifndef __AFX_H__
#include <afx.h>
#endif
#ifndef _WININET_
#include <wininet.h>
#endif
#ifndef _AFXDLL
#pragma comment(lib, "wininet.lib")
#endif
/////////////////////////////////////////////////////////////////////////////
// classes that are declared in this file
class CInternetSession; // from CObject
class CGopherLocator; // from CObject
class CInternetFile; // from CStdioFile (FILETXT.CPP)
class CHttpFile;
class CGopherFile;
class CInternetConnection;
class CFtpConnection;
class CGopherConnection;
class CHttpConnection;
class CFtpFileFind; // from CFileFind (FILEFIND.CPP)
class CGopherFileFind;
class CInternetException;
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// Global Functions
BOOL AFXAPI AfxParseURL(LPCTSTR pstrURL, DWORD& dwServiceType,
CString& strServer, CString& strObject, INTERNET_PORT& nPort);
BOOL AFXAPI AfxParseURLEx(LPCTSTR pstrURL, DWORD& dwServiceType,
CString& strServer, CString& strObject, INTERNET_PORT& nPort,
CString& strUsername, CString& strPassword, DWORD dwFlags = 0);
DWORD AFXAPI AfxGetInternetHandleType(HINTERNET hQuery);
// see CInternetException at the bottom of this file
void AFXAPI AfxThrowInternetException(DWORD dwContext, DWORD dwError = 0);
// these are defined by WININET.H
#define AFX_INET_SERVICE_FTP INTERNET_SERVICE_FTP
#define AFX_INET_SERVICE_HTTP INTERNET_SERVICE_HTTP
#define AFX_INET_SERVICE_GOPHER INTERNET_SERVICE_GOPHER
// these are types that MFC parsing functions understand
#define AFX_INET_SERVICE_UNK 0x1000
#define AFX_INET_SERVICE_FILE (AFX_INET_SERVICE_UNK+1)
#define AFX_INET_SERVICE_MAILTO (AFX_INET_SERVICE_UNK+2)
#define AFX_INET_SERVICE_MID (AFX_INET_SERVICE_UNK+3)
#define AFX_INET_SERVICE_CID (AFX_INET_SERVICE_UNK+4)
#define AFX_INET_SERVICE_NEWS (AFX_INET_SERVICE_UNK+5)
#define AFX_INET_SERVICE_NNTP (AFX_INET_SERVICE_UNK+6)
#define AFX_INET_SERVICE_PROSPERO (AFX_INET_SERVICE_UNK+7)
#define AFX_INET_SERVICE_TELNET (AFX_INET_SERVICE_UNK+8)
#define AFX_INET_SERVICE_WAIS (AFX_INET_SERVICE_UNK+9)
#define AFX_INET_SERVICE_AFS (AFX_INET_SERVICE_UNK+10)
#define AFX_INET_SERVICE_HTTPS (AFX_INET_SERVICE_UNK+11)
/////////////////////////////////////////////////////////////////////////////
// classes that are declared in this file
class CInternetSession : public CObject
{
public:
CInternetSession(LPCTSTR pstrAgent = NULL,
DWORD dwContext = 1,
DWORD dwAccessType = PRE_CONFIG_INTERNET_ACCESS,
LPCTSTR pstrProxyName = NULL,
LPCTSTR pstrProxyBypass = NULL,
DWORD dwFlags = 0);
BOOL QueryOption(DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufLen) const;
BOOL QueryOption(DWORD dwOption, DWORD& dwValue) const;
BOOL QueryOption(DWORD dwOption, CString& refString) const;
BOOL SetOption(DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength,
DWORD dwFlags = 0);
BOOL SetOption(DWORD dwOption, DWORD dwValue, DWORD dwFlags = 0);
CStdioFile* OpenURL(LPCTSTR pstrURL,
DWORD dwContext = 1, DWORD dwFlags = INTERNET_FLAG_TRANSFER_ASCII,
LPCTSTR pstrHeaders = NULL, DWORD dwHeadersLength = 0);
CFtpConnection* GetFtpConnection(LPCTSTR pstrServer,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
BOOL bPassive = FALSE);
CHttpConnection* GetHttpConnection(LPCTSTR pstrServer,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL);
CHttpConnection* GetHttpConnection(LPCTSTR pstrServer, DWORD dwFlags,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL);
CGopherConnection* GetGopherConnection(LPCTSTR pstrServer,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER);
BOOL EnableStatusCallback(BOOL bEnable = TRUE);
DWORD ServiceTypeFromHandle(HINTERNET hQuery);
// operations
DWORD GetContext() const;
operator HINTERNET() const;
virtual void Close();
// cookies
static BOOL SetCookie(LPCSTR pstrUrl, LPCTSTR pstrCookieName, LPCTSTR pstrCookieData);
static BOOL GetCookie(LPCSTR pstrUrl, LPCTSTR pstrCookieName, LPTSTR pstrCookieData, DWORD dwBufLen);
static DWORD GetCookieLength(LPCSTR pstrUrl, LPCTSTR pstrCookieName);
static BOOL GetCookie(LPCSTR pstrUrl, LPCTSTR pstrCookieName, CString& strCookieData);
// overridables
virtual void OnStatusCallback(DWORD dwContext, DWORD dwInternetStatus,
LPVOID lpvStatusInformation, DWORD dwStatusInformationLength);
// implementation
DECLARE_DYNAMIC(CInternetSession)
~CInternetSession();
protected:
DWORD m_dwContext;
HINTERNET m_hSession;
INTERNET_STATUS_CALLBACK m_pOldCallback;
BOOL m_bCallbackEnabled;
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
};
////////////////////////////////////////////////////////////////////////////
// Internet File Access Wrapper
class CInternetFile : public CStdioFile
{
// Constructors
protected:
CInternetFile(HINTERNET hFile, LPCTSTR pstrFileName,
CInternetConnection* pConnection, BOOL bReadMode);
CInternetFile(HINTERNET hFile, HINTERNET hSession,
LPCTSTR pstrFileName, LPCTSTR pstrServer, DWORD dwContext,
BOOL bReadMode);
// Attributes
protected:
HINTERNET m_hFile;
public:
operator HINTERNET() const;
DWORD GetContext() const;
// Operations
BOOL SetWriteBufferSize(UINT nWriteSize);
BOOL SetReadBufferSize(UINT nReadSize);
BOOL QueryOption(DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufLen) const;
BOOL QueryOption(DWORD dwOption, DWORD& dwValue) const;
BOOL QueryOption(DWORD dwOption, CString& refString) const;
BOOL SetOption(DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength,
DWORD dwFlags = 0);
BOOL SetOption(DWORD dwOption, DWORD dwValue, DWORD dwFlags = 0);
// Overridables
virtual LONG Seek(LONG lOffset, UINT nFrom);
virtual UINT Read(void* lpBuf, UINT nCount);
virtual void Write(const void* lpBuf, UINT nCount);
virtual void Abort();
virtual void Flush();
virtual void Close();
virtual DWORD GetLength() const;
virtual BOOL ReadString(CString& rString);
virtual LPTSTR ReadString(LPTSTR pstr, UINT nMax);
virtual void WriteString(LPCTSTR pstr);
// Not supported by CInternetFile
void LockRange(DWORD dwPos, DWORD dwCount);
void UnlockRange(DWORD dwPos, DWORD dwCount);
CFile* Duplicate() const;
virtual void SetLength(DWORD dwNewLen);
// Implementation
public:
virtual ~CInternetFile();
protected:
BOOL m_bReadMode;
DWORD m_dwContext;
HINTERNET m_hConnection;
CString m_strServerName;
UINT m_nWriteBufferSize;
UINT m_nWriteBufferPos;
LPBYTE m_pbWriteBuffer;
UINT m_nReadBufferSize;
UINT m_nReadBufferPos;
LPBYTE m_pbReadBuffer;
UINT m_nReadBufferBytes;
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
friend class CInternetSession;
friend class CFtpConnection;
friend class CHttpConnection;
friend class CGopherConnection;
DECLARE_DYNAMIC(CInternetFile)
};
class CHttpFile : public CInternetFile
{
// Constructors
protected:
CHttpFile(HINTERNET hFile, HINTERNET hSession, LPCTSTR pstrObject,
LPCTSTR pstrServer, LPCTSTR pstrVerb, DWORD dwContext);
CHttpFile(HINTERNET hFile, LPCTSTR pstrVerb, LPCTSTR pstrObject,
CHttpConnection* pConnection);
// Operations
public:
BOOL AddRequestHeaders(LPCTSTR pstrHeaders,
DWORD dwFlags = HTTP_ADDREQ_FLAG_ADD_IF_NEW, int dwHeadersLen = -1);
BOOL AddRequestHeaders(CString& str,
DWORD dwFlags = HTTP_ADDREQ_FLAG_ADD_IF_NEW);
BOOL SendRequest(LPCTSTR pstrHeaders = NULL, DWORD dwHeadersLen = 0,
LPVOID lpOptional = NULL, DWORD dwOptionalLen = 0);
BOOL SendRequest(CString& strHeaders,
LPVOID lpOptional = NULL, DWORD dwOptionalLen = 0);
BOOL SendRequestEx(DWORD dwTotalLen,
DWORD dwFlags = HSR_INITIATE, DWORD dwContext = 1);
BOOL SendRequestEx(LPINTERNET_BUFFERS lpBuffIn,
LPINTERNET_BUFFERS lpBuffOut, DWORD dwFlags = HSR_INITIATE,
DWORD dwContext = 1);
BOOL EndRequest(DWORD dwFlags = 0,
LPINTERNET_BUFFERS lpBuffIn = NULL, DWORD dwContext = 1);
BOOL QueryInfo(DWORD dwInfoLevel, LPVOID lpvBuffer,
LPDWORD lpdwBufferLength, LPDWORD lpdwIndex = NULL) const;
BOOL QueryInfo(DWORD dwInfoLevel, CString& str,
LPDWORD dwIndex = NULL) const;
BOOL QueryInfo(DWORD dwInfoLevel, SYSTEMTIME* pSysTime,
LPDWORD dwIndex = NULL) const;
BOOL QueryInfo(DWORD dwInfoLevel, DWORD& dwResult,
LPDWORD dwIndex = NULL) const;
BOOL QueryInfoStatusCode(DWORD& dwStatusCode) const;
DWORD ErrorDlg(CWnd* pParent = NULL,
DWORD dwError = ERROR_INTERNET_INCORRECT_PASSWORD,
DWORD dwFlags = FLAGS_ERROR_UI_FLAGS_GENERATE_DATA | FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS,
LPVOID* lppvData = NULL);
// Attributes
public:
CString GetVerb() const;
CString GetObject() const;
virtual CString GetFileURL() const;
virtual void Close();
// Implementation
public:
virtual ~CHttpFile();
protected:
CString m_strObject;
CString m_strVerb;
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
friend class CHttpConnection;
friend class CInternetSession;
DECLARE_DYNAMIC(CHttpFile)
};
// class CGopherFile is declared after CGopherLocator, below
////////////////////////////////////////////////////////////////////////////
// Connection types
class CInternetConnection : public CObject
{
public:
CInternetConnection(CInternetSession* pSession, LPCTSTR pstrServer,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
DWORD dwContext = 1);
// Operations
operator HINTERNET() const;
DWORD GetContext() const;
CInternetSession* GetSession() const;
CString GetServerName() const;
BOOL QueryOption(DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufLen) const;
BOOL QueryOption(DWORD dwOption, DWORD& dwValue) const;
BOOL QueryOption(DWORD dwOption, CString& refString) const;
BOOL SetOption(DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength,
DWORD dwFlags = 0);
BOOL SetOption(DWORD dwOption, DWORD dwValue, DWORD dwFlags = 0);
// Implementation
protected:
HINTERNET m_hConnection;
DWORD m_dwContext;
CInternetSession* m_pSession;
virtual void Close();
CString m_strServerName;
INTERNET_PORT m_nPort;
public:
~CInternetConnection();
DECLARE_DYNAMIC(CInternetConnection)
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
void AssertValid() const;
#endif
};
class CFtpConnection : public CInternetConnection
{
public:
CFtpConnection(CInternetSession* pSession, HINTERNET hConnected,
LPCTSTR pstrServer, DWORD dwContext);
CFtpConnection(CInternetSession* pSession, LPCTSTR pstrServer,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
DWORD dwContext = 0,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
BOOL bPassive = FALSE);
BOOL SetCurrentDirectory(LPCTSTR pstrDirName);
BOOL GetCurrentDirectory(CString& strDirName) const;
BOOL GetCurrentDirectory(LPTSTR pstrDirName, LPDWORD lpdwLen) const;
BOOL GetCurrentDirectoryAsURL(LPTSTR pstrName, LPDWORD lpdwLen) const;
BOOL GetCurrentDirectoryAsURL(CString& strDirName) const;
BOOL RemoveDirectory(LPCTSTR pstrDirName);
BOOL CreateDirectory(LPCTSTR pstrDirName);
BOOL Rename(LPCTSTR pstrExisting, LPCTSTR pstrNew);
BOOL Remove(LPCTSTR pstrFileName);
BOOL PutFile(LPCTSTR pstrLocalFile, LPCTSTR pstrRemoteFile,
DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY, DWORD dwContext = 1);
BOOL GetFile(LPCTSTR pstrRemoteFile, LPCTSTR pstrLocalFile,
BOOL bFailIfExists = TRUE,
DWORD dwAttributes = FILE_ATTRIBUTE_NORMAL,
DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY, DWORD dwContext = 1);
CInternetFile* OpenFile(LPCTSTR pstrFileName,
DWORD dwAccess = GENERIC_READ,
DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY, DWORD dwContext = 1);
virtual void Close();
// implementation
~CFtpConnection();
protected:
CString m_strServerName;
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
DECLARE_DYNAMIC(CFtpConnection)
};
class CHttpConnection : public CInternetConnection
{
public:
enum {
_HTTP_VERB_MIN = 0,
HTTP_VERB_POST = 0,
HTTP_VERB_GET = 1,
HTTP_VERB_HEAD = 2,
HTTP_VERB_PUT = 3,
HTTP_VERB_LINK = 4,
HTTP_VERB_DELETE = 5,
HTTP_VERB_UNLINK = 6,
_HTTP_VERB_MAX = 6,
};
public:
CHttpConnection(CInternetSession* pSession, HINTERNET hConnected,
LPCTSTR pstrServer, DWORD dwContext);
CHttpConnection(CInternetSession* pSession, LPCTSTR pstrServer,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
DWORD dwContext = 1);
CHttpConnection(CInternetSession* pSession, LPCTSTR pstrServer,
DWORD dwFlags, INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
DWORD dwContext = 1);
CHttpFile* OpenRequest(LPCTSTR pstrVerb, LPCTSTR pstrObjectName,
LPCTSTR pstrReferer = NULL,DWORD dwContext = 1,
LPCTSTR* ppstrAcceptTypes = NULL, LPCTSTR pstrVersion = NULL,
DWORD dwFlags = INTERNET_FLAG_EXISTING_CONNECT);
CHttpFile* OpenRequest(int nVerb, LPCTSTR pstrObjectName,
LPCTSTR pstrReferer = NULL, DWORD dwContext = 1,
LPCTSTR* ppstrAcceptTypes = NULL, LPCTSTR pstrVersion = NULL,
DWORD dwFlags = INTERNET_FLAG_EXISTING_CONNECT);
// implementation
~CHttpConnection();
virtual void Close();
protected:
CString m_strServerName;
static const LPCTSTR szHtmlVerbs[];
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
friend class CInternetSession; // just to access szHtmlVerbs
DECLARE_DYNAMIC(CHttpConnection)
};
class CGopherConnection : public CInternetConnection
{
public:
CGopherConnection(CInternetSession* pSession,
HINTERNET hConnected, LPCTSTR pstrServer, DWORD dwContext);
CGopherConnection(CInternetSession* pSession, LPCTSTR pstrServer,
LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL,
DWORD dwContext = 0,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER);
CGopherFile* OpenFile(CGopherLocator& refLocator, DWORD dwFlags = 0,
LPCTSTR pstrView = NULL, DWORD dwContext = 1);
CGopherLocator CreateLocator(LPCTSTR pstrDisplayString,
LPCTSTR pstrSelectorString, DWORD dwGopherType);
BOOL CGopherConnection::GetAttribute(CGopherLocator& refLocator,
CString strRequestedAttributes, CString& strResult);
static CGopherLocator CreateLocator(LPCTSTR pstrLocator);
static CGopherLocator CreateLocator(LPCTSTR pstrServerName,
LPCTSTR pstrDisplayString,
LPCTSTR pstrSelectorString, DWORD dwGopherType,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER);
// implementation
~CGopherConnection();
virtual void Close();
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
DECLARE_DYNAMIC(CGopherConnection)
};
/////////////////////////////////////////////////////////////////////////////
// CFtpFileFind
class CFtpFileFind : public CFileFind
{
public:
CFtpFileFind(CFtpConnection* pConnection, DWORD dwContext = 1);
virtual ~CFtpFileFind();
virtual BOOL FindFile(LPCTSTR pstrName = NULL,
DWORD dwFlags = INTERNET_FLAG_RELOAD);
virtual BOOL FindNextFile();
CString GetFileURL() const;
// implementation
protected:
virtual void CloseContext();
CFtpConnection* m_pConnection;
DWORD m_dwContext;
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
DECLARE_DYNAMIC(CFtpFileFind)
};
/////////////////////////////////////////////////////////////////////////////
// CGopherLocator
class CGopherLocator : public CObject
{
public:
~CGopherLocator();
operator LPCTSTR() const;
CGopherLocator(const CGopherLocator& ref);
BOOL GetLocatorType(DWORD& dwRef) const;
private:
// this only created by CGopherConnection::CreateLocator or by serialization
CGopherLocator(LPCTSTR pstrLocator, DWORD dwLocLen);
CString m_Locator; // _not_ a zero-terminated string!
DWORD m_dwBufferLength;
friend class CGopherConnection;
friend class CGopherFile;
};
/////////////////////////////////////////////////////////////////////////////
// CGopherFile
class CGopherFile : public CInternetFile
{
// Constructors
protected:
CGopherFile(HINTERNET hFile, CGopherLocator& refLocator,
CGopherConnection* pConnection);
CGopherFile(HINTERNET hFile, HINTERNET hSession,
LPCTSTR pstrLocator, DWORD dwLocLen, DWORD dwContext);
// Operations
public:
virtual void Close();
virtual void Write(const void* lpBuf, UINT nCount);
void WriteString(LPCTSTR pstr);
// Implementation
protected:
CGopherLocator m_Locator;
public:
virtual ~CGopherFile();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
friend class CInternetSession;
friend class CGopherConnection;
DECLARE_DYNAMIC(CGopherFile)
};
/////////////////////////////////////////////////////////////////////////////
// CGopherFileFind
class CGopherFileFind : public CFileFind
{
public:
CGopherFileFind(CGopherConnection* pConnection, DWORD dwContext = 1);
virtual ~CGopherFileFind();
virtual BOOL FindFile(CGopherLocator& refLocator, LPCTSTR pstrString,
DWORD dwFlags = INTERNET_FLAG_RELOAD);
virtual BOOL FindFile(LPCTSTR pstrString,
DWORD dwFlags = INTERNET_FLAG_RELOAD);
virtual BOOL FindNextFile();
virtual BOOL IsDots() const;
virtual BOOL GetLastWriteTime(FILETIME* pTimeStamp) const;
virtual BOOL GetLastAccessTime(FILETIME* pTimeStamp) const;
virtual BOOL GetCreationTime(FILETIME* pTimeStamp) const;
virtual BOOL GetLastWriteTime(CTime& refTime) const;
virtual BOOL GetLastAccessTime(CTime& refTime) const;
virtual BOOL GetCreationTime(CTime& refTime) const;
CGopherLocator GetLocator() const;
CString GetScreenName() const;
virtual DWORD GetLength() const;
#if defined(_X86_) || defined(_ALPHA_)
virtual __int64 GetLength64() const;
#endif
protected:
virtual void CloseContext();
CGopherConnection* m_pConnection;
DWORD m_dwContext;
// implementation
public:
// Unsupported APIs
CString GetFileName() const;
CString GetFilePath() const;
CString GetFileTitle() const;
CString GetFileURL() const;
CString GetRoot() const;
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
DECLARE_DYNAMIC(CGopherFileFind)
};
///////////////////////////////////////////////////////////////////////
// CInternetException
class CInternetException : public CException
{
public:
// Constructor
CInternetException(DWORD dwError);
// Attributes
DWORD m_dwError;
DWORD m_dwContext;
// Implementation
public:
~CInternetException();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
virtual BOOL GetErrorMessage(LPTSTR lpstrError, UINT nMaxError,
PUINT pnHelpContext = NULL);
DECLARE_DYNAMIC(CInternetException)
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_ENABLE_INLINES
#define _AFXINET_INLINE AFX_INLINE
#include <afxinet.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXINET_H__
@@ -0,0 +1,69 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXINET.H
/////////////////////////////////////////////////////////////////////////////
//
#ifdef _AFXINET_INLINE
_AFXINET_INLINE DWORD CInternetSession::GetContext() const
{ return m_dwContext; }
_AFXINET_INLINE CString CInternetConnection::GetServerName() const
{ return m_strServerName; }
_AFXINET_INLINE CInternetSession* CInternetConnection::GetSession() const
{ return m_pSession; }
_AFXINET_INLINE CInternetSession::operator HINTERNET() const
{ return m_hSession; }
_AFXINET_INLINE BOOL CInternetSession::SetOption(DWORD dwOption, DWORD dwValue,
DWORD dwFlags /* = 0 */)
{ ASSERT((dwFlags & INTERNET_FLAG_ASYNC) == 0); return SetOption(dwOption, &dwValue, sizeof(dwValue), dwFlags); }
_AFXINET_INLINE CGopherLocator::operator LPCTSTR() const
{ return (LPCTSTR) m_Locator; }
_AFXINET_INLINE BOOL CGopherLocator::GetLocatorType(DWORD& dwRef) const
{ return GopherGetLocatorType((LPCTSTR) m_Locator, &dwRef); }
_AFXINET_INLINE CGopherLocator::CGopherLocator(const CGopherLocator& ref)
{ m_Locator = ref.m_Locator; m_dwBufferLength = ref.m_dwBufferLength; }
_AFXINET_INLINE CInternetConnection::operator HINTERNET() const
{ return m_hConnection; }
_AFXINET_INLINE DWORD CInternetConnection::GetContext() const
{ return m_dwContext; }
_AFXINET_INLINE BOOL CInternetConnection::SetOption(DWORD dwOption,
DWORD dwValue, DWORD dwFlags /* = 0 */)
{ return SetOption(dwOption, &dwValue, sizeof(dwValue), dwFlags); }
_AFXINET_INLINE DWORD CInternetFile::GetContext() const
{ return m_dwContext; }
_AFXINET_INLINE CInternetFile::operator HINTERNET() const
{ return m_hFile; }
_AFXINET_INLINE BOOL CInternetFile::SetOption(DWORD dwOption, DWORD dwValue,
DWORD dwFlags /* = 0 */)
{ ASSERT((dwFlags & INTERNET_FLAG_ASYNC) == 0); return SetOption(dwOption, &dwValue, sizeof(dwValue), dwFlags); }
#endif //_AFXINET_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,616 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXISAPI_H_
#define __AFXISAPI_H_
#ifdef _UNICODE
#error ERROR: ISAPI does not yet support Unicode.
#endif
/////////////////////////////////////////////////////////////////////////////
// Turn off warnings for /W4
// To resume any of these warning: #pragma warning(default: 4xxx)
// which should be placed after the AFX include files
#ifndef ALL_WARNINGS
// warnings generated with common MFC/Windows code
#pragma warning(disable: 4127) // constant expression for TRACE/ASSERT
#pragma warning(disable: 4134) // message map member fxn casts
#pragma warning(disable: 4201) // nameless unions are part of C++
#pragma warning(disable: 4511) // private copy constructors are good to have
#pragma warning(disable: 4512) // private operator= are good to have
#pragma warning(disable: 4514) // unreferenced inlines are common
#pragma warning(disable: 4710) // private constructors are disallowed
#pragma warning(disable: 4705) // statement has no effect in optimized code
#pragma warning(disable: 4191) // pointer-to-function casting
// warnings caused by normal optimizations
#ifndef _DEBUG
#pragma warning(disable: 4701) // local variable *may* be used without init
#pragma warning(disable: 4702) // unreachable code caused by optimizations
#pragma warning(disable: 4791) // loss of debugging info in retail version
#pragma warning(disable: 4189) // initialized but unused variable
#pragma warning(disable: 4390) // empty controlled statement
#endif
// warnings specific to _AFXDLL version
#ifdef _AFXDLL
#pragma warning(disable: 4204) // non-constant aggregate initializer
#endif
#ifdef _AFXDLL
#pragma warning(disable: 4275) // deriving exported class from non-exported
#pragma warning(disable: 4251) // using non-exported as public in exported
#endif
#endif //!ALL_WARNINGS
#define STRICT 1
#ifndef _DEBUG
#ifndef _AFX_ENABLE_INLINES
#define _AFX_ENABLE_INLINES
#endif
#endif
#include <httpext.h>
#include <httpfilt.h>
#ifndef _INC_STDLIB
#include <stdlib.h>
#endif
#ifndef _INC_TCHAR
#include <tchar.h>
#endif
#ifndef UNUSED
#ifdef _DEBUG
#define UNUSED(x)
#else
#define UNUSED(x) x
#endif
#endif
#define AFXISAPI __stdcall
#define AFXIS_DATADEF
#define AFXISAPI_CDECL __cdecl
#ifndef AFX_INLINE
#define AFX_INLINE __forceinline
#endif
#ifndef _countof
#define _countof(array) (sizeof(array)/sizeof(array[0]))
#endif
/////////////////////////////////////////////////////////////////////////////
// Internet Server API Library
#ifndef _AFX_NOFORCE_LIBS
#ifdef _AFXDLL
#ifdef _DEBUG
#ifdef _UNICODE
#pragma comment(lib, "MFCISUD.lib")
#else
#pragma comment(lib, "EAFXISD.lib")
#endif
#else
#ifdef _UNICODE
#pragma comment(lib, "MFCISU.lib")
#else
#pragma comment(lib, "EAFXIS.lib")
#endif // _UNICODE
#endif // _DEBUG
#else
#ifdef _DEBUG
#ifdef _UNICODE
#pragma comment(lib, "UAFXISD.lib")
#else
#pragma comment(lib, "NAFXISD.lib")
#endif
#else
#ifdef _UNICODE
#pragma comment(lib, "UAFXIS.lib")
#else
#pragma comment(lib, "NAFXIS.lib")
#endif // _UNICODE
#endif // _DEBUG
#endif // _AFXDLL
#pragma comment(lib, "kernel32.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "winspool.lib")
#pragma comment(lib, "advapi32.lib")
#endif // _AFX_NOFORCE_LIBS
extern HINSTANCE AFXISAPI AfxGetResourceHandle();
/////////////////////////////////////////////////////////////////////////////
// AFXIASPI - MFC Internet Server API support
// Classes declared in this file
class CHtmlStream;
class CHttpServerContext;
class CHttpServer;
class CHttpFilterContext;
class CHttpFilter;
// Classes this file uses from elsewhere, sometimes
#ifdef _AFX
class CLongBinary;
class CByteArray;
#endif
///////////////////////////////////////////////////////////////////////
// CHtmlStream -- manages in-memory HTML
class CHtmlStream
{
public:
// Constructors
CHtmlStream(UINT nGrowBytes = 4096);
CHtmlStream(BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes = 0);
// Operations
void Attach(BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes = 0);
BYTE* Detach();
DWORD GetStreamSize() const;
virtual void Abort();
virtual void Close();
virtual void InitStream();
virtual void Reset();
virtual void Write(const void* lpBuf, UINT nCount);
CHtmlStream& operator<<(LPCTSTR psz);
CHtmlStream& operator<<(short int w);
CHtmlStream& operator<<(long int dw);
CHtmlStream& operator<<(const CHtmlStream& stream);
CHtmlStream& operator<<(double d);
CHtmlStream& operator<<(float f);
#ifdef _AFX
CHtmlStream& operator<<(const CByteArray& array);
CHtmlStream& operator<<(const CLongBinary& blob);
#endif
// Advanced Overridables
protected:
virtual BYTE* Alloc(DWORD nBytes);
virtual BYTE* Realloc(BYTE* lpMem, DWORD nBytes);
virtual BYTE* Memcpy(BYTE* lpMemTarget, const BYTE* lpMemSource, UINT nBytes);
virtual void GrowStream(DWORD dwNewLen);
DWORD m_nStreamSize;
public:
virtual void Free(BYTE* lpMem);
// Implementation
protected:
UINT m_nGrowBytes;
DWORD m_nPosition;
DWORD m_nBufferSize;
BYTE* m_lpBuffer;
BOOL m_bAutoDelete;
public:
virtual ~CHtmlStream();
};
///////////////////////////////////////////////////////////////////////
// Status codes for HTTP transactions
#ifndef _WININET_ // these symbols may come from WININET.H
#define HTTP_STATUS_OK 200 // OK
#define HTTP_STATUS_CREATED 201 // created
#define HTTP_STATUS_ACCEPTED 202 // accepted
#define HTTP_STATUS_NO_CONTENT 204 // no content
#define HTTP_STATUS_REDIRECT 301 // moved permanently
#define HTTP_STATUS_TEMP_REDIRECT 302 // moved temporarily
#define HTTP_STATUS_NOT_MODIFIED 304 // not modified
#define HTTP_STATUS_BAD_REQUEST 400 // bad request
#define HTTP_STATUS_AUTH_REQUIRED 401 // unauthorized
#define HTTP_STATUS_FORBIDDEN 403 // forbidden
#define HTTP_STATUS_NOT_FOUND 404 // not found
#define HTTP_STATUS_SERVER_ERROR 500 // internal server error
#define HTTP_STATUS_NOT_IMPLEMENTED 501 // not implemented
#define HTTP_STATUS_BAD_GATEWAY 502 // bad gateway
#define HTTP_STATUS_SERVICE_NA 503 // service unavailable
#endif
///////////////////////////////////////////////////////////////////////
// Parse Map macros
#ifndef AFX_PARSE_CALL
#define AFX_PARSE_CALL
#endif
typedef void (AFX_PARSE_CALL CHttpServer::*AFX_PISAPICMD)(CHttpServerContext* pCtxt);
struct AFX_PARSEMAP_ENTRY; // declared after CHttpServer, below
struct AFX_PARSEMAP
{
UINT (PASCAL* pfnGetNumMapEntries)();
#ifdef _AFXDLL
const AFX_PARSEMAP* (PASCAL* pfnGetBaseMap)();
#else
const AFX_PARSEMAP* pBaseMap;
#endif
const AFX_PARSEMAP_ENTRY* lpEntries;
~AFX_PARSEMAP();
};
struct AFX_PARSEMAP_ENTRY_PARAMS
{
int nParams; // number of parameters
int nRequired; // number of parameters without defaults
// all of these are arrays!
LPTSTR* ppszInfo; // pointers to name[2n], pointer to default[2n+1]
BYTE* ppszDefaults; // pointers to coerced default values
BYTE* ppszValues; // pointers to coerced actual values
~AFX_PARSEMAP_ENTRY_PARAMS();
};
#ifdef _AFXDLL
#define DECLARE_PARSE_MAP() \
private: \
static AFX_PARSEMAP_ENTRY _parseEntries[]; \
public: \
static const AFX_PARSEMAP parseMap; \
static const AFX_PARSEMAP* PASCAL _GetBaseParseMap(); \
static UINT PASCAL GetNumMapEntries(); \
virtual const AFX_PARSEMAP* GetParseMap() const; \
#else
#define DECLARE_PARSE_MAP() \
private: \
static AFX_PARSEMAP_ENTRY _parseEntries[]; \
public: \
static const AFX_PARSEMAP parseMap; \
static UINT PASCAL GetNumMapEntries(); \
virtual const AFX_PARSEMAP* GetParseMap() const; \
#endif // _AFXDLL
#ifdef _AFXDLL
#define BEGIN_PARSE_MAP(theClass, baseClass) \
const AFX_PARSEMAP* PASCAL theClass::_GetBaseParseMap() \
{ return &baseClass::parseMap; } \
typedef void (AFX_PARSE_CALL theClass::*theClass##CALL)(CHttpServerContext*); \
const AFX_PARSEMAP* theClass::GetParseMap() const \
{ return &theClass::parseMap; } \
AFXIS_DATADEF const AFX_PARSEMAP theClass::parseMap = \
{ &theClass::GetNumMapEntries, &theClass::_GetBaseParseMap, &theClass::_parseEntries[0] }; \
AFX_PARSEMAP_ENTRY theClass::_parseEntries[] = \
{ \
#else
#define BEGIN_PARSE_MAP(theClass, baseClass) \
typedef void (AFX_PARSE_CALL theClass::*theClass##CALL)(CHttpServerContext*); \
const AFX_PARSEMAP* theClass::GetParseMap() const \
{ return &theClass::parseMap; } \
AFXIS_DATADEF const AFX_PARSEMAP theClass::parseMap = \
{ &theClass::GetNumMapEntries, &baseClass::parseMap, &theClass::_parseEntries[0] }; \
AFX_PARSEMAP_ENTRY theClass::_parseEntries[] = \
{ \
#endif
#define ON_PARSE_COMMAND(FnName, mapClass, Args) \
{ _T(#FnName), (AFX_PISAPICMD) (mapClass##CALL)mapClass::FnName,\
Args, NULL },
#define ON_PARSE_COMMAND_PARAMS(Params) \
{ NULL, (AFX_PISAPICMD) NULL, Params, NULL },
#define DEFAULT_PARSE_COMMAND(FnName, mapClass) \
{ _T(#FnName), (AFX_PISAPICMD) (mapClass##CALL)mapClass::FnName,\
NULL, NULL },
#define END_PARSE_MAP(theClass) \
}; \
UINT PASCAL theClass::GetNumMapEntries() { \
return sizeof(theClass::_parseEntries) /\
sizeof(AFX_PARSEMAP_ENTRY); } \
///////////////////////////////////////////////////////////////////////
//
class CHttpServerContext
{
public:
CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB);
virtual ~CHttpServerContext();
// Operations
BOOL GetServerVariable(LPTSTR lpszVariableName,
LPVOID lpvBuffer, LPDWORD lpdwSize);
BOOL WriteClient(LPVOID lpvBuffer, LPDWORD lpdwBytes, DWORD dwReserved = 0);
BOOL ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize);
BOOL ServerSupportFunction(DWORD dwHSERRequest,
LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType);
BOOL TransmitFile(HANDLE hFile,
DWORD dwFlags = HSE_IO_DISCONNECT_AFTER_SEND,
LPVOID pstrHeader = NULL, DWORD dwHeaderLen = 0,
LPVOID pstrTrailer = NULL, DWORD dwTrailerLen = 0);
CHttpServerContext& operator<<(LPCTSTR psz);
CHttpServerContext& operator<<(long int dw);
CHttpServerContext& operator<<(short int w);
CHttpServerContext& operator<<(const CHtmlStream& stream);
CHttpServerContext& operator<<(double d);
CHttpServerContext& operator<<(float f);
#ifdef _AFX
CHttpServerContext& operator<<(const CLongBinary& blob);
CHttpServerContext& operator<<(const CByteArray& array);
#endif
DWORD SetChunkSize(DWORD dwNewSize);
DWORD GetChunkSize() const;
void Reset();
// Attributes
public:
BOOL m_bSendHeaders;
DWORD m_dwStatusCode;
EXTENSION_CONTROL_BLOCK* const m_pECB;
CHtmlStream* m_pStream;
DWORD m_dwEndOfHeaders;
#ifdef _DEBUG
DWORD m_dwOldEndOfHeaders;
#endif
// Implementation
DWORD m_dwBytesReceived;
DWORD m_dwChunkSize;
};
///////////////////////////////////////////////////////////////////////
// Internet Information Server Extension Support
class CHttpServer
{
public:
CHttpServer(TCHAR cDelimiter = '&');
virtual ~CHttpServer();
enum errors {
callOK = 0, // everything is fine
callParamRequired, // a required parameter was missing
callBadParamCount, // there were too many or too few parameters
callBadCommand, // the command name was not found
callNoStackSpace, // no stack space was available
callNoStream, // no CHtmlStream was available
callMissingQuote, // a parameter had a bad format
callMissingParams, // no parameters were available
callBadParam, // a paremeter had a bad format (ie, only one quote)
};
// overridables
virtual int CallFunction(CHttpServerContext* pCtxt,
LPTSTR pszQuery, LPTSTR pszCommand);
virtual BOOL OnParseError(CHttpServerContext* pCtxt, int nCause);
virtual BOOL OnWriteBody(CHttpServerContext* pCtxt, LPBYTE pbContent,
DWORD dwSize, DWORD dwReserved = 0);
// operations
virtual void EndContent(CHttpServerContext* pCtxt) const;
virtual void StartContent(CHttpServerContext* pCtxt) const;
virtual void WriteTitle(CHttpServerContext* pCtxt) const;
virtual LPCTSTR GetTitle() const;
void AddHeader(CHttpServerContext* pCtxt, LPCTSTR pszString) const;
virtual BOOL TerminateExtension(DWORD dwFlags);
virtual DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB);
virtual BOOL GetExtensionVersion(HSE_VERSION_INFO *pVer);
virtual CHtmlStream* ConstructStream();
virtual BOOL InitInstance(CHttpServerContext* pCtxt);
// implementation
protected:
UINT PASCAL GetStackSize(const BYTE* pbParams);
int CallMemberFunc(CHttpServerContext* pCtxt,
const AFX_PARSEMAP_ENTRY* pEntry,
AFX_PARSEMAP_ENTRY* pParams, LPTSTR szParams);
LPTSTR GetQuery(CHttpServerContext* pCtxt, LPTSTR lpszQuery);
const AFX_PARSEMAP_ENTRY* LookUp(LPCTSTR szMethod,
const AFX_PARSEMAP*& pMap, AFX_PARSEMAP_ENTRY*& pParams,
AFX_PISAPICMD pCmdDefault = NULL);
int CountParams(LPCTSTR pszCommandLine, int& nCount);
int ParseDefaultParams(AFX_PARSEMAP_ENTRY* pParams,
int nParams, AFX_PARSEMAP_ENTRY_PARAMS*& pBlock,
const BYTE* pbTypes);
LPVOID PreprocessString(LPTSTR psz);
void BuildStatusCode(LPTSTR szResponse, DWORD dwCode);
#ifdef _PPC_
int PushDefaultStackArgs(BYTE* pStack,
CHttpServerContext* pCtxt, const BYTE* pbParams,
LPTSTR lpszParams, AFX_PARSEMAP_ENTRY_PARAMS* pDefParams,
int nSizeArgs);
int PushStackArgs(BYTE* pStack, CHttpServerContext* pCtxt,
const BYTE* pbParams, LPTSTR lpszParams, UINT nSizeArgs);
BYTE* StoreStackParameter(BYTE* pStack, BYTE nType,
LPTSTR pszCurParam, UINT nSizeArgs, BOOL bDoShadow);
BYTE* StoreRawStackParameter(BYTE* pStack, BYTE nType,
BYTE* pRawParam, int nSizeArgs);
#else
int PushDefaultStackArgs(BYTE* pStack,
CHttpServerContext* pCtxt, const BYTE* pbParams,
LPTSTR lpszParams, AFX_PARSEMAP_ENTRY_PARAMS* pDefParams);
int PushStackArgs(BYTE* pStack, CHttpServerContext* pCtxt,
const BYTE* pbParams, LPTSTR lpszParams);
BYTE* StoreStackParameter(BYTE* pStack, BYTE nType, LPTSTR pszParam);
BYTE* StoreRawStackParameter(BYTE* pStack, BYTE nType, BYTE* pRawParam);
#endif
LPCRITICAL_SECTION m_pCritSec;
const TCHAR m_cTokenDelimiter; // can't EVER change
DECLARE_PARSE_MAP()
};
extern "C" BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer);
extern "C" DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB);
struct AFX_PARSEMAP_ENTRY
{
LPTSTR pszFnName; // if default param entry, ptr to AFX_PARSEMAP_ENTRY_PARAMS
AFX_PISAPICMD pfn; // NULL if default param entry
LPCSTR pszArgs; // NULL if default function entry
LPSTR pszParamInfo; // copy of pszArgs for parsing
};
///////////////////////////////////////////////////////////////////////
// Constants to describe parameter types
#define ITS_EMPTY "\x06" // no parameters
#define ITS_I2 "\x01" // a 'short'
#define ITS_I4 "\x02" // a 'long'
#define ITS_R4 "\x03" // a 'float'
#define ITS_R8 "\x04" // a 'double'
#define ITS_PSTR "\x05" // a 'LPCTSTR'
#define ITS_RAW "\x07" // exactly as received
enum INETVARENUM
{
IT_I2 = 1,
IT_I4 = 2,
IT_R4 = 3,
IT_R8 = 4,
IT_PSTR = 5,
IT_EMPTY = 6,
IT_RAW = 7,
};
///////////////////////////////////////////////////////////////////////
// Internet Information Server Entry Points
extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
DWORD dwNotificationType, LPVOID pvNotification);
extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer);
///////////////////////////////////////////////////////////////////////
// Internet Information Server Filter Support
class CHttpFilterContext
{
public:
CHttpFilterContext(PHTTP_FILTER_CONTEXT pfc);
~CHttpFilterContext() { }
BOOL GetServerVariable(LPTSTR lpszVariableName, LPVOID lpvBuffer,
LPDWORD lpdwSize);
BOOL AddResponseHeaders(LPTSTR lpszHeaders, DWORD dwReserved = 0);
BOOL WriteClient(LPVOID lpvBuffer, LPDWORD lpdwBytes,
DWORD dwReserved = 0);
LPVOID AllocMem(DWORD cbSize, DWORD dwReserved = 0);
BOOL ServerSupportFunction(enum SF_REQ_TYPE sfReq,
LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType);
PHTTP_FILTER_CONTEXT const m_pFC;
};
///////////////////////////////////////////////////////////////////////
//
class CHttpFilter
{
public:
CHttpFilter();
~CHttpFilter();
protected:
public:
virtual DWORD HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
DWORD dwNotificationType, LPVOID pvNotification);
virtual BOOL GetFilterVersion(PHTTP_FILTER_VERSION pVer);
virtual DWORD OnReadRawData(CHttpFilterContext* pfc, PHTTP_FILTER_RAW_DATA pRawData);
virtual DWORD OnPreprocHeaders(CHttpFilterContext* pfc, PHTTP_FILTER_PREPROC_HEADERS pHeaders);
virtual DWORD OnAuthentication(CHttpFilterContext* pfc, PHTTP_FILTER_AUTHENT pAuthent);
virtual DWORD OnUrlMap(CHttpFilterContext* pfc, PHTTP_FILTER_URL_MAP pUrlMap);
virtual DWORD OnSendRawData(CHttpFilterContext* pfc, PHTTP_FILTER_RAW_DATA pRawData);
virtual DWORD OnLog(CHttpFilterContext* pfc, PHTTP_FILTER_LOG pLog);
virtual DWORD OnEndOfNetSession(CHttpFilterContext* pfc);
virtual DWORD OnEndOfRequest(CHttpFilterContext* pfc);
};
/////////////////////////////////////////////////////////////////////////////
// Alternate debugging suppot
#include <crtdbg.h>
#ifdef _AFX
#define ISAPIASSERT(expr) ASSERT(expr)
#define ISAPITRACE TRACE
#define ISAPITRACE0(str) TRACE0(str)
#define ISAPITRACE1(str, arg1) TRACE1(str, arg1)
#define ISAPITRACE2(str, arg1, arg2) TRACE2(str, arg1, arg2)
#define ISAPITRACE3(str, arg1, arg2, arg3) TRACE3(str, arg1, arg2, arg3)
#ifdef _DEBUG
#define ISAPIVERIFY(f) ASSERT(f)
#else
#define ISAPIVERIFY(f) ((void)(f))
#endif // _DEBUG
#else // !_AFX
#define ISAPIASSERT(expr) _ASSERTE(expr)
#define ISAPITRACE0(str) _RPT0(_CRT_WARN, str)
#define ISAPITRACE1(str, arg1) _RPT1(_CRT_WARN, str, arg1)
#define ISAPITRACE2(str, arg1, arg2) _RPT2(_CRT_WARN, str, arg1, arg2)
#define ISAPITRACE3(str, arg1, arg2, arg3) _RPT3(_CRT_WARN, arg1, arg2, arg3)
#ifdef _DEBUG
void AFXISAPI_CDECL AfxISAPITrace(LPCTSTR lpszFormat, ...);
#define ISAPIVERIFY(expr) _ASSERTE(expr)
#define ISAPITRACE AfxISAPITrace
#else
AFX_INLINE void AfxISAPITrace(LPCTSTR, ...) { }
#define ISAPIVERIFY(expr) ((void)(expr))
#define ISAPITRACE AfxISAPITrace
#endif // _DEBUG
#endif // _AFX
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_ENABLE_INLINES
#define _AFXISAPI_INLINE AFX_INLINE
#include <afxisapi.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // the whole file
@@ -0,0 +1,123 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1995-1998 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.
// Inlines for AFXISAPI.H
#ifdef _AFXISAPI_INLINE
_AFXISAPI_INLINE CHttpServerContext::CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB)
#ifdef _DEBUG
: m_dwStatusCode(DWORD(-1)), m_bSendHeaders(TRUE), m_pECB(pECB),
m_pStream(NULL), m_dwEndOfHeaders(0), m_dwOldEndOfHeaders(0),
m_dwChunkSize(0)
#else
: m_dwStatusCode(DWORD(-1)), m_bSendHeaders(TRUE), m_pECB(pECB),
m_pStream(NULL), m_dwEndOfHeaders(0), m_dwChunkSize(0)
#endif
{ }
_AFXISAPI_INLINE CHttpServerContext::~CHttpServerContext()
{ if (m_pStream != NULL) delete m_pStream; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(double d)
{ ISAPIASSERT(m_pStream != NULL);
if (m_pStream != NULL) *m_pStream << d;
return *this; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(float f)
{ ISAPIASSERT(m_pStream != NULL);
if (m_pStream != NULL) *m_pStream << f;
return *this; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(long int dw)
{ ISAPIASSERT(m_pStream != NULL);
if (m_pStream != NULL) *m_pStream << dw;
return *this; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(short int w)
{ ISAPIASSERT(m_pStream != NULL);
if (m_pStream != NULL) *m_pStream << w;
return *this; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(const CHtmlStream& stream)
{ ISAPIASSERT(m_pStream != NULL);
if (m_pStream != NULL) *m_pStream << stream;
return *this; }
_AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(LPCTSTR psz)
{ ISAPIASSERT(m_pStream != NULL && psz != NULL);
if (m_pStream != NULL && psz != NULL) *m_pStream << psz;
return *this; }
_AFXISAPI_INLINE BOOL CHttpServerContext::GetServerVariable(LPTSTR lpszVariableName,
LPVOID lpvBuffer, LPDWORD lpdwSize)
{
return m_pECB->GetServerVariable(m_pECB->ConnID,
lpszVariableName, lpvBuffer, lpdwSize);
}
_AFXISAPI_INLINE BOOL CHttpServerContext::WriteClient(LPVOID pBuffer, LPDWORD lpdwBytes,
DWORD dwReserved /* = 0 */)
{
return m_pECB->WriteClient(m_pECB->ConnID, pBuffer,
lpdwBytes, dwReserved);
}
_AFXISAPI_INLINE BOOL CHttpServerContext::ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize)
{
return m_pECB->ReadClient(m_pECB->ConnID, lpvBuffer, lpdwSize);
}
_AFXISAPI_INLINE BOOL CHttpServerContext::ServerSupportFunction(DWORD dwHSERRequest,
LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
{
return m_pECB->ServerSupportFunction(m_pECB->ConnID, dwHSERRequest,
lpvBuffer, lpdwSize, lpdwDataType);
}
_AFXISAPI_INLINE DWORD CHtmlStream::GetStreamSize() const
{ return m_nStreamSize; }
_AFXISAPI_INLINE CHttpFilterContext::CHttpFilterContext(PHTTP_FILTER_CONTEXT pCtx)
: m_pFC(pCtx)
{ }
_AFXISAPI_INLINE BOOL CHttpFilterContext::GetServerVariable(LPTSTR lpszVariableName,
LPVOID lpvBuffer, LPDWORD lpdwSize)
{
return m_pFC->GetServerVariable(m_pFC, lpszVariableName, lpvBuffer, lpdwSize);
}
_AFXISAPI_INLINE BOOL CHttpFilterContext::AddResponseHeaders(LPTSTR lpszHeaders,
DWORD dwReserved /* = 0 */)
{
return m_pFC->AddResponseHeaders(m_pFC, lpszHeaders, dwReserved);
}
_AFXISAPI_INLINE BOOL CHttpFilterContext::WriteClient(LPVOID lpvBuffer,
LPDWORD lpdwBytes, DWORD dwReserved /* = 0 */)
{
return m_pFC->WriteClient(m_pFC, lpvBuffer, lpdwBytes, dwReserved);
}
_AFXISAPI_INLINE LPVOID CHttpFilterContext::AllocMem(DWORD cbSize,
DWORD dwReserved /* = 0 */)
{
return m_pFC->AllocMem(m_pFC, cbSize, dwReserved);
}
_AFXISAPI_INLINE BOOL CHttpFilterContext::ServerSupportFunction(enum SF_REQ_TYPE sfReq,
LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
{
//WINBUG: HTTPFLT.H has the last two params as type DWORD
return m_pFC->ServerSupportFunction(m_pFC, sfReq, lpvBuffer,
(DWORD) lpdwSize, (DWORD) lpdwDataType);
}
#endif // _AFXISAPI_INLINE
@@ -0,0 +1,45 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXISAPI_RC__
#define __AFXISAPI_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// ISAPI HTML Text for HTTP error conditions
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_HTTP_TITLE "<HEAD><TITLE>HTTP Error %d</TITLE></HEAD>"
AFX_IDS_HTTP_NO_TEXT "<BODY><H1>HTTP Error %d: No message available</H1></BODY>\r\n"
AFX_IDS_HTTP_BAD_REQUEST "<BODY><H1>BAD REQUEST</H1><P>Your client sent a request that this server didn't understand.<br>Request: %s\r\n"
AFX_IDS_HTTP_AUTH_REQUIRED "<BODY><H1>AUTH REQUIRED</H1><P>Browser not authentication-capable or authentication failed.</BODY>\r\n"
AFX_IDS_HTTP_FORBIDDEN "<BODY><H1>FORBIDDEN</H1><P>Your client does not have permission to get this URL from the server.</BODY>\r\n"
AFX_IDS_HTTP_NOT_FOUND "<BODY><H1>NOT FOUND</H1><P>The requested URL was not found on this server.</BODY>\r\n"
AFX_IDS_HTTP_SERVER_ERROR "<BODY><H1>SERVER ERROR</H1>The server encountered an internal error or misconfiguration and was unable to complete your request.</BODY>\r\n"
AFX_IDS_HTTP_NOT_IMPLEMENTED "<BODY><H1>NOT IMPLEMENTED</H1>The server is unable to perform the method <b>%s</b> at this time.</BODY>\r\n"
END
#endif //!_AFXDLL
#endif //!__AFXISAPI_RC__
@@ -0,0 +1,710 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Do not include this file directly (included by AFXWIN.H)
/////////////////////////////////////////////////////////////////////////////
// Entries in a message map (a 'AFX_MSGMAP_ENTRY') table can be of 9 formats
//
// 1) control notification message (i.e. in response to WM_COMMAND)
// WM_COMMAND, nNotifyCode, nControlID, nControlID, signature type, parameterless member function
// (eg: WM_COMMAND, LBN_SELCHANGE, IDC_LISTBOX, AfxSig_vv, ... )
// 2) control notification message range (i.e. in response to WM_COMMAND)
// WM_COMMAND, nNotifyCode, nControlIDFirst, nControlIDLast, signature type, parameterless member function
// (eg: WM_COMMAND, LBN_SELCHANGE, IDC_LISTBOX1, IDC_LISTBOX5, AfxSig_vw, ... )
// 3) WM_NOTIFY notification
// WM_NOTIFY, nNotifyCode, nControlID, nControlID, signature type, ...)
// 3) Update Command UI
// -1, 0, nControlID, 0, signature Unknown, parameterless member function
// 4) Update Command UI Range
// -1, 0, nControlIDFirst, nControlIDLast, signature Unknown, parameterless member function
// 5) menu/accelerator notification message (i.e. special case of first format)
// WM_COMMAND, 0, nID, 0, signature type, parameterless member function
// (eg: WM_COMMAND, 0, IDM_FILESAVE, 0, AfxSig_vv, ... )
// 6) menu/accelerator notification message range
// WM_COMMAND, 0, nIDFirst, nIDLast, signature type, parameterless member function
// (eg: WM_COMMAND, 0, IDM_FILE_MRU1, IDM_FILE_MRU4, AfxSig_vw, ... )
// 7) constant windows message
// nMessage, 0, 0, 0, signature type, member function
// (eg: WM_PAINT, 0, ...)
// 8) variable windows message (using RegisterWindowMessage)
// 0xC000, 0, 0, 0, &nMessage, special member function
//
// The end of the message map is marked with a special value
// 0, 0, AfxSig_end, 0
/////////////////////////////////////////////////////////////////////////////
enum AfxSig
{
AfxSig_end = 0, // [marks end of message map]
AfxSig_bD, // BOOL (CDC*)
AfxSig_bb, // BOOL (BOOL)
AfxSig_bWww, // BOOL (CWnd*, UINT, UINT)
AfxSig_hDWw, // HBRUSH (CDC*, CWnd*, UINT)
AfxSig_hDw, // HBRUSH (CDC*, UINT)
AfxSig_iwWw, // int (UINT, CWnd*, UINT)
AfxSig_iww, // int (UINT, UINT)
AfxSig_iWww, // int (CWnd*, UINT, UINT)
AfxSig_is, // int (LPTSTR)
AfxSig_lwl, // LRESULT (WPARAM, LPARAM)
AfxSig_lwwM, // LRESULT (UINT, UINT, CMenu*)
AfxSig_vv, // void (void)
AfxSig_vw, // void (UINT)
AfxSig_vww, // void (UINT, UINT)
AfxSig_vvii, // void (int, int) // wParam is ignored
AfxSig_vwww, // void (UINT, UINT, UINT)
AfxSig_vwii, // void (UINT, int, int)
AfxSig_vwl, // void (UINT, LPARAM)
AfxSig_vbWW, // void (BOOL, CWnd*, CWnd*)
AfxSig_vD, // void (CDC*)
AfxSig_vM, // void (CMenu*)
AfxSig_vMwb, // void (CMenu*, UINT, BOOL)
AfxSig_vW, // void (CWnd*)
AfxSig_vWww, // void (CWnd*, UINT, UINT)
AfxSig_vWp, // void (CWnd*, CPoint)
AfxSig_vWh, // void (CWnd*, HANDLE)
AfxSig_vwW, // void (UINT, CWnd*)
AfxSig_vwWb, // void (UINT, CWnd*, BOOL)
AfxSig_vwwW, // void (UINT, UINT, CWnd*)
AfxSig_vwwx, // void (UINT, UINT)
AfxSig_vs, // void (LPTSTR)
AfxSig_vOWNER, // void (int, LPTSTR), force return TRUE
AfxSig_iis, // int (int, LPTSTR)
AfxSig_wp, // UINT (CPoint)
AfxSig_wv, // UINT (void)
AfxSig_vPOS, // void (WINDOWPOS*)
AfxSig_vCALC, // void (BOOL, NCCALCSIZE_PARAMS*)
AfxSig_vNMHDRpl, // void (NMHDR*, LRESULT*)
AfxSig_bNMHDRpl, // BOOL (NMHDR*, LRESULT*)
AfxSig_vwNMHDRpl, // void (UINT, NMHDR*, LRESULT*)
AfxSig_bwNMHDRpl, // BOOL (UINT, NMHDR*, LRESULT*)
AfxSig_bHELPINFO, // BOOL (HELPINFO*)
AfxSig_vwSIZING, // void (UINT, LPRECT) -- return TRUE
// signatures specific to CCmdTarget
AfxSig_cmdui, // void (CCmdUI*)
AfxSig_cmduiw, // void (CCmdUI*, UINT)
AfxSig_vpv, // void (void*)
AfxSig_bpv, // BOOL (void*)
// Other aliases (based on implementation)
AfxSig_vwwh, // void (UINT, UINT, HANDLE)
AfxSig_vwp, // void (UINT, CPoint)
AfxSig_bw = AfxSig_bb, // BOOL (UINT)
AfxSig_bh = AfxSig_bb, // BOOL (HANDLE)
AfxSig_iw = AfxSig_bb, // int (UINT)
AfxSig_ww = AfxSig_bb, // UINT (UINT)
AfxSig_bv = AfxSig_wv, // BOOL (void)
AfxSig_hv = AfxSig_wv, // HANDLE (void)
AfxSig_vb = AfxSig_vw, // void (BOOL)
AfxSig_vbh = AfxSig_vww, // void (BOOL, HANDLE)
AfxSig_vbw = AfxSig_vww, // void (BOOL, UINT)
AfxSig_vhh = AfxSig_vww, // void (HANDLE, HANDLE)
AfxSig_vh = AfxSig_vw, // void (HANDLE)
AfxSig_viSS = AfxSig_vwl, // void (int, STYLESTRUCT*)
AfxSig_bwl = AfxSig_lwl,
AfxSig_vwMOVING = AfxSig_vwSIZING, // void (UINT, LPRECT) -- return TRUE
AfxSig_vW2, // void (CWnd*) (CWnd* comes from lParam)
AfxSig_bWCDS, // BOOL (CWnd*, COPYDATASTRUCT*)
AfxSig_bwsp, // BOOL (UINT, short, CPoint)
AfxSig_vws,
};
/////////////////////////////////////////////////////////////////////////////
// Command notifications for CCmdTarget notifications
#define CN_COMMAND 0 // void ()
#define CN_UPDATE_COMMAND_UI ((UINT)(-1)) // void (CCmdUI*)
#define CN_EVENT ((UINT)(-2)) // OLE event
#define CN_OLECOMMAND ((UINT)(-3)) // OLE document command
#define CN_OLE_UNREGISTER ((UINT)(-4)) // OLE unregister
// > 0 are control notifications
// < 0 are for MFC's use
#define ON_COMMAND(id, memberFxn) \
{ WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)id, AfxSig_vv, (AFX_PMSG)&memberFxn },
// ON_COMMAND(id, OnFoo) is the same as
// ON_CONTROL(0, id, OnFoo) or ON_BN_CLICKED(0, id, OnFoo)
#define ON_COMMAND_RANGE(id, idLast, memberFxn) \
{ WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)idLast, AfxSig_vw, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(UINT))&memberFxn },
// ON_COMMAND_RANGE(id, idLast, OnFoo) is the same as
// ON_CONTROL_RANGE(0, id, idLast, OnFoo)
#define ON_COMMAND_EX(id, memberFxn) \
{ WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)id, AfxSig_bw, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)(UINT))&memberFxn },
#define ON_COMMAND_EX_RANGE(id, idLast, memberFxn) \
{ WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)idLast, AfxSig_bw, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)(UINT))&memberFxn },
// update ui's are listed as WM_COMMAND's so they get routed like commands
#define ON_UPDATE_COMMAND_UI(id, memberFxn) \
{ WM_COMMAND, CN_UPDATE_COMMAND_UI, (WORD)id, (WORD)id, AfxSig_cmdui, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(CCmdUI*))&memberFxn },
#define ON_UPDATE_COMMAND_UI_RANGE(id, idLast, memberFxn) \
{ WM_COMMAND, CN_UPDATE_COMMAND_UI, (WORD)id, (WORD)idLast, AfxSig_cmdui, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(CCmdUI*))&memberFxn },
#define ON_NOTIFY(wNotifyCode, id, memberFxn) \
{ WM_NOTIFY, (WORD)(int)wNotifyCode, (WORD)id, (WORD)id, AfxSig_vNMHDRpl, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(NMHDR*, LRESULT*))&memberFxn },
#define ON_NOTIFY_RANGE(wNotifyCode, id, idLast, memberFxn) \
{ WM_NOTIFY, (WORD)(int)wNotifyCode, (WORD)id, (WORD)idLast, AfxSig_vwNMHDRpl, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(UINT, NMHDR*, LRESULT*))&memberFxn },
#define ON_NOTIFY_EX(wNotifyCode, id, memberFxn) \
{ WM_NOTIFY, (WORD)(int)wNotifyCode, (WORD)id, (WORD)id, AfxSig_bwNMHDRpl, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)(UINT, NMHDR*, LRESULT*))&memberFxn },
#define ON_NOTIFY_EX_RANGE(wNotifyCode, id, idLast, memberFxn) \
{ WM_NOTIFY, (WORD)(int)wNotifyCode, (WORD)id, (WORD)idLast, AfxSig_bwNMHDRpl, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)(UINT, NMHDR*, LRESULT*))&memberFxn },
// for general controls
#define ON_CONTROL(wNotifyCode, id, memberFxn) \
{ WM_COMMAND, (WORD)wNotifyCode, (WORD)id, (WORD)id, AfxSig_vv, \
(AFX_PMSG)&memberFxn },
#define ON_CONTROL_RANGE(wNotifyCode, id, idLast, memberFxn) \
{ WM_COMMAND, (WORD)wNotifyCode, (WORD)id, (WORD)idLast, AfxSig_vw, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(UINT))&memberFxn },
#define WM_REFLECT_BASE 0xBC00
// for control notification reflection
#define ON_CONTROL_REFLECT(wNotifyCode, memberFxn) \
{ WM_COMMAND+WM_REFLECT_BASE, (WORD)wNotifyCode, 0, 0, AfxSig_vv, \
(AFX_PMSG)&memberFxn },
#define ON_CONTROL_REFLECT_EX(wNotifyCode, memberFxn) \
{ WM_COMMAND+WM_REFLECT_BASE, (WORD)wNotifyCode, 0, 0, AfxSig_bv, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)())&memberFxn },
#define ON_NOTIFY_REFLECT(wNotifyCode, memberFxn) \
{ WM_NOTIFY+WM_REFLECT_BASE, (WORD)(int)wNotifyCode, 0, 0, AfxSig_vNMHDRpl, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(NMHDR*, LRESULT*))&memberFxn },
#define ON_NOTIFY_REFLECT_EX(wNotifyCode, memberFxn) \
{ WM_NOTIFY+WM_REFLECT_BASE, (WORD)(int)wNotifyCode, 0, 0, AfxSig_bNMHDRpl, \
(AFX_PMSG)(BOOL (AFX_MSG_CALL CCmdTarget::*)(NMHDR*, LRESULT*))&memberFxn },
#define ON_UPDATE_COMMAND_UI_REFLECT(memberFxn) \
{ WM_COMMAND+WM_REFLECT_BASE, (WORD)CN_UPDATE_COMMAND_UI, 0, 0, AfxSig_cmdui, \
(AFX_PMSG)(void (AFX_MSG_CALL CCmdTarget::*)(CCmdUI*))&memberFxn },
/////////////////////////////////////////////////////////////////////////////
// Message map tables for Windows messages
#define ON_WM_CREATE() \
{ WM_CREATE, 0, 0, 0, AfxSig_is, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(LPCREATESTRUCT))&OnCreate },
#define ON_WM_COPYDATA() \
{ WM_COPYDATA, 0, 0, 0, AfxSig_bWCDS, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(CWnd*, COPYDATASTRUCT*))&OnCopyData },
#define ON_WM_DESTROY() \
{ WM_DESTROY, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnDestroy },
#define ON_WM_MOVE() \
{ WM_MOVE, 0, 0, 0, AfxSig_vvii, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, int))&OnMove },
#define ON_WM_SIZE() \
{ WM_SIZE, 0, 0, 0, AfxSig_vwii, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, int, int))&OnSize },
#define ON_WM_ACTIVATE() \
{ WM_ACTIVATE, 0, 0, 0, AfxSig_vwWb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CWnd*, BOOL))&OnActivate },
#define ON_WM_SETFOCUS() \
{ WM_SETFOCUS, 0, 0, 0, AfxSig_vW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*))&OnSetFocus },
#define ON_WM_KILLFOCUS() \
{ WM_KILLFOCUS, 0, 0, 0, AfxSig_vW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*))&OnKillFocus },
#define ON_WM_ENABLE() \
{ WM_ENABLE, 0, 0, 0, AfxSig_vb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL))&OnEnable },
#define ON_WM_HELPINFO() \
{ WM_HELP, 0, 0, 0, AfxSig_bHELPINFO, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(HELPINFO*))&OnHelpInfo },
#define ON_WM_PAINT() \
{ WM_PAINT, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnPaint },
#define ON_WM_CLOSE() \
{ WM_CLOSE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnClose },
#define ON_WM_QUERYENDSESSION() \
{ WM_QUERYENDSESSION, 0, 0, 0, AfxSig_bv, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(void))&OnQueryEndSession },
#define ON_WM_QUERYOPEN() \
{ WM_QUERYOPEN, 0, 0, 0, AfxSig_bv, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(void))&OnQueryOpen },
#define ON_WM_ERASEBKGND() \
{ WM_ERASEBKGND, 0, 0, 0, AfxSig_bD, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(CDC*))&OnEraseBkgnd },
#define ON_WM_SYSCOLORCHANGE() \
{ WM_SYSCOLORCHANGE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnSysColorChange },
#define ON_WM_ENDSESSION() \
{ WM_ENDSESSION, 0, 0, 0, AfxSig_vb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL))&OnEndSession },
#define ON_WM_SHOWWINDOW() \
{ WM_SHOWWINDOW, 0, 0, 0, AfxSig_vbw, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL, UINT))&OnShowWindow },
#define ON_WM_CTLCOLOR() \
{ WM_CTLCOLOR, 0, 0, 0, AfxSig_hDWw, \
(AFX_PMSG)(AFX_PMSGW)(HBRUSH (AFX_MSG_CALL CWnd::*)(CDC*, CWnd*, UINT))&OnCtlColor },
#define ON_WM_CTLCOLOR_REFLECT() \
{ WM_CTLCOLOR+WM_REFLECT_BASE, 0, 0, 0, AfxSig_hDw, \
(AFX_PMSG)(AFX_PMSGW)(HBRUSH (AFX_MSG_CALL CWnd::*)(CDC*, UINT))CtlColor },
#if (WINVER >= 0x0400)
#define ON_WM_SETTINGCHANGE() \
{ WM_SETTINGCHANGE, 0, 0, 0, AfxSig_vws, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPCTSTR))&OnSettingChange },
#endif
#define ON_WM_WININICHANGE() \
{ WM_WININICHANGE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(LPCTSTR))&OnWinIniChange },
#define ON_WM_DEVMODECHANGE() \
{ WM_DEVMODECHANGE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(LPTSTR))&OnDevModeChange },
#define ON_WM_ACTIVATEAPP() \
{ WM_ACTIVATEAPP, 0, 0, 0, AfxSig_vbh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL, HTASK))&OnActivateApp },
#define ON_WM_FONTCHANGE() \
{ WM_FONTCHANGE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnFontChange },
#define ON_WM_TIMECHANGE() \
{ WM_TIMECHANGE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnTimeChange },
#define ON_WM_CANCELMODE() \
{ WM_CANCELMODE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnCancelMode },
#define ON_WM_SETCURSOR() \
{ WM_SETCURSOR, 0, 0, 0, AfxSig_bWww, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(CWnd*, UINT, UINT))&OnSetCursor },
#define ON_WM_MOUSEACTIVATE() \
{ WM_MOUSEACTIVATE, 0, 0, 0, AfxSig_iWww, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(CWnd*, UINT, UINT))&OnMouseActivate },
#define ON_WM_CHILDACTIVATE() \
{ WM_CHILDACTIVATE, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnChildActivate },
#define ON_WM_GETMINMAXINFO() \
{ WM_GETMINMAXINFO, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(MINMAXINFO*))&OnGetMinMaxInfo },
#define ON_WM_ICONERASEBKGND() \
{ WM_ICONERASEBKGND, 0, 0, 0, AfxSig_vD, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CDC*))&OnIconEraseBkgnd },
#define ON_WM_SPOOLERSTATUS() \
{ WM_SPOOLERSTATUS, 0, 0, 0, AfxSig_vww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT))&OnSpoolerStatus },
#define ON_WM_DRAWITEM() \
{ WM_DRAWITEM, 0, 0, 0, AfxSig_vOWNER, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, LPDRAWITEMSTRUCT))&OnDrawItem },
#define ON_WM_DRAWITEM_REFLECT() \
{ WM_DRAWITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(LPDRAWITEMSTRUCT))DrawItem },
#define ON_WM_MEASUREITEM() \
{ WM_MEASUREITEM, 0, 0, 0, AfxSig_vOWNER, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, LPMEASUREITEMSTRUCT))&OnMeasureItem },
#define ON_WM_MEASUREITEM_REFLECT() \
{ WM_MEASUREITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(LPMEASUREITEMSTRUCT))MeasureItem },
#define ON_WM_DELETEITEM() \
{ WM_DELETEITEM, 0, 0, 0, AfxSig_vOWNER, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, LPDELETEITEMSTRUCT))&OnDeleteItem },
#define ON_WM_DELETEITEM_REFLECT() \
{ WM_DELETEITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(LPDELETEITEMSTRUCT))DeleteItem },
#define ON_WM_CHARTOITEM() \
{ WM_CHARTOITEM, 0, 0, 0, AfxSig_iwWw, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(UINT, CListBox*, UINT))&OnCharToItem },
#define ON_WM_CHARTOITEM_REFLECT() \
{ WM_CHARTOITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_iww, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(UINT, UINT))CharToItem },
#define ON_WM_VKEYTOITEM() \
{ WM_VKEYTOITEM, 0, 0, 0, AfxSig_iwWw, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(UINT, CListBox*, UINT))&OnVKeyToItem },
#define ON_WM_VKEYTOITEM_REFLECT() \
{ WM_VKEYTOITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_iww, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(UINT, UINT))VKeyToItem },
#define ON_WM_QUERYDRAGICON() \
{ WM_QUERYDRAGICON, 0, 0, 0, AfxSig_hv, \
(AFX_PMSG)(AFX_PMSGW)(HCURSOR (AFX_MSG_CALL CWnd::*)())&OnQueryDragIcon },
#define ON_WM_COMPAREITEM() \
{ WM_COMPAREITEM, 0, 0, 0, AfxSig_iis, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(int, LPCOMPAREITEMSTRUCT))&OnCompareItem },
#define ON_WM_COMPAREITEM_REFLECT() \
{ WM_COMPAREITEM+WM_REFLECT_BASE, 0, 0, 0, AfxSig_is, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(LPCOMPAREITEMSTRUCT))CompareItem },
#define ON_WM_COMPACTING() \
{ WM_COMPACTING, 0, 0, 0, AfxSig_vw, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT))&OnCompacting },
#define ON_WM_NCCREATE() \
{ WM_NCCREATE, 0, 0, 0, AfxSig_is, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(LPCREATESTRUCT))&OnNcCreate },
#define ON_WM_NCDESTROY() \
{ WM_NCDESTROY, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnNcDestroy },
#define ON_WM_NCCALCSIZE() \
{ WM_NCCALCSIZE, 0, 0, 0, AfxSig_vCALC, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL, NCCALCSIZE_PARAMS*))&OnNcCalcSize },
#define ON_WM_NCHITTEST() \
{ WM_NCHITTEST, 0, 0, 0, AfxSig_wp, \
(AFX_PMSG)(AFX_PMSGW)(UINT (AFX_MSG_CALL CWnd::*)(CPoint))&OnNcHitTest },
#define ON_WM_NCPAINT() \
{ WM_NCPAINT, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnNcPaint },
#define ON_WM_NCACTIVATE() \
{ WM_NCACTIVATE, 0, 0, 0, AfxSig_bb, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(BOOL))&OnNcActivate },
#define ON_WM_GETDLGCODE() \
{ WM_GETDLGCODE, 0, 0, 0, AfxSig_wv, \
(AFX_PMSG)(AFX_PMSGW)(UINT (AFX_MSG_CALL CWnd::*)(void))&OnGetDlgCode },
#define ON_WM_NCMOUSEMOVE() \
{ WM_NCMOUSEMOVE, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcMouseMove },
#define ON_WM_NCLBUTTONDOWN() \
{ WM_NCLBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcLButtonDown },
#define ON_WM_NCLBUTTONUP() \
{ WM_NCLBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcLButtonUp },
#define ON_WM_NCLBUTTONDBLCLK() \
{ WM_NCLBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcLButtonDblClk },
#define ON_WM_NCRBUTTONDOWN() \
{ WM_NCRBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcRButtonDown },
#define ON_WM_NCRBUTTONUP() \
{ WM_NCRBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcRButtonUp },
#define ON_WM_NCRBUTTONDBLCLK() \
{ WM_NCRBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcRButtonDblClk },
#define ON_WM_NCMBUTTONDOWN() \
{ WM_NCMBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcMButtonDown },
#define ON_WM_NCMBUTTONUP() \
{ WM_NCMBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcMButtonUp },
#define ON_WM_NCMBUTTONDBLCLK() \
{ WM_NCMBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnNcMButtonDblClk },
#define ON_WM_KEYDOWN() \
{ WM_KEYDOWN, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnKeyDown },
#define ON_WM_KEYUP() \
{ WM_KEYUP, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnKeyUp },
#define ON_WM_CHAR() \
{ WM_CHAR, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnChar },
#define ON_WM_DEADCHAR() \
{ WM_DEADCHAR, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnDeadChar },
#define ON_WM_SYSKEYDOWN() \
{ WM_SYSKEYDOWN, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnSysKeyDown },
#define ON_WM_SYSKEYUP() \
{ WM_SYSKEYUP, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnSysKeyUp },
#define ON_WM_SYSCHAR() \
{ WM_SYSCHAR, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnSysChar },
#define ON_WM_SYSDEADCHAR() \
{ WM_SYSDEADCHAR, 0, 0, 0, AfxSig_vwww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, UINT))&OnSysDeadChar },
#define ON_WM_SYSCOMMAND() \
{ WM_SYSCOMMAND, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPARAM))&OnSysCommand },
#define ON_WM_TCARD() \
{ WM_TCARD, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, DWORD))&OnTCard },
#define ON_WM_TIMER() \
{ WM_TIMER, 0, 0, 0, AfxSig_vw, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT))&OnTimer },
#define ON_WM_HSCROLL() \
{ WM_HSCROLL, 0, 0, 0, AfxSig_vwwW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, CScrollBar*))&OnHScroll },
#define ON_WM_HSCROLL_REFLECT() \
{ WM_HSCROLL+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vwwx, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT))HScroll },
#define ON_WM_VSCROLL() \
{ WM_VSCROLL, 0, 0, 0, AfxSig_vwwW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, CScrollBar*))&OnVScroll },
#define ON_WM_VSCROLL_REFLECT() \
{ WM_VSCROLL+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vwwx, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT))VScroll },
#define ON_WM_INITMENU() \
{ WM_INITMENU, 0, 0, 0, AfxSig_vM, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CMenu*))&OnInitMenu },
#define ON_WM_INITMENUPOPUP() \
{ WM_INITMENUPOPUP, 0, 0, 0, AfxSig_vMwb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CMenu*, UINT, BOOL))&OnInitMenuPopup },
#define ON_WM_MENUSELECT() \
{ WM_MENUSELECT, 0, 0, 0, AfxSig_vwwh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, UINT, HMENU))&OnMenuSelect },
#define ON_WM_MENUCHAR() \
{ WM_MENUCHAR, 0, 0, 0, AfxSig_lwwM, \
(AFX_PMSG)(AFX_PMSGW)(LRESULT (AFX_MSG_CALL CWnd::*)(UINT, UINT, CMenu*))&OnMenuChar },
#define ON_WM_ENTERIDLE() \
{ WM_ENTERIDLE, 0, 0, 0, AfxSig_vwW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CWnd*))&OnEnterIdle },
#define ON_WM_MOUSEMOVE() \
{ WM_MOUSEMOVE, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnMouseMove },
#define ON_WM_MOUSEWHEEL() \
{ WM_MOUSEWHEEL, 0, 0, 0, AfxSig_bwsp, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(UINT, short, CPoint))&OnMouseWheel },
#define ON_WM_LBUTTONDOWN() \
{ WM_LBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnLButtonDown },
#define ON_WM_LBUTTONUP() \
{ WM_LBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnLButtonUp },
#define ON_WM_LBUTTONDBLCLK() \
{ WM_LBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnLButtonDblClk },
#define ON_WM_RBUTTONDOWN() \
{ WM_RBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnRButtonDown },
#define ON_WM_RBUTTONUP() \
{ WM_RBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnRButtonUp },
#define ON_WM_RBUTTONDBLCLK() \
{ WM_RBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnRButtonDblClk },
#define ON_WM_MBUTTONDOWN() \
{ WM_MBUTTONDOWN, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnMButtonDown },
#define ON_WM_MBUTTONUP() \
{ WM_MBUTTONUP, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnMButtonUp },
#define ON_WM_MBUTTONDBLCLK() \
{ WM_MBUTTONDBLCLK, 0, 0, 0, AfxSig_vwp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, CPoint))&OnMButtonDblClk },
#define ON_WM_PARENTNOTIFY() \
{ WM_PARENTNOTIFY, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPARAM))&OnParentNotify },
#define ON_WM_PARENTNOTIFY_REFLECT() \
{ WM_PARENTNOTIFY+WM_REFLECT_BASE, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPARAM))ParentNotify },
#define ON_WM_MDIACTIVATE() \
{ WM_MDIACTIVATE, 0, 0, 0, AfxSig_vbWW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL, CWnd*, CWnd*))&OnMDIActivate },
#define ON_WM_RENDERFORMAT() \
{ WM_RENDERFORMAT, 0, 0, 0, AfxSig_vw, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT))&OnRenderFormat },
#define ON_WM_RENDERALLFORMATS() \
{ WM_RENDERALLFORMATS, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnRenderAllFormats },
#define ON_WM_DESTROYCLIPBOARD() \
{ WM_DESTROYCLIPBOARD, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnDestroyClipboard },
#define ON_WM_DRAWCLIPBOARD() \
{ WM_DRAWCLIPBOARD, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnDrawClipboard },
#define ON_WM_PAINTCLIPBOARD() \
{ WM_PAINTCLIPBOARD, 0, 0, 0, AfxSig_vWh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*, HGLOBAL))&OnPaintClipboard },
#define ON_WM_VSCROLLCLIPBOARD() \
{ WM_VSCROLLCLIPBOARD, 0, 0, 0, AfxSig_vWww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*, UINT, UINT))&OnVScrollClipboard },
#define ON_WM_CONTEXTMENU() \
{ WM_CONTEXTMENU, 0, 0, 0, AfxSig_vWp, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*, CPoint))&OnContextMenu },
#define ON_WM_SIZECLIPBOARD() \
{ WM_SIZECLIPBOARD, 0, 0, 0, AfxSig_vWh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*, HGLOBAL))&OnSizeClipboard },
#define ON_WM_ASKCBFORMATNAME() \
{ WM_ASKCBFORMATNAME, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPTSTR))&OnAskCbFormatName },
#define ON_WM_CHANGECBCHAIN() \
{ WM_CHANGECBCHAIN, 0, 0, 0, AfxSig_vhh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(HWND, HWND))&OnChangeCbChain },
#define ON_WM_HSCROLLCLIPBOARD() \
{ WM_HSCROLLCLIPBOARD, 0, 0, 0, AfxSig_vWww, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*, UINT, UINT))&OnHScrollClipboard },
#define ON_WM_QUERYNEWPALETTE() \
{ WM_QUERYNEWPALETTE, 0, 0, 0, AfxSig_bv, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(void))&OnQueryNewPalette },
#define ON_WM_PALETTECHANGED() \
{ WM_PALETTECHANGED, 0, 0, 0, AfxSig_vW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*))&OnPaletteChanged },
#define ON_WM_PALETTEISCHANGING() \
{ WM_PALETTEISCHANGING, 0, 0, 0, AfxSig_vW, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*))&OnPaletteIsChanging },
#define ON_WM_DROPFILES() \
{ WM_DROPFILES, 0, 0, 0, AfxSig_vh, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(HDROP))&OnDropFiles },
#define ON_WM_WINDOWPOSCHANGING() \
{ WM_WINDOWPOSCHANGING, 0, 0, 0, AfxSig_vPOS, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(WINDOWPOS*))&OnWindowPosChanging },
#define ON_WM_WINDOWPOSCHANGED() \
{ WM_WINDOWPOSCHANGED, 0, 0, 0, AfxSig_vPOS, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(WINDOWPOS*))&OnWindowPosChanged },
#define ON_WM_EXITMENULOOP() \
{ WM_EXITMENULOOP, 0, 0, 0, AfxSig_vb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL))&OnExitMenuLoop },
#define ON_WM_ENTERMENULOOP() \
{ WM_ENTERMENULOOP, 0, 0, 0, AfxSig_vb, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(BOOL))&OnEnterMenuLoop },
#define ON_WM_STYLECHANGED() \
{ WM_STYLECHANGED, 0, 0, 0, AfxSig_viSS, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, LPSTYLESTRUCT))&OnStyleChanged },
#define ON_WM_STYLECHANGING() \
{ WM_STYLECHANGING, 0, 0, 0, AfxSig_viSS, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(int, LPSTYLESTRUCT))&OnStyleChanging },
#define ON_WM_SIZING() \
{ WM_SIZING, 0, 0, 0, AfxSig_vwSIZING, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPRECT))&OnSizing },
#define ON_WM_MOVING() \
{ WM_MOVING, 0, 0, 0, AfxSig_vwMOVING, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(UINT, LPRECT))&OnMoving },
#define ON_WM_CAPTURECHANGED() \
{ WM_CAPTURECHANGED, 0, 0, 0, AfxSig_vW2, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(CWnd*))&OnCaptureChanged },
#define ON_WM_DEVICECHANGE() \
{ WM_DEVICECHANGE, 0, 0, 0, AfxSig_bwl, \
(AFX_PMSG)(AFX_PMSGW)(BOOL (AFX_MSG_CALL CWnd::*)(UINT, DWORD))&OnDeviceChange },
/////////////////////////////////////////////////////////////////////////////
// Message map tables for Control Notification messages
// Static control notification codes
#define ON_STN_CLICKED(id, memberFxn) \
ON_CONTROL(STN_CLICKED, id, memberFxn)
#define ON_STN_DBLCLK(id, memberFxn) \
ON_CONTROL(STN_DBLCLK, id, memberFxn)
#define ON_STN_ENABLE(id, memberFxn) \
ON_CONTROL(STN_ENABLE, id, memberFxn)
#define ON_STN_DISABLE(id, memberFxn) \
ON_CONTROL(STN_DISABLE, id, memberFxn)
// Edit Control Notification Codes
#define ON_EN_SETFOCUS(id, memberFxn) \
ON_CONTROL(EN_SETFOCUS, id, memberFxn)
#define ON_EN_KILLFOCUS(id, memberFxn) \
ON_CONTROL(EN_KILLFOCUS, id, memberFxn)
#define ON_EN_CHANGE(id, memberFxn) \
ON_CONTROL(EN_CHANGE, id, memberFxn)
#define ON_EN_UPDATE(id, memberFxn) \
ON_CONTROL(EN_UPDATE, id, memberFxn)
#define ON_EN_ERRSPACE(id, memberFxn) \
ON_CONTROL(EN_ERRSPACE, id, memberFxn)
#define ON_EN_MAXTEXT(id, memberFxn) \
ON_CONTROL(EN_MAXTEXT, id, memberFxn)
#define ON_EN_HSCROLL(id, memberFxn) \
ON_CONTROL(EN_HSCROLL, id, memberFxn)
#define ON_EN_VSCROLL(id, memberFxn) \
ON_CONTROL(EN_VSCROLL, id, memberFxn)
// User Button Notification Codes
#define ON_BN_CLICKED(id, memberFxn) \
ON_CONTROL(BN_CLICKED, id, memberFxn)
#define ON_BN_DOUBLECLICKED(id, memberFxn) \
ON_CONTROL(BN_DOUBLECLICKED, id, memberFxn)
#define ON_BN_SETFOCUS(id, memberFxn) \
ON_CONTROL(BN_SETFOCUS, id, memberFxn)
#define ON_BN_KILLFOCUS(id, memberFxn) \
ON_CONTROL(BN_KILLFOCUS, id, memberFxn)
// old BS_USERBUTTON button notifications - obsolete in Win31
#define ON_BN_PAINT(id, memberFxn) \
ON_CONTROL(BN_PAINT, id, memberFxn)
#define ON_BN_HILITE(id, memberFxn) \
ON_CONTROL(BN_HILITE, id, memberFxn)
#define ON_BN_UNHILITE(id, memberFxn) \
ON_CONTROL(BN_UNHILITE, id, memberFxn)
#define ON_BN_DISABLE(id, memberFxn) \
ON_CONTROL(BN_DISABLE, id, memberFxn)
// Listbox Notification Codes
#define ON_LBN_ERRSPACE(id, memberFxn) \
ON_CONTROL(LBN_ERRSPACE, id, memberFxn)
#define ON_LBN_SELCHANGE(id, memberFxn) \
ON_CONTROL(LBN_SELCHANGE, id, memberFxn)
#define ON_LBN_DBLCLK(id, memberFxn) \
ON_CONTROL(LBN_DBLCLK, id, memberFxn)
#define ON_LBN_SELCANCEL(id, memberFxn) \
ON_CONTROL(LBN_SELCANCEL, id, memberFxn)
#define ON_LBN_SETFOCUS(id, memberFxn) \
ON_CONTROL(LBN_SETFOCUS, id, memberFxn)
#define ON_LBN_KILLFOCUS(id, memberFxn) \
ON_CONTROL(LBN_KILLFOCUS, id, memberFxn)
// Check Listbox Notification codes
#define CLBN_CHKCHANGE (40)
#define ON_CLBN_CHKCHANGE(id, memberFxn) \
ON_CONTROL(CLBN_CHKCHANGE, id, memberFxn)
// Combo Box Notification Codes
#define ON_CBN_ERRSPACE(id, memberFxn) \
ON_CONTROL(CBN_ERRSPACE, id, memberFxn)
#define ON_CBN_SELCHANGE(id, memberFxn) \
ON_CONTROL(CBN_SELCHANGE, id, memberFxn)
#define ON_CBN_DBLCLK(id, memberFxn) \
ON_CONTROL(CBN_DBLCLK, id, memberFxn)
#define ON_CBN_SETFOCUS(id, memberFxn) \
ON_CONTROL(CBN_SETFOCUS, id, memberFxn)
#define ON_CBN_KILLFOCUS(id, memberFxn) \
ON_CONTROL(CBN_KILLFOCUS, id, memberFxn)
#define ON_CBN_EDITCHANGE(id, memberFxn) \
ON_CONTROL(CBN_EDITCHANGE, id, memberFxn)
#define ON_CBN_EDITUPDATE(id, memberFxn) \
ON_CONTROL(CBN_EDITUPDATE, id, memberFxn)
#define ON_CBN_DROPDOWN(id, memberFxn) \
ON_CONTROL(CBN_DROPDOWN, id, memberFxn)
#define ON_CBN_CLOSEUP(id, memberFxn) \
ON_CONTROL(CBN_CLOSEUP, id, memberFxn)
#define ON_CBN_SELENDOK(id, memberFxn) \
ON_CONTROL(CBN_SELENDOK, id, memberFxn)
#define ON_CBN_SELENDCANCEL(id, memberFxn) \
ON_CONTROL(CBN_SELENDCANCEL, id, memberFxn)
/////////////////////////////////////////////////////////////////////////////
// User extensions for message map entries
// for Windows messages
#define ON_MESSAGE(message, memberFxn) \
{ message, 0, 0, 0, AfxSig_lwl, \
(AFX_PMSG)(AFX_PMSGW)(LRESULT (AFX_MSG_CALL CWnd::*)(WPARAM, LPARAM))&memberFxn },
// for Registered Windows messages
#define ON_REGISTERED_MESSAGE(nMessageVariable, memberFxn) \
{ 0xC000, 0, 0, 0, (UINT)(UINT*)(&nMessageVariable), \
/*implied 'AfxSig_lwl'*/ \
(AFX_PMSG)(AFX_PMSGW)(LRESULT (AFX_MSG_CALL CWnd::*)(WPARAM, LPARAM))&memberFxn },
// for Thread messages
#define ON_THREAD_MESSAGE(message, memberFxn) \
{ message, 0, 0, 0, AfxSig_vwl, \
(AFX_PMSG)(AFX_PMSGT)(void (AFX_MSG_CALL CWinThread::*)(WPARAM, LPARAM))&memberFxn },
// for Registered Windows messages
#define ON_REGISTERED_THREAD_MESSAGE(nMessageVariable, memberFxn) \
{ 0xC000, 0, 0, 0, (UINT)(UINT*)(&nMessageVariable), \
/*implied 'AfxSig_vwl'*/ \
(AFX_PMSG)(AFX_PMSGT)(void (AFX_MSG_CALL CWinThread::*)(WPARAM, LPARAM))&memberFxn },
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,251 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXMT_H__
#define __AFXMT_H__
#ifndef __AFX_H__
#include <afx.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXMT - MFC Multithreaded Extensions (Syncronization Objects)
// Classes declared in this file
//CObject
class CSyncObject;
class CSemaphore;
class CMutex;
class CEvent;
class CCriticalSection;
class CSingleLock;
class CMultiLock;
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// Basic synchronization object
class CSyncObject : public CObject
{
DECLARE_DYNAMIC(CSyncObject)
// Constructor
public:
CSyncObject(LPCTSTR pstrName);
// Attributes
public:
operator HANDLE() const;
HANDLE m_hObject;
// Operations
virtual BOOL Lock(DWORD dwTimeout = INFINITE);
virtual BOOL Unlock() = 0;
virtual BOOL Unlock(LONG /* lCount */, LPLONG /* lpPrevCount=NULL */)
{ return TRUE; }
// Implementation
public:
virtual ~CSyncObject();
#ifdef _DEBUG
CString m_strName;
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
friend class CSingleLock;
friend class CMultiLock;
};
/////////////////////////////////////////////////////////////////////////////
// CSemaphore
class CSemaphore : public CSyncObject
{
DECLARE_DYNAMIC(CSemaphore)
// Constructor
public:
CSemaphore(LONG lInitialCount = 1, LONG lMaxCount = 1,
LPCTSTR pstrName=NULL, LPSECURITY_ATTRIBUTES lpsaAttributes = NULL);
// Implementation
public:
virtual ~CSemaphore();
virtual BOOL Unlock();
virtual BOOL Unlock(LONG lCount, LPLONG lprevCount = NULL);
};
/////////////////////////////////////////////////////////////////////////////
// CMutex
class CMutex : public CSyncObject
{
DECLARE_DYNAMIC(CMutex)
// Constructor
public:
CMutex(BOOL bInitiallyOwn = FALSE, LPCTSTR lpszName = NULL,
LPSECURITY_ATTRIBUTES lpsaAttribute = NULL);
// Implementation
public:
virtual ~CMutex();
BOOL Unlock();
};
/////////////////////////////////////////////////////////////////////////////
// CEvent
class CEvent : public CSyncObject
{
DECLARE_DYNAMIC(CEvent)
// Constructor
public:
CEvent(BOOL bInitiallyOwn = FALSE, BOOL bManualReset = FALSE,
LPCTSTR lpszNAme = NULL, LPSECURITY_ATTRIBUTES lpsaAttribute = NULL);
// Operations
public:
BOOL SetEvent();
BOOL PulseEvent();
BOOL ResetEvent();
BOOL Unlock();
// Implementation
public:
virtual ~CEvent();
};
/////////////////////////////////////////////////////////////////////////////
// CCriticalSection
class CCriticalSection : public CSyncObject
{
DECLARE_DYNAMIC(CCriticalSection)
// Constructor
public:
CCriticalSection();
// Attributes
public:
operator CRITICAL_SECTION*();
CRITICAL_SECTION m_sect;
// Operations
public:
BOOL Unlock();
BOOL Lock();
BOOL Lock(DWORD dwTimeout);
// Implementation
public:
virtual ~CCriticalSection();
};
/////////////////////////////////////////////////////////////////////////////
// CSingleLock
class CSingleLock
{
// Constructors
public:
CSingleLock(CSyncObject* pObject, BOOL bInitialLock = FALSE);
// Operations
public:
BOOL Lock(DWORD dwTimeOut = INFINITE);
BOOL Unlock();
BOOL Unlock(LONG lCount, LPLONG lPrevCount = NULL);
BOOL IsLocked();
// Implementation
public:
~CSingleLock();
protected:
CSyncObject* m_pObject;
HANDLE m_hObject;
BOOL m_bAcquired;
};
/////////////////////////////////////////////////////////////////////////////
// CMultiLock
class CMultiLock
{
// Constructor
public:
CMultiLock(CSyncObject* ppObjects[], DWORD dwCount, BOOL bInitialLock = FALSE);
// Operations
public:
DWORD Lock(DWORD dwTimeOut = INFINITE, BOOL bWaitForAll = TRUE,
DWORD dwWakeMask = 0);
BOOL Unlock();
BOOL Unlock(LONG lCount, LPLONG lPrevCount = NULL);
BOOL IsLocked(DWORD dwItem);
// Implementation
public:
~CMultiLock();
protected:
HANDLE m_hPreallocated[8];
BOOL m_bPreallocated[8];
CSyncObject* const * m_ppObjectArray;
HANDLE* m_pHandleArray;
BOOL* m_bLockedArray;
DWORD m_dwCount;
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXMT_INLINE AFX_INLINE
#include <afxmt.inl>
#undef _AFXMT_INLINE
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXMT_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,50 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXMT.H
#ifdef _AFXMT_INLINE
_AFXMT_INLINE CSyncObject::operator HANDLE() const
{ return m_hObject;}
_AFXMT_INLINE BOOL CSemaphore::Unlock()
{ return Unlock(1, NULL); }
_AFXMT_INLINE BOOL CEvent::SetEvent()
{ ASSERT(m_hObject != NULL); return ::SetEvent(m_hObject); }
_AFXMT_INLINE BOOL CEvent::PulseEvent()
{ ASSERT(m_hObject != NULL); return ::PulseEvent(m_hObject); }
_AFXMT_INLINE BOOL CEvent::ResetEvent()
{ ASSERT(m_hObject != NULL); return ::ResetEvent(m_hObject); }
_AFXMT_INLINE CSingleLock::~CSingleLock()
{ Unlock(); }
_AFXMT_INLINE BOOL CSingleLock::IsLocked()
{ return m_bAcquired; }
_AFXMT_INLINE BOOL CMultiLock::IsLocked(DWORD dwObject)
{ ASSERT(dwObject >= 0 && dwObject < m_dwCount);
return m_bLockedArray[dwObject]; }
_AFXMT_INLINE CCriticalSection::CCriticalSection() : CSyncObject(NULL)
{ ::InitializeCriticalSection(&m_sect); }
_AFXMT_INLINE CCriticalSection::operator CRITICAL_SECTION*()
{ return (CRITICAL_SECTION*) &m_sect; }
_AFXMT_INLINE CCriticalSection::~CCriticalSection()
{ ::DeleteCriticalSection(&m_sect); }
_AFXMT_INLINE BOOL CCriticalSection::Lock()
{ ::EnterCriticalSection(&m_sect); return TRUE; }
_AFXMT_INLINE BOOL CCriticalSection::Lock(DWORD /* dwTimeout */)
{ return Lock(); }
_AFXMT_INLINE BOOL CCriticalSection::Unlock()
{ ::LeaveCriticalSection(&m_sect); return TRUE; }
#endif //_AFXMT_INLINE
@@ -0,0 +1,510 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXODLGS_H__
#define __AFXODLGS_H__
#ifdef _AFX_NO_OLE_SUPPORT
#error OLE classes not supported in this library variant.
#endif
#ifndef __AFXOLE_H__
#include <afxole.h>
#endif
#ifndef __AFXDLGS_H__
#include <afxdlgs.h>
#endif
// include OLE dialog/helper APIs
#ifndef _OLEDLG_H_
#include <oledlg.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXODLGS.H - MFC OLE dialogs
// Classes declared in this file
//CCommonDialog
class COleDialog; // base class for OLE dialog wrappers
class COleInsertDialog; // insert object dialog
class COleConvertDialog; // convert dialog
class COleChangeIconDialog; // change icon dialog
class COlePasteSpecialDialog; // paste special dialog
class COleLinksDialog; // edit links dialog
class COleUpdateDialog; // update links/embeddings dialog
class COleBusyDialog; // used for
class COlePropertiesDialog;
class COleChangeSourceDialog;
/////////////////////////////////////////////////////////////////////////////
// AFXDLL support
#undef AFX_DATA
#define AFX_DATA AFX_OLE_DATA
/////////////////////////////////////////////////////////////////////////////
// COleUILinkInfo -- used internally to implement
// IOleUILinkInfo and IOleUILinkContainer
// used by COleLinksDialog and COleChangeSourceDialog
class COleUILinkInfo : public IOleUILinkInfo
{
public:
COleUILinkInfo(COleDocument* pDocument);
// Implementation
COleDocument* m_pDocument; // document being manipulated
COleClientItem* m_pSelectedItem; // primary selected item in m_pDocument
POSITION m_pos; // used during link enumeration
BOOL m_bUpdateLinks; // update links?
BOOL m_bUpdateEmbeddings; // update embeddings?
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
STDMETHOD(QueryInterface)(REFIID, LPVOID*);
// IOleUILinkContainer
STDMETHOD_(DWORD,GetNextLink)(DWORD);
STDMETHOD(SetLinkUpdateOptions)(DWORD, DWORD);
STDMETHOD(GetLinkUpdateOptions)(DWORD, LPDWORD);
STDMETHOD(SetLinkSource)(DWORD, LPTSTR, ULONG, ULONG*, BOOL);
STDMETHOD(GetLinkSource)(DWORD, LPTSTR*, ULONG*, LPTSTR*, LPTSTR*, BOOL*,
BOOL*);
STDMETHOD(OpenLinkSource)(DWORD);
STDMETHOD(UpdateLink)(DWORD, BOOL, BOOL);
STDMETHOD(CancelLink)(DWORD);
// IOleUILinkInfo
STDMETHOD(GetLastUpdate)(DWORD dwLink, FILETIME* lpLastUpdate);
};
/////////////////////////////////////////////////////////////////////////////
// Wrappers for OLE UI dialogs
#ifdef _AFXDLL
class COleDialog : public CCommonDialog
#else
class AFX_NOVTABLE COleDialog : public CCommonDialog
#endif
{
DECLARE_DYNAMIC(COleDialog)
// Attributes
public:
UINT GetLastError() const;
// Implementation
public:
int MapResult(UINT nResult);
COleDialog(CWnd* pParentWnd);
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
UINT m_nLastError;
protected:
friend UINT CALLBACK _AfxOleHookProc(HWND, UINT, WPARAM, LPARAM);
};
/////////////////////////////////////////////////////////////////////////////
// COleInsertDialog
class COleInsertDialog : public COleDialog
{
DECLARE_DYNAMIC(COleInsertDialog)
// Attributes
public:
OLEUIINSERTOBJECT m_io; // structure for OleUIInsertObject
// Constructors
COleInsertDialog(DWORD dwFlags = IOF_SELECTCREATENEW,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
int DoModal(DWORD dwFlags);
BOOL CreateItem(COleClientItem* pItem);
// call after DoModal to create item based on dialog data
// Attributes (after DoModal returns IDOK)
enum Selection { createNewItem, insertFromFile, linkToFile };
UINT GetSelectionType() const;
// return type of selection made
CString GetPathName() const; // return full path name
REFCLSID GetClassID() const; // get class ID of new item
DVASPECT GetDrawAspect() const;
// DVASPECT_CONTENT or DVASPECT_ICON
HGLOBAL GetIconicMetafile() const;
// returns HGLOBAL to METAFILEPICT struct with iconic data
// Implementation
public:
virtual ~COleInsertDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
enum FilterFlags {
DocObjectsOnly = 1,
ControlsOnly = 2,
};
protected:
TCHAR m_szFileName[_MAX_PATH];
// contains full path name after return
void AddClassIDToList(LPCLSID& lpList, int& nListCount,
int& nBufferLen, LPCLSID pNewID);
};
/////////////////////////////////////////////////////////////////////////////
// COleConvertDialog
class COleConvertDialog : public COleDialog
{
DECLARE_DYNAMIC(COleConvertDialog)
// Attributes
public:
OLEUICONVERT m_cv; // structure for OleUIConvert
// Constructors
COleConvertDialog(COleClientItem* pItem,
DWORD dwFlags = CF_SELECTCONVERTTO, CLSID* pClassID = NULL,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// just display the dialog and collect convert info
BOOL DoConvert(COleClientItem* pItem);
// do the conversion on pItem (after DoModal == IDOK)
// Attributes (after DoModal returns IDOK)
enum Selection { noConversion, convertItem, activateAs };
UINT GetSelectionType() const;
HGLOBAL GetIconicMetafile() const; // will return NULL if same as before
REFCLSID GetClassID() const; // get class ID to convert or activate as
DVASPECT GetDrawAspect() const; // get new draw aspect
// Implementation
public:
virtual ~COleConvertDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// COleChangeIconDialog
class COleChangeIconDialog : public COleDialog
{
DECLARE_DYNAMIC(COleChangeIconDialog)
// Attributes
public:
OLEUICHANGEICON m_ci; // structure for OleUIChangeIcon
// Constructors
COleChangeIconDialog(COleClientItem* pItem,
DWORD dwFlags = CIF_SELECTCURRENT,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
BOOL DoChangeIcon(COleClientItem* pItem);
// Attributes
HGLOBAL GetIconicMetafile() const;
// Implementation
public:
virtual ~COleChangeIconDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// COlePasteSpecialDialog
class COlePasteSpecialDialog : public COleDialog
{
DECLARE_DYNAMIC(COlePasteSpecialDialog)
// Attributes
public:
OLEUIPASTESPECIAL m_ps; // structure for OleUIPasteSpecial
// Constructors
COlePasteSpecialDialog(DWORD dwFlags = PSF_SELECTPASTE,
COleDataObject* pDataObject = NULL, CWnd *pParentWnd = NULL);
// Operations
OLEUIPASTEFLAG AddLinkEntry(UINT cf);
void AddFormat(const FORMATETC& formatEtc, LPTSTR lpszFormat,
LPTSTR lpszResult, DWORD flags);
void AddFormat(UINT cf, DWORD tymed, UINT nFormatID, BOOL bEnableIcon,
BOOL bLink);
void AddStandardFormats(BOOL bEnableLink = TRUE);
virtual int DoModal();
BOOL CreateItem(COleClientItem *pNewItem);
// creates a standard OLE item from selection data
// Attributes (after DoModal returns IDOK)
int GetPasteIndex() const; // resulting index to use for paste
enum Selection { pasteLink = 1, pasteNormal = 2, pasteStatic = 3, pasteOther = 4};
UINT GetSelectionType() const;
// get selection type (pasteLink, pasteNormal, pasteStatic)
DVASPECT GetDrawAspect() const;
// DVASPECT_CONTENT or DVASPECT_ICON
HGLOBAL GetIconicMetafile() const;
// returns HGLOBAL to METAFILEPICT struct with iconic data
// Implementation
public:
virtual ~COlePasteSpecialDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
unsigned int m_arrLinkTypes[8];
// size limit imposed by MFCUIx32.DLL library
};
/////////////////////////////////////////////////////////////////////////////
// COleLinksDialog
class COleLinksDialog : public COleDialog
{
DECLARE_DYNAMIC(COleLinksDialog)
// Attributes
public:
OLEUIEDITLINKS m_el; // structure for OleUIEditLinks
// Constructors
COleLinksDialog(COleDocument* pDoc, CView* pView, DWORD dwFlags = 0,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal(); // display the dialog and edit links
// Implementation
public:
virtual ~COleLinksDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
public:
COleUILinkInfo m_xLinkInfo; // implements IOleUILinkContainer
};
/////////////////////////////////////////////////////////////////////////////
// COleUpdateDialog
class COleUpdateDialog : public COleLinksDialog
{
DECLARE_DYNAMIC(COleUpdateDialog)
// Constructors
public:
COleUpdateDialog(COleDocument* pDoc,
BOOL bUpdateLinks = TRUE, BOOL bUpdateEmbeddings = FALSE,
CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// Implementation
public:
virtual ~COleUpdateDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
CString m_strCaption; // caption for the dialog
};
/////////////////////////////////////////////////////////////////////////////
// COleBusyDialog - useful in managing concurrency
class COleBusyDialog : public COleDialog
{
DECLARE_DYNAMIC(COleBusyDialog)
// Attributes
public:
OLEUIBUSY m_bz;
// Constructors
COleBusyDialog(HTASK htaskBusy, BOOL bNotResponding = FALSE,
DWORD dwFlags = 0, CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
enum Selection { switchTo = 1, retry = 2, callUnblocked = 3 };
UINT GetSelectionType() const;
// Implementation
public:
~COleBusyDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
Selection m_selection; // selection after DoModal returns IDOK
};
/////////////////////////////////////////////////////////////////////////////
// COleEditProperties
class COlePropertiesDialog : public COleDialog
{
DECLARE_DYNAMIC(COlePropertiesDialog)
// Attributes
public:
OLEUIOBJECTPROPS m_op; // structure for OleUIObjectProperties
OLEUIGNRLPROPS m_gp; // specific to "General" page
OLEUIVIEWPROPS m_vp; // specific to "View" page
OLEUILINKPROPS m_lp; // specific to "Link" page
PROPSHEETHEADER m_psh; // PROPSHEETHEADER for customization
// Constructors
public:
COlePropertiesDialog(COleClientItem* pItem,
UINT nScaleMin = 10, UINT nScaleMax = 500, CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// Overridables
virtual BOOL OnApplyScale(
COleClientItem* pItem, int nCurrentScale, BOOL bRelativeToOrig);
// Implementation
public:
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
virtual BOOL OnInitDialog();
BEGIN_INTERFACE_PART(OleUIObjInfo, IOleUIObjInfo)
INIT_INTERFACE_PART(COlePropertiesDialog, OleUIObjInfo)
STDMETHOD(GetObjectInfo) (THIS_ DWORD dwObject,
DWORD* lpdwObjSize, LPTSTR* lplpszLabel,
LPTSTR* lplpszType, LPTSTR* lplpszShortType,
LPTSTR* lplpszLocation);
STDMETHOD(GetConvertInfo) (THIS_ DWORD dwObject,
CLSID* lpClassID, WORD* lpwFormat,
CLSID* lpConvertDefaultClassID,
LPCLSID* lplpClsidExclude, UINT* lpcClsidExclude);
STDMETHOD(ConvertObject) (THIS_ DWORD dwObject, REFCLSID clsidNew);
STDMETHOD(GetViewInfo) (THIS_ DWORD dwObject,
HGLOBAL* phMetaPict, DWORD* pdvAspect, int* pnCurrentScale);
STDMETHOD(SetViewInfo) (THIS_ DWORD dwObject,
HGLOBAL hMetaPict, DWORD dvAspect,
int nCurrentScale, BOOL bRelativeToOrig);
END_INTERFACE_PART(OleUIObjInfo)
COleUILinkInfo m_xLinkInfo; // implements IOleUILinkContainer
};
/////////////////////////////////////////////////////////////////////////////
// COleChangeSourceDialog
class COleChangeSourceDialog : public COleDialog
{
DECLARE_DYNAMIC(COleChangeSourceDialog)
// Attributes
public:
OLEUICHANGESOURCE m_cs; // structure for OleUIChangeSource
// Constructors
public:
COleChangeSourceDialog(COleClientItem* pItem, CWnd* pParentWnd = NULL);
// Operations
virtual int DoModal();
// Attributes (after DoModal returns IDOK)
BOOL IsValidSource();
CString GetDisplayName();
CString GetFileName();
CString GetItemName();
CString GetFromPrefix();
CString GetToPrefix();
// Implementation
public:
COleUILinkInfo m_xLinkInfo;
virtual ~COleChangeSourceDialog();
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
virtual void PreInitDialog();
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXODLGS_INLINE AFX_INLINE
#include <afxole.inl>
#undef _AFXODLGS_INLINE
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXODLGS_H__
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,425 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXOLE.H
/////////////////////////////////////////////////////////////////////////////
// General OLE inlines (CDocItem, COleDocument)
#ifdef _AFXOLE_INLINE
// CDocItem
_AFXOLE_INLINE CDocument* CDocItem::GetDocument() const
{ return m_pDocument; }
// COleDocument
_AFXOLE_INLINE void COleDocument::EnableCompoundFile(BOOL bEnable)
{ m_bCompoundFile = bEnable; }
// COleMessageFilter
_AFXOLE_INLINE void COleMessageFilter::SetBusyReply(SERVERCALL nBusyReply)
{ ASSERT_VALID(this); m_nBusyReply = nBusyReply; }
_AFXOLE_INLINE void COleMessageFilter::SetRetryReply(DWORD nRetryReply)
{ ASSERT_VALID(this); m_nRetryReply = nRetryReply; }
_AFXOLE_INLINE void COleMessageFilter::SetMessagePendingDelay(DWORD nTimeout)
{ ASSERT_VALID(this); m_nTimeout = nTimeout; }
_AFXOLE_INLINE void COleMessageFilter::EnableBusyDialog(BOOL bEnable)
{ ASSERT_VALID(this); m_bEnableBusy = bEnable; }
_AFXOLE_INLINE void COleMessageFilter::EnableNotRespondingDialog(BOOL bEnable)
{ ASSERT_VALID(this); m_bEnableNotResponding = bEnable; }
#endif //_AFXOLE_INLINE
/////////////////////////////////////////////////////////////////////////////
// OLE Moniker inlines
#ifdef _AFXOLEMONIKER_INLINE
// CMonikerFile
_AFXOLEMONIKER_INLINE CMonikerFile::CMonikerFile() { }
_AFXOLEMONIKER_INLINE IMoniker* CMonikerFile::GetMoniker() const
{ ASSERT_VALID(this); return m_Moniker; }
// CAsyncMonikerFile
_AFXOLEMONIKER_INLINE IBinding* CAsyncMonikerFile::GetBinding() const
{ ASSERT_VALID(this); return m_Binding; }
_AFXOLEMONIKER_INLINE void CAsyncMonikerFile::SetBinding(IBinding* pBinding)
{ ASSERT_VALID(this); m_Binding=pBinding; }
_AFXOLEMONIKER_INLINE void CAsyncMonikerFile::SetFormatEtc(FORMATETC* pFormatEtc)
{ ASSERT_VALID(this); m_pFormatEtc=pFormatEtc; }
_AFXOLEMONIKER_INLINE FORMATETC* CAsyncMonikerFile::GetFormatEtc() const
{ ASSERT_VALID(this); return m_pFormatEtc; }
#endif //_AFXOLEMONIKER_INLINE
/////////////////////////////////////////////////////////////////////////////
// OLE automation inlines
#ifdef _AFXDISP_INLINE
// COleException
_AFXDISP_INLINE COleException::COleException()
{ m_sc = S_OK; }
_AFXDISP_INLINE COleException::~COleException()
{ }
// CCmdTarget
_AFXDISP_INLINE DWORD CCmdTarget::InternalAddRef()
{ ASSERT(GetInterfaceMap() != NULL); return InterlockedIncrement(&m_dwRef); }
// CObjectFactory
_AFXDISP_INLINE BOOL COleObjectFactory::IsRegistered() const
{ ASSERT_VALID(this); return m_dwRegister != 0; }
_AFXDISP_INLINE REFCLSID COleObjectFactory::GetClassID() const
{ ASSERT_VALID(this); return m_clsid; }
// COleDispatchDriver
_AFXDISP_INLINE COleDispatchDriver::~COleDispatchDriver()
{ ReleaseDispatch(); }
_AFXDISP_INLINE COleDispatchDriver::operator LPDISPATCH()
{ return m_lpDispatch; }
// COleVariant
_AFXDISP_INLINE COleVariant::COleVariant()
{ AfxVariantInit(this); }
_AFXDISP_INLINE COleVariant::~COleVariant()
{ VERIFY(::VariantClear(this) == NOERROR); }
_AFXDISP_INLINE void COleVariant::Clear()
{ VERIFY(::VariantClear(this) == NOERROR); }
_AFXDISP_INLINE COleVariant::COleVariant(LPCTSTR lpszSrc)
{ vt = VT_EMPTY; *this = lpszSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(CString& strSrc)
{ vt = VT_EMPTY; *this = strSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(BYTE nSrc)
{ vt = VT_UI1; bVal = nSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(const COleCurrency& curSrc)
{ vt = VT_CY; cyVal = curSrc.m_cur; }
_AFXDISP_INLINE COleVariant::COleVariant(float fltSrc)
{ vt = VT_R4; fltVal = fltSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(double dblSrc)
{ vt = VT_R8; dblVal = dblSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(const COleDateTime& dateSrc)
{ vt = VT_DATE; date = dateSrc.m_dt; }
_AFXDISP_INLINE COleVariant::COleVariant(const CByteArray& arrSrc)
{ vt = VT_EMPTY; *this = arrSrc; }
_AFXDISP_INLINE COleVariant::COleVariant(const CLongBinary& lbSrc)
{ vt = VT_EMPTY; *this = lbSrc; }
_AFXDISP_INLINE BOOL COleVariant::operator==(LPCVARIANT pSrc) const
{ return *this == *pSrc; }
_AFXDISP_INLINE COleVariant::operator LPVARIANT()
{ return this; }
_AFXDISP_INLINE COleVariant::operator LPCVARIANT() const
{ return this; }
// COleCurrency
_AFXDISP_INLINE COleCurrency::COleCurrency()
{ m_cur.Hi = 0; m_cur.Lo = 0; SetStatus(valid); }
_AFXDISP_INLINE COleCurrency::COleCurrency(CURRENCY cySrc)
{ m_cur = cySrc; SetStatus(valid); }
_AFXDISP_INLINE COleCurrency::COleCurrency(const COleCurrency& curSrc)
{ m_cur = curSrc.m_cur; m_status = curSrc.m_status; }
_AFXDISP_INLINE COleCurrency::COleCurrency(const VARIANT& varSrc)
{ *this = varSrc; }
_AFXDISP_INLINE COleCurrency::CurrencyStatus COleCurrency::GetStatus() const
{ return m_status; }
_AFXDISP_INLINE void COleCurrency::SetStatus(CurrencyStatus status)
{ m_status = status; }
_AFXDISP_INLINE const COleCurrency& COleCurrency::operator+=(const COleCurrency& cur)
{ *this = *this + cur; return *this; }
_AFXDISP_INLINE const COleCurrency& COleCurrency::operator-=(const COleCurrency& cur)
{ *this = *this - cur; return *this; }
_AFXDISP_INLINE const COleCurrency& COleCurrency::operator*=(long nOperand)
{ *this = *this * nOperand; return *this; }
_AFXDISP_INLINE const COleCurrency& COleCurrency::operator/=(long nOperand)
{ *this = *this / nOperand; return *this; }
_AFXDISP_INLINE BOOL COleCurrency::operator==(const COleCurrency& cur) const
{ return(m_status == cur.m_status && m_cur.Hi == cur.m_cur.Hi &&
m_cur.Lo == cur.m_cur.Lo); }
_AFXDISP_INLINE BOOL COleCurrency::operator!=(const COleCurrency& cur) const
{ return(m_status != cur.m_status || m_cur.Hi != cur.m_cur.Hi ||
m_cur.Lo != cur.m_cur.Lo); }
_AFXDISP_INLINE COleCurrency::operator CURRENCY() const
{ return m_cur; }
// COleDateTime
_AFXDISP_INLINE COleDateTime::COleDateTime()
{ m_dt = 0; SetStatus(valid); }
_AFXDISP_INLINE COleDateTime::COleDateTime(const COleDateTime& dateSrc)
{ m_dt = dateSrc.m_dt; m_status = dateSrc.m_status; }
_AFXDISP_INLINE COleDateTime::COleDateTime(const VARIANT& varSrc)
{ *this = varSrc; }
_AFXDISP_INLINE COleDateTime::COleDateTime(DATE dtSrc)
{ m_dt = dtSrc; SetStatus(valid); }
_AFXDISP_INLINE COleDateTime::COleDateTime(time_t timeSrc)
{ *this = timeSrc; }
_AFXDISP_INLINE COleDateTime::COleDateTime(const SYSTEMTIME& systimeSrc)
{ *this = systimeSrc; }
_AFXDISP_INLINE COleDateTime::COleDateTime(const FILETIME& filetimeSrc)
{ *this = filetimeSrc; }
_AFXDISP_INLINE COleDateTime::COleDateTime(int nYear, int nMonth, int nDay,
int nHour, int nMin, int nSec)
{ SetDateTime(nYear, nMonth, nDay, nHour, nMin, nSec); }
_AFXDISP_INLINE COleDateTime::COleDateTime(WORD wDosDate, WORD wDosTime)
{ m_status = DosDateTimeToVariantTime(wDosDate, wDosTime, &m_dt) ?
valid : invalid; }
_AFXDISP_INLINE const COleDateTime& COleDateTime::operator=(const COleDateTime& dateSrc)
{ m_dt = dateSrc.m_dt; m_status = dateSrc.m_status; return *this; }
_AFXDISP_INLINE COleDateTime::DateTimeStatus COleDateTime::GetStatus() const
{ return m_status; }
_AFXDISP_INLINE void COleDateTime::SetStatus(DateTimeStatus status)
{ m_status = status; }
_AFXDISP_INLINE BOOL COleDateTime::operator==(const COleDateTime& date) const
{ return (m_status == date.m_status && m_dt == date.m_dt); }
_AFXDISP_INLINE BOOL COleDateTime::operator!=(const COleDateTime& date) const
{ return (m_status != date.m_status || m_dt != date.m_dt); }
_AFXDISP_INLINE const COleDateTime& COleDateTime::operator+=(
const COleDateTimeSpan dateSpan)
{ *this = *this + dateSpan; return *this; }
_AFXDISP_INLINE const COleDateTime& COleDateTime::operator-=(
const COleDateTimeSpan dateSpan)
{ *this = *this - dateSpan; return *this; }
_AFXDISP_INLINE COleDateTime::operator DATE() const
{ return m_dt; }
_AFXDISP_INLINE int COleDateTime::SetDate(int nYear, int nMonth, int nDay)
{ return SetDateTime(nYear, nMonth, nDay, 0, 0, 0); }
_AFXDISP_INLINE int COleDateTime::SetTime(int nHour, int nMin, int nSec)
// Set date to zero date - 12/30/1899
{ return SetDateTime(1899, 12, 30, nHour, nMin, nSec); }
// COleDateTimeSpan
_AFXDISP_INLINE COleDateTimeSpan::COleDateTimeSpan()
{ m_span = 0; SetStatus(valid); }
_AFXDISP_INLINE COleDateTimeSpan::COleDateTimeSpan(double dblSpanSrc)
{ m_span = dblSpanSrc; SetStatus(valid); }
_AFXDISP_INLINE COleDateTimeSpan::COleDateTimeSpan(
const COleDateTimeSpan& dateSpanSrc)
{ m_span = dateSpanSrc.m_span; m_status = dateSpanSrc.m_status; }
_AFXDISP_INLINE COleDateTimeSpan::COleDateTimeSpan(
long lDays, int nHours, int nMins, int nSecs)
{ SetDateTimeSpan(lDays, nHours, nMins, nSecs); }
_AFXDISP_INLINE COleDateTimeSpan::DateTimeSpanStatus COleDateTimeSpan::GetStatus() const
{ return m_status; }
_AFXDISP_INLINE void COleDateTimeSpan::SetStatus(DateTimeSpanStatus status)
{ m_status = status; }
_AFXDISP_INLINE double COleDateTimeSpan::GetTotalDays() const
{ ASSERT(GetStatus() == valid); return m_span; }
_AFXDISP_INLINE double COleDateTimeSpan::GetTotalHours() const
{ ASSERT(GetStatus() == valid);
long lReturns = (long)(m_span * 24 + AFX_OLE_DATETIME_HALFSECOND);
return lReturns;
}
_AFXDISP_INLINE double COleDateTimeSpan::GetTotalMinutes() const
{ ASSERT(GetStatus() == valid);
long lReturns = (long)(m_span * 24 * 60 + AFX_OLE_DATETIME_HALFSECOND);
return lReturns;
}
_AFXDISP_INLINE double COleDateTimeSpan::GetTotalSeconds() const
{ ASSERT(GetStatus() == valid);
long lReturns = (long)(m_span * 24 * 60 * 60 + AFX_OLE_DATETIME_HALFSECOND);
return lReturns;
}
_AFXDISP_INLINE long COleDateTimeSpan::GetDays() const
{ ASSERT(GetStatus() == valid); return (long)m_span; }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator==(
const COleDateTimeSpan& dateSpan) const
{ return (m_status == dateSpan.m_status &&
m_span == dateSpan.m_span); }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator!=(
const COleDateTimeSpan& dateSpan) const
{ return (m_status != dateSpan.m_status ||
m_span != dateSpan.m_span); }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator<(
const COleDateTimeSpan& dateSpan) const
{ ASSERT(GetStatus() == valid);
ASSERT(dateSpan.GetStatus() == valid);
return m_span < dateSpan.m_span; }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator>(
const COleDateTimeSpan& dateSpan) const
{ ASSERT(GetStatus() == valid);
ASSERT(dateSpan.GetStatus() == valid);
return m_span > dateSpan.m_span; }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator<=(
const COleDateTimeSpan& dateSpan) const
{ ASSERT(GetStatus() == valid);
ASSERT(dateSpan.GetStatus() == valid);
return m_span <= dateSpan.m_span; }
_AFXDISP_INLINE BOOL COleDateTimeSpan::operator>=(
const COleDateTimeSpan& dateSpan) const
{ ASSERT(GetStatus() == valid);
ASSERT(dateSpan.GetStatus() == valid);
return m_span >= dateSpan.m_span; }
_AFXDISP_INLINE const COleDateTimeSpan& COleDateTimeSpan::operator+=(
const COleDateTimeSpan dateSpan)
{ *this = *this + dateSpan; return *this; }
_AFXDISP_INLINE const COleDateTimeSpan& COleDateTimeSpan::operator-=(
const COleDateTimeSpan dateSpan)
{ *this = *this - dateSpan; return *this; }
_AFXDISP_INLINE COleDateTimeSpan COleDateTimeSpan::operator-() const
{ return -this->m_span; }
_AFXDISP_INLINE COleDateTimeSpan::operator double() const
{ return m_span; }
// COleSafeArray
_AFXDISP_INLINE COleSafeArray::COleSafeArray()
{ AfxSafeArrayInit(this);
vt = VT_EMPTY; }
_AFXDISP_INLINE COleSafeArray::~COleSafeArray()
{ Clear(); }
_AFXDISP_INLINE void COleSafeArray::Clear()
{ VERIFY(::VariantClear(this) == NOERROR); }
_AFXDISP_INLINE COleSafeArray::operator LPVARIANT()
{ return this; }
_AFXDISP_INLINE COleSafeArray::operator LPCVARIANT() const
{ return this; }
_AFXDISP_INLINE DWORD COleSafeArray::GetDim()
{ return ::SafeArrayGetDim(parray); }
_AFXDISP_INLINE DWORD COleSafeArray::GetElemSize()
{ return ::SafeArrayGetElemsize(parray); }
#endif //_AFXDISP_INLINE
/////////////////////////////////////////////////////////////////////////////
// OLE Container inlines
#ifdef _AFXOLECLI_INLINE
// COleClientItem
_AFXOLECLI_INLINE SCODE COleClientItem::GetLastStatus() const
{ ASSERT_VALID(this); return m_scLast; }
_AFXOLECLI_INLINE COleDocument* COleClientItem::GetDocument() const
{ ASSERT_VALID(this); return (COleDocument*)m_pDocument; }
_AFXOLECLI_INLINE OLE_OBJTYPE COleClientItem::GetType() const
{ ASSERT_VALID(this); return m_nItemType; }
_AFXOLECLI_INLINE DVASPECT COleClientItem::GetDrawAspect() const
{ ASSERT_VALID(this); return m_nDrawAspect; }
_AFXOLECLI_INLINE BOOL COleClientItem::IsRunning() const
{ ASSERT_VALID(this);
ASSERT(m_lpObject != NULL);
return ::OleIsRunning(m_lpObject); }
_AFXOLECLI_INLINE UINT COleClientItem::GetItemState() const
{ ASSERT_VALID(this); return m_nItemState; }
_AFXOLECLI_INLINE BOOL COleClientItem::IsInPlaceActive() const
{ ASSERT_VALID(this);
return m_nItemState == activeState || m_nItemState == activeUIState; }
_AFXOLECLI_INLINE BOOL COleClientItem::IsOpen() const
{ ASSERT_VALID(this); return m_nItemState == openState; }
_AFXOLECLI_INLINE BOOL COleClientItem::IsLinkUpToDate() const
{ ASSERT_VALID(this);
ASSERT(m_lpObject != NULL);
// TRUE if result is S_OK (aka S_TRUE)
return m_lpObject->IsUpToDate() == NOERROR; }
_AFXOLECLI_INLINE CView* COleClientItem::GetActiveView() const
{ return m_pView; }
// COleLinkingDoc
_AFXOLECLI_INLINE void COleLinkingDoc::BeginDeferErrors()
{ ASSERT(m_pLastException == NULL); ++m_bDeferErrors; }
#endif //_AFXOLECLI_INLINE
#ifdef _AFXOLEDOBJ_INLINE
// COleDataObject
_AFXOLEDOBJ_INLINE COleDataObject::~COleDataObject()
{ Release(); }
#endif //_AFXOLECTL_INLINE
/////////////////////////////////////////////////////////////////////////////
// OLE dialog inlines
#ifdef _AFXODLGS_INLINE
_AFXODLGS_INLINE UINT COleDialog::GetLastError() const
{ return m_nLastError; }
_AFXODLGS_INLINE CString COleInsertDialog::GetPathName() const
{ ASSERT_VALID(this);
ASSERT(GetSelectionType() != createNewItem); return m_szFileName; }
_AFXODLGS_INLINE REFCLSID COleInsertDialog::GetClassID() const
{ ASSERT_VALID(this); return m_io.clsid; }
_AFXODLGS_INLINE HGLOBAL COleInsertDialog::GetIconicMetafile() const
{ ASSERT_VALID(this); return m_io.hMetaPict; }
_AFXODLGS_INLINE DVASPECT COleInsertDialog::GetDrawAspect() const
{ ASSERT_VALID(this); return m_io.dwFlags & IOF_CHECKDISPLAYASICON ?
DVASPECT_ICON : DVASPECT_CONTENT; }
_AFXODLGS_INLINE HGLOBAL COleConvertDialog::GetIconicMetafile() const
{ ASSERT_VALID(this); return m_cv.hMetaPict; }
_AFXODLGS_INLINE DVASPECT COleConvertDialog::GetDrawAspect() const
{ ASSERT_VALID(this); return (DVASPECT)m_cv.dvAspect; }
_AFXODLGS_INLINE REFCLSID COleConvertDialog::GetClassID() const
{ ASSERT_VALID(this); return m_cv.clsidNew; }
_AFXODLGS_INLINE HGLOBAL COleChangeIconDialog::GetIconicMetafile() const
{ ASSERT_VALID(this); return m_ci.hMetaPict; }
_AFXODLGS_INLINE int COlePasteSpecialDialog::GetPasteIndex() const
{ ASSERT_VALID(this); return m_ps.nSelectedIndex; }
_AFXODLGS_INLINE DVASPECT COlePasteSpecialDialog::GetDrawAspect() const
{ ASSERT_VALID(this); return m_ps.dwFlags & PSF_CHECKDISPLAYASICON ?
DVASPECT_ICON : DVASPECT_CONTENT; }
_AFXODLGS_INLINE HGLOBAL COlePasteSpecialDialog::GetIconicMetafile() const
{ ASSERT_VALID(this); return m_ps.hMetaPict; }
_AFXODLGS_INLINE UINT COleBusyDialog::GetSelectionType() const
{ ASSERT_VALID(this); return m_selection; }
_AFXODLGS_INLINE BOOL COleChangeSourceDialog::IsValidSource()
{ return m_cs.dwFlags & CSF_VALIDSOURCE; }
_AFXODLGS_INLINE CString COleChangeSourceDialog::GetDisplayName()
{ return m_cs.lpszDisplayName; }
_AFXODLGS_INLINE CString COleChangeSourceDialog::GetFileName()
{ return CString(m_cs.lpszDisplayName, m_cs.nFileLength); }
_AFXODLGS_INLINE CString COleChangeSourceDialog::GetItemName()
{ return m_cs.lpszDisplayName+m_cs.nFileLength; }
_AFXODLGS_INLINE CString COleChangeSourceDialog::GetFromPrefix()
{ return m_cs.lpszFrom; }
_AFXODLGS_INLINE CString COleChangeSourceDialog::GetToPrefix()
{ return m_cs.lpszTo; }
#endif //_AFXODLGS_INLINE
/////////////////////////////////////////////////////////////////////////////
// OLE Server inlines
#ifdef _AFXOLESVR_INLINE
// COleServerItem
_AFXOLESVR_INLINE COleServerDoc* COleServerItem::GetDocument() const
{ ASSERT_VALID(this); return (COleServerDoc*)m_pDocument; }
_AFXOLESVR_INLINE void COleServerItem::NotifyChanged(DVASPECT nDrawAspect)
{ ASSERT_VALID(this); NotifyClient(OLE_CHANGED, nDrawAspect); }
_AFXOLESVR_INLINE const CString& COleServerItem::GetItemName() const
{ ASSERT_VALID(this); return m_strItemName; }
_AFXOLESVR_INLINE void COleServerItem::SetItemName(LPCTSTR lpszItemName)
{
ASSERT_VALID(this);
ASSERT(lpszItemName != NULL);
ASSERT(AfxIsValidString(lpszItemName));
m_strItemName = lpszItemName;
}
_AFXOLESVR_INLINE BOOL COleServerItem::IsLinkedItem() const
{ ASSERT_VALID(this); return GetDocument()->m_pEmbeddedItem != this; }
_AFXOLESVR_INLINE COleDataSource* COleServerItem::GetDataSource()
{ ASSERT_VALID(this); return &m_dataSource; }
// COleServerDoc
_AFXOLESVR_INLINE void COleServerDoc::NotifyChanged()
{ ASSERT_VALID(this); NotifyAllItems(OLE_CHANGED, DVASPECT_CONTENT); }
_AFXOLESVR_INLINE void COleServerDoc::NotifyClosed()
{ ASSERT_VALID(this); NotifyAllItems(OLE_CLOSED, 0); }
_AFXOLESVR_INLINE void COleServerDoc::NotifySaved()
{ ASSERT_VALID(this); NotifyAllItems(OLE_SAVED, 0); }
_AFXOLESVR_INLINE BOOL COleServerDoc::IsEmbedded() const
{ ASSERT_VALID(this); return m_bEmbedded; }
_AFXOLESVR_INLINE BOOL COleServerDoc::IsDocObject() const
{ ASSERT_VALID(this); return m_pDocObjectServer != NULL; }
_AFXOLESVR_INLINE BOOL COleServerDoc::IsInPlaceActive() const
{ ASSERT_VALID(this); return m_pInPlaceFrame != NULL; }
#endif //_AFXOLESVR_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,66 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXOLECL_RC__
#define __AFXOLECL_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifndef _INC_DLGS
#include <dlgs.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// OLE Client Resources
/////////////////////////////////////////////////////////////////////////////
// OLE strings
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_STATIC_OBJECT "Can not activate a static ActiveX object."
AFX_IDP_FAILED_TO_CONNECT "Failed to connect.\nLink may be broken."
AFX_IDP_SERVER_BUSY "Unable to process command, server busy."
AFX_IDP_BAD_VERB "Failed to perform server operation."
AFX_IDP_FAILED_TO_LAUNCH "Failed to launch server application."
AFX_IDS_UPDATING_ITEMS "Updating ActiveX objects"
AFX_IDP_FAILED_TO_CONVERT "Failed to convert ActiveX object."
AFX_IDP_ASK_TO_DISCARD "ActiveX objects cannot be saved while exiting Windows!\nDiscard all changes to %1?"
AFX_IDP_FAILED_TO_CREATE "Failed to create object. Make sure the application is entered in the system registry."
AFX_IDS_METAFILE_FORMAT "Picture (Metafile)\na picture"
AFX_IDS_DIB_FORMAT "Device Independent Bitmap\na device independent bitmap"
AFX_IDS_BITMAP_FORMAT "Bitmap\na bitmap"
AFX_IDS_LINKSOURCE_FORMAT "%s\n%s"
AFX_IDS_EMBED_FORMAT "%s\n%s"
AFX_IDS_RTF_FORMAT "Rich Text (RTF)\ntext with font and paragraph formatting"
AFX_IDS_TEXT_FORMAT "Unformatted Text\ntext without any formatting"
AFX_IDS_INVALID_CURRENCY "Invalid Currency."
AFX_IDS_INVALID_DATETIME "Invalid DateTime."
AFX_IDS_INVALID_DATETIMESPAN "Invalid DateTimeSpan."
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXOLECL_RC__
@@ -0,0 +1,137 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXOLEDB_H__
#define __AFXOLEDB_H__
#ifdef _AFX_NO_DAO_SUPPORT
#error OLE DB classes not supported in this library variant.
#endif
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#include <atlbase.h>
// application is expected to provide a _Module
extern CComModule _Module;
#include <atlcom.h>
#include <atldbcli.h>
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
/////////////////////////////////////////////////////////////////////////////
// Win32 libraries
#ifndef _AFX_NOFORCE_LIBS
#ifdef _AFXDLL
#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
#ifndef _UNICODE
#pragma comment(lib, "mfco42d.lib")
#pragma comment(lib, "mfcd42d.lib")
#else
#pragma comment(lib, "mfco42ud.lib")
#pragma comment(lib, "mfcd42ud.lib")
#endif
#endif
#endif
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
//CObject
//CCmdTarget;
//CWnd
//CView
//CScrollView
//CFormView
class COleDBRecordView; // view records with a form
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_DB_DATA
/////////////////////////////////////////////////////////////////////////////
// CRecordView - form for viewing data records
class COleDBRecordView : public CFormView
{
DECLARE_DYNAMIC(COleDBRecordView)
// Construction
protected: // must derive your own class
COleDBRecordView(LPCTSTR lpszTemplateName)
: CFormView(lpszTemplateName)
{
m_bOnFirstRecord = TRUE;
m_bOnLastRecord = FALSE;
}
COleDBRecordView(UINT nIDTemplate)
: CFormView(nIDTemplate)
{
m_bOnFirstRecord = TRUE;
m_bOnLastRecord = FALSE;
}
// Attributes
public:
virtual CRowset* OnGetRowset() = 0;
// Operations
public:
virtual BOOL OnMove(UINT nIDMoveCommand);
// Implementation
public:
virtual void OnInitialUpdate();
protected:
BOOL m_bOnFirstRecord;
BOOL m_bOnLastRecord;
//{{AFX_MSG(CRecordView)
afx_msg void OnUpdateRecordFirst(CCmdUI* pCmdUI);
afx_msg void OnUpdateRecordPrev(CCmdUI* pCmdUI);
afx_msg void OnUpdateRecordNext(CCmdUI* pCmdUI);
afx_msg void OnUpdateRecordLast(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif __AFXOLEDB_H__
@@ -0,0 +1,53 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXOLESV_RC__
#define __AFXOLESV_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// OLE Server Resources
// OLE strings
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_ASK_TO_UPDATE, "Update %1 before proceeding?"
AFX_IDP_FAILED_TO_UPDATE, "Could not update client."
AFX_IDP_FAILED_TO_REGISTER, "Failed to register. ActiveX features may not work properly."
AFX_IDP_FAILED_TO_AUTO_REGISTER, "Failed to update the system registry.\nPlease try using REGEDIT."
END
STRINGTABLE PRELOAD
BEGIN
AFX_IDS_APP_TITLE_EMBEDDING, "%1 in %2"
AFX_IDS_OBJ_TITLE_INPLACE, "%1 - %2"
AFX_IDS_EXIT_MENU, "E&xit && Return to %1"
AFX_IDS_UPDATE_MENU, "&Update %1"
AFX_IDS_SAVEFILECOPY, "Save Copy As"
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXOLESV_RC__
@@ -0,0 +1,53 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXPLEX_H__
#define __AFXPLEX_H__
#ifndef __AFX_H__
#include <afx.h>
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
#ifdef AFX_COLL_SEG
#pragma code_seg(AFX_COLL_SEG)
#endif
struct CPlex // warning variable length structure
{
CPlex* pNext;
#if (_AFX_PACKING >= 8)
DWORD dwReserved[1]; // align on 8 byte boundary
#endif
// BYTE data[maxNum*elementSize];
void* data() { return this+1; }
static CPlex* PASCAL Create(CPlex*& head, UINT nMax, UINT cbElement);
// like 'calloc' but no zero fill
// may throw memory exceptions
void FreeDataChain(); // free this one and links
};
#ifdef AFX_COLL_SEG
#pragma code_seg()
#endif
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#endif //__AFXPLEX_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,90 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXPRINT_RC__
#define __AFXPRINT_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// Printing Resources
AFX_IDC_MAGNIFY CURSOR DISCARDABLE "res\\magnify.cur"
AFX_IDD_PRINTDLG DIALOG DISCARDABLE 6, 18, 133, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | 0x04
FONT 8, "MS Shell Dlg"
BEGIN
CTEXT "Printing",IDC_STATIC,0,9,133,8
CTEXT "",AFX_IDC_PRINT_DOCNAME,0,19,133,8
CTEXT "on the",IDC_STATIC,0,29,133,8
CTEXT "",AFX_IDC_PRINT_PRINTERNAME,0,39,133,8
CTEXT "",AFX_IDC_PRINT_PORTNAME,0,49,133,8
CTEXT "",AFX_IDC_PRINT_PAGENUM,0,59,133,8
PUSHBUTTON "Cancel",IDCANCEL,46,74,40,14
END
// Preview Toolbar Dialog
AFX_IDD_PREVIEW_TOOLBAR DIALOG PRELOAD DISCARDABLE 0, 0, 330, 16
STYLE WS_CHILD | 0x04
FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "&Print...",AFX_ID_PREVIEW_PRINT,2,2,44,12
PUSHBUTTON "&Next Page",AFX_ID_PREVIEW_NEXT,48,2,44,12
PUSHBUTTON "Pre&v Page",AFX_ID_PREVIEW_PREV,94,2,44,12
PUSHBUTTON "",AFX_ID_PREVIEW_NUMPAGE,140,2,44,12
PUSHBUTTON "Zoom &In",AFX_ID_PREVIEW_ZOOMIN,186,2,44,12
PUSHBUTTON "Zoom &Out",AFX_ID_PREVIEW_ZOOMOUT,232,2,44,12
PUSHBUTTON "&Close",AFX_ID_PREVIEW_CLOSE,278,2,44,12
END
// Printing strings
STRINGTABLE DISCARDABLE
BEGIN
// print progress dialog strings
AFX_IDS_PRINTONPORT, "on %1" // for print output
AFX_IDS_ONEPAGE, "&One Page" // for preview button
AFX_IDS_TWOPAGE, "&Two Page" // for preview button
AFX_IDS_PRINTPAGENUM, "Page %u" // for print output
AFX_IDS_PREVIEWPAGEDESC, "Page %u\nPages %u-%u\n"
// print to file dialog strings
AFX_IDS_PRINTDEFAULTEXT, "prn" // default extension
AFX_IDS_PRINTDEFAULT, "Output.prn" // default file
AFX_IDS_PRINTFILTER,
"Printer Files (*.prn)|*.prn|All Files (*.*)|*.*||"
AFX_IDS_PRINTCAPTION, "Print to File" // caption for browse dlg
AFX_IDS_PRINTTOFILE, "to %1" // to file
END
// Print Preview Accelerator Table
AFX_IDR_PREVIEW_ACCEL ACCELERATORS LOADONCALL MOVEABLE
BEGIN
VK_NEXT, AFX_ID_PREVIEW_NEXT, VIRTKEY, NOINVERT
VK_PRIOR, AFX_ID_PREVIEW_PREV, VIRTKEY, NOINVERT
VK_ESCAPE, AFX_ID_PREVIEW_CLOSE, VIRTKEY, NOINVERT
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXPRINT_RC__
@@ -0,0 +1,781 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Note: This header file contains useful classes that are documented only
// in the MFC Technical Notes. These classes may change from version to
// version, so be prepared to change your code accordingly if you utilize
// this header. In the future, commonly used portions of this header
// may be moved and officially documented.
#ifndef __AFXPRIV_H__
#define __AFXPRIV_H__
#ifndef __AFXADV_H__
#include <afxadv.h>
#endif
#ifndef _INC_MALLOC
#include <malloc.h>
#endif
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXPRIV - MFC Private Classes
// Implementation structures
struct AFX_SIZEPARENTPARAMS; // Control bar implementation
struct AFX_CMDHANDLERINFO; // Command routing implementation
// Classes declared in this file
//CDC
class CPreviewDC; // Virtual DC for print preview
//CCmdTarget
//CWnd
//CView
class CPreviewView; // Print preview view
//CFrameWnd
class COleCntrFrameWnd;
//CMiniFrameWnd
class CMiniDockFrameWnd;
class CDockContext; // for dragging control bars
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// Global ID ranges (see Technical note TN020 for more details)
// 8000 -> FFFF command IDs (used for menu items, accelerators and controls)
#define IS_COMMAND_ID(nID) ((nID) & 0x8000)
// 8000 -> DFFF : user commands
// E000 -> EFFF : AFX commands and other things
// F000 -> FFFF : standard windows commands and other things etc
// E000 -> E7FF standard commands
// E800 -> E8FF control bars (first 32 are special)
// E900 -> EEFF standard window controls/components
// EF00 -> EFFF SC_ menu help
// F000 -> FFFF standard strings
#define ID_COMMAND_FROM_SC(sc) (((sc - 0xF000) >> 4) + AFX_IDS_SCFIRST)
// 0000 -> 7FFF IDR range
// 0000 -> 6FFF : user resources
// 7000 -> 7FFF : AFX (and standard windows) resources
// IDR ranges (NOTE: IDR_ values must be <32768)
#define ASSERT_VALID_IDR(nIDR) ASSERT((nIDR) != 0 && (nIDR) < 0x8000)
/////////////////////////////////////////////////////////////////////////////
// Context sensitive help support (see Technical note TN028 for more details)
// Help ID bases
#define HID_BASE_COMMAND 0x00010000UL // ID and IDM
#define HID_BASE_RESOURCE 0x00020000UL // IDR and IDD
#define HID_BASE_PROMPT 0x00030000UL // IDP
#define HID_BASE_NCAREAS 0x00040000UL
#define HID_BASE_CONTROL 0x00050000UL // IDC
#define HID_BASE_DISPATCH 0x00060000UL // IDispatch help codes
/////////////////////////////////////////////////////////////////////////////
// Internal AFX Windows messages (see Technical note TN024 for more details)
// (0x0360 - 0x037F are reserved for MFC)
#define WM_QUERYAFXWNDPROC 0x0360 // lResult = 1 if processed by AfxWndProc
#define WM_SIZEPARENT 0x0361 // lParam = &AFX_SIZEPARENTPARAMS
#define WM_SETMESSAGESTRING 0x0362 // wParam = nIDS (or 0),
// lParam = lpszOther (or NULL)
#define WM_IDLEUPDATECMDUI 0x0363 // wParam == bDisableIfNoHandler
#define WM_INITIALUPDATE 0x0364 // (params unused) - sent to children
#define WM_COMMANDHELP 0x0365 // lResult = TRUE/FALSE,
// lParam = dwContext
#define WM_HELPHITTEST 0x0366 // lResult = dwContext,
// lParam = MAKELONG(x,y)
#define WM_EXITHELPMODE 0x0367 // (params unused)
#define WM_RECALCPARENT 0x0368 // force RecalcLayout on frame window
// (only for inplace frame windows)
#define WM_SIZECHILD 0x0369 // special notify from COleResizeBar
// wParam = ID of child window
// lParam = lpRectNew (new position/size)
#define WM_KICKIDLE 0x036A // (params unused) causes idles to kick in
#define WM_QUERYCENTERWND 0x036B // lParam = HWND to use as centering parent
#define WM_DISABLEMODAL 0x036C // lResult = 0, disable during modal state
// lResult = 1, don't disable
#define WM_FLOATSTATUS 0x036D // wParam combination of FS_* flags below
// WM_ACTIVATETOPLEVEL is like WM_ACTIVATEAPP but works with hierarchies
// of mixed processes (as is the case with OLE in-place activation)
#define WM_ACTIVATETOPLEVEL 0x036E // wParam = nState (like WM_ACTIVATE)
// lParam = pointer to HWND[2]
// lParam[0] = hWnd getting WM_ACTIVATE
// lParam[1] = hWndOther
#define WM_QUERY3DCONTROLS 0x036F // lResult != 0 if 3D controls wanted
// Note: Messages 0x0370, 0x0371, and 0x372 were incorrectly used by
// some versions of Windows. To remain compatible, MFC does not
// use messages in that range.
#define WM_RESERVED_0370 0x0370
#define WM_RESERVED_0371 0x0371
#define WM_RESERVED_0372 0x0372
// WM_SOCKET_NOTIFY and WM_SOCKET_DEAD are used internally by MFC's
// Windows sockets implementation. For more information, see sockcore.cpp
#define WM_SOCKET_NOTIFY 0x0373
#define WM_SOCKET_DEAD 0x0374
// same as WM_SETMESSAGESTRING except not popped if IsTracking()
#define WM_POPMESSAGESTRING 0x0375
// WM_HELPPROMPTADDR is used internally to get the address of
// m_dwPromptContext from the associated frame window. This is used
// during message boxes to setup for F1 help while that msg box is
// displayed. lResult is the address of m_dwPromptContext.
#define WM_HELPPROMPTADDR 0x0376
// Constants used in DLGINIT resources for OLE control containers
// NOTE: These are NOT real Windows messages they are simply tags
// used in the control resource and are never used as 'messages'
#define WM_OCC_LOADFROMSTREAM 0x0376
#define WM_OCC_LOADFROMSTORAGE 0x0377
#define WM_OCC_INITNEW 0x0378
#define WM_OCC_LOADFROMSTREAM_EX 0x037A
#define WM_OCC_LOADFROMSTORAGE_EX 0x037B
// Marker used while rearranging the message queue
#define WM_QUEUE_SENTINEL 0x0379
// Note: Messages 0x037C - 0x37E reserved for future MFC use.
#define WM_RESERVED_037C 0x037C
#define WM_RESERVED_037D 0x037D
#define WM_RESERVED_037E 0x037E
// WM_FORWARDMSG - used by ATL to forward a message to another window for processing
// WPARAM - DWORD dwUserData - defined by user
// LPARAM - LPMSG pMsg - a pointer to the MSG structure
// return value - 0 if the message was not processed, nonzero if it was
#define WM_FORWARDMSG 0x037F
// like ON_MESSAGE but no return value
#define ON_MESSAGE_VOID(message, memberFxn) \
{ message, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&memberFxn },
// special struct for WM_SIZEPARENT
struct AFX_SIZEPARENTPARAMS
{
HDWP hDWP; // handle for DeferWindowPos
RECT rect; // parent client rectangle (trim as appropriate)
SIZE sizeTotal; // total size on each side as layout proceeds
BOOL bStretch; // should stretch to fill all space
};
// flags for wParam in the WM_FLOATSTATUS message
enum { FS_SHOW = 0x01, FS_HIDE = 0x02,
FS_ACTIVATE = 0x04, FS_DEACTIVATE = 0x08,
FS_ENABLE = 0x10, FS_DISABLE = 0x20,
FS_SYNCACTIVE = 0x40 };
void AFXAPI AfxRepositionWindow(AFX_SIZEPARENTPARAMS* lpLayout,
HWND hWnd, LPCRECT lpRect);
/////////////////////////////////////////////////////////////////////////////
// Implementation of command routing
struct AFX_CMDHANDLERINFO
{
CCmdTarget* pTarget;
void (AFX_MSG_CALL CCmdTarget::*pmf)(void);
};
/////////////////////////////////////////////////////////////////////////////
// Robust file save support
// opens a temp file if modeCreate specified and enough free space
// renaming, etc occurs automatically if everything succeeds
class CMirrorFile : public CFile
{
// Implementation
public:
virtual void Abort();
virtual void Close();
virtual BOOL Open(LPCTSTR lpszFileName, UINT nOpenFlags,
CFileException* pError = NULL);
static CString GetTempName(LPCTSTR pstrOriginalFile, BOOL bCreate);
protected:
CString m_strMirrorName;
};
/////////////////////////////////////////////////////////////////////////////
// Implementation of PrintPreview
class CPreviewDC : public CDC
{
DECLARE_DYNAMIC(CPreviewDC)
public:
virtual void SetAttribDC(HDC hDC); // Set the Attribute DC
virtual void SetOutputDC(HDC hDC);
virtual void ReleaseOutputDC();
// Constructors
CPreviewDC();
// Implementation
public:
virtual ~CPreviewDC();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
void SetScaleRatio(int nNumerator, int nDenominator);
void SetTopLeftOffset(CSize TopLeft);
void ClipToPage();
// These conversion functions can be used without an output DC
void PrinterDPtoScreenDP(LPPOINT lpPoint) const;
// Device-Context Functions
virtual int SaveDC();
virtual BOOL RestoreDC(int nSavedDC);
public:
virtual CGdiObject* SelectStockObject(int nIndex);
virtual CFont* SelectObject(CFont* pFont);
// Drawing-Attribute Functions
virtual COLORREF SetBkColor(COLORREF crColor);
virtual COLORREF SetTextColor(COLORREF crColor);
// Mapping Functions
virtual int SetMapMode(int nMapMode);
virtual CPoint SetViewportOrg(int x, int y);
virtual CPoint OffsetViewportOrg(int nWidth, int nHeight);
virtual CSize SetViewportExt(int x, int y);
virtual CSize ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom);
virtual CSize SetWindowExt(int x, int y);
virtual CSize ScaleWindowExt(int xNum, int xDenom, int yNum, int yDenom);
// Text Functions
virtual BOOL TextOut(int x, int y, LPCTSTR lpszString, int nCount);
virtual BOOL ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
LPCTSTR lpszString, UINT nCount, LPINT lpDxWidths);
virtual CSize TabbedTextOut(int x, int y, LPCTSTR lpszString, int nCount,
int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin);
virtual int DrawText(LPCTSTR lpszString, int nCount, LPRECT lpRect,
UINT nFormat);
virtual BOOL GrayString(CBrush* pBrush,
BOOL (CALLBACK* lpfnOutput)(HDC, LPARAM, int),
LPARAM lpData, int nCount,
int x, int y, int nWidth, int nHeight);
// Printer Escape Functions
virtual int Escape(int nEscape, int nCount, LPCSTR lpszInData, LPVOID lpOutData);
// Implementation
protected:
void MirrorMappingMode(BOOL bCompute);
void MirrorViewportOrg();
void MirrorFont();
void MirrorAttributes();
CSize ComputeDeltas(int& x, LPCTSTR lpszString, UINT& nCount, BOOL bTabbed,
UINT nTabStops, LPINT lpnTabStops, int nTabOrigin,
LPTSTR lpszOutputString, int* pnDxWidths, int& nRightFixup);
protected:
int m_nScaleNum; // Scale ratio Numerator
int m_nScaleDen; // Scale ratio Denominator
int m_nSaveDCIndex; // DC Save index when Screen DC Attached
int m_nSaveDCDelta; // delta between Attrib and output restore indices
CSize m_sizeTopLeft;// Offset for top left corner of page
HFONT m_hFont; // Font selected into the screen DC (NULL if none)
HFONT m_hPrinterFont; // Font selected into the print DC
CSize m_sizeWinExt; // cached window extents computed for screen
CSize m_sizeVpExt; // cached viewport extents computed for screen
};
/////////////////////////////////////////////////////////////////////////////
// CPreviewView
class CDialogBar;
class CPreviewView : public CScrollView
{
DECLARE_DYNCREATE(CPreviewView)
// Constructors
public:
CPreviewView();
BOOL SetPrintView(CView* pPrintView);
// Attributes
protected:
CView* m_pOrigView;
CView* m_pPrintView;
CPreviewDC* m_pPreviewDC; // Output and attrib DCs Set, not created
CDC m_dcPrint; // Actual printer DC
// Operations
void SetZoomState(UINT nNewState, UINT nPage, CPoint point);
void SetCurrentPage(UINT nPage, BOOL bClearRatios);
// Returns TRUE if in a page rect. Returns the page index
// in nPage and the point converted to 1:1 screen device coordinates
BOOL FindPageRect(CPoint& point, UINT& nPage);
// Overridables
virtual void OnActivateView(BOOL bActivate,
CView* pActivateView, CView* pDeactiveView);
// Returns .cx/.cy as the numerator/denominator pair for the ratio
// using CSize for convenience
virtual CSize CalcScaleRatio(CSize windowSize, CSize actualSize);
virtual void PositionPage(UINT nPage);
virtual void OnDisplayPageNumber(UINT nPage, UINT nPagesDisplayed);
// Implementation
public:
virtual ~CPreviewView();
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
#ifdef _DEBUG
void AssertValid() const;
void Dump(CDumpContext& dc) const;
#endif
protected:
//{{AFX_MSG(CPreviewView)
afx_msg void OnPreviewClose();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnDraw(CDC* pDC);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnNumPageChange();
afx_msg void OnNextPage();
afx_msg void OnPrevPage();
afx_msg void OnPreviewPrint();
afx_msg void OnZoomIn();
afx_msg void OnZoomOut();
afx_msg void OnUpdateNumPageChange(CCmdUI* pCmdUI);
afx_msg void OnUpdateNextPage(CCmdUI* pCmdUI);
afx_msg void OnUpdatePrevPage(CCmdUI* pCmdUI);
afx_msg void OnUpdateZoomIn(CCmdUI* pCmdUI);
afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
void DoZoom(UINT nPage, CPoint point);
void SetScaledSize(UINT nPage);
CSize CalcPageDisplaySize();
CPrintPreviewState* m_pPreviewState; // State to restore
CDialogBar* m_pToolBar; // Toolbar for preview
struct PAGE_INFO
{
PAGE_INFO();
CRect rectScreen; // screen rect (screen device units)
CSize sizeUnscaled; // unscaled screen rect (screen device units)
CSize sizeScaleRatio; // scale ratio (cx/cy)
CSize sizeZoomOutRatio; // scale ratio when zoomed out (cx/cy)
};
PAGE_INFO* m_pPageInfo; // Array of page info structures
PAGE_INFO m_pageInfoArray[2]; // Embedded array for the default implementation
BOOL m_bPageNumDisplayed;// Flags whether or not page number has yet
// been displayed on status line
UINT m_nZoomOutPages; // number of pages when zoomed out
UINT m_nZoomState;
UINT m_nMaxPages; // for sanity checks
UINT m_nCurrentPage;
UINT m_nPages;
int m_nSecondPageOffset; // used to shift second page position
HCURSOR m_hMagnifyCursor;
CSize m_sizePrinterPPI; // printer pixels per inch
CPoint m_ptCenterPoint;
CPrintInfo* m_pPreviewInfo;
DECLARE_MESSAGE_MAP()
friend class CView;
friend BOOL CALLBACK _AfxPreviewCloseProc(CFrameWnd* pFrameWnd);
};
// Zoom States
#define ZOOM_OUT 0
#define ZOOM_MIDDLE 1
#define ZOOM_IN 2
/////////////////////////////////////////////////////////////////////////////
// mirroring support
//WINBUG: some mirroring stuff will be in wingdi.h someday
#ifndef LAYOUT_RTL
#define LAYOUT_LTR 0x00000000
#define LAYOUT_RTL 0x00000001
#define NOMIRRORBITMAP 0x80000000
#endif
//WINBUG: some mirroring stuff will be in winuser.h someday
#ifndef WS_EX_LAYOUTRTL
#define WS_EX_LAYOUTRTL 0x00400000L
#endif
/////////////////////////////////////////////////////////////////////////////
// toolbar docking support
class CDockContext
{
public:
// Construction
CDockContext(CControlBar* pBar);
// Attributes
CPoint m_ptLast; // last mouse position during drag
CRect m_rectLast;
CSize m_sizeLast;
BOOL m_bDitherLast;
// Rectangles used during dragging or resizing
CRect m_rectDragHorz;
CRect m_rectDragVert;
CRect m_rectFrameDragHorz;
CRect m_rectFrameDragVert;
CControlBar* m_pBar; // the toolbar that created this context
CFrameWnd* m_pDockSite; // the controlling frame of the CControlBar
DWORD m_dwDockStyle; // allowable dock styles for bar
DWORD m_dwOverDockStyle; // style of dock that rect is over
DWORD m_dwStyle; // style of control bar
BOOL m_bFlip; // if shift key is down
BOOL m_bForceFrame; // if ctrl key is down
CDC* m_pDC; // where to draw during drag
BOOL m_bDragging;
int m_nHitTest;
UINT m_uMRUDockID;
CRect m_rectMRUDockPos;
DWORD m_dwMRUFloatStyle;
CPoint m_ptMRUFloatPos;
// Drag Operations
virtual void StartDrag(CPoint pt);
void Move(CPoint pt); // called when mouse has moved
void EndDrag(); // drop
void OnKey(int nChar, BOOL bDown);
// Resize Operations
virtual void StartResize(int nHitTest, CPoint pt);
void Stretch(CPoint pt);
void EndResize();
// Double Click Operations
virtual void ToggleDocking();
// Operations
void InitLoop();
void CancelLoop();
// Implementation
public:
~CDockContext();
BOOL Track();
void DrawFocusRect(BOOL bRemoveRect = FALSE);
// draws the correct outline
void UpdateState(BOOL* pFlag, BOOL bNewValue);
DWORD CanDock();
CDockBar* GetDockBar(DWORD dwOverDockStyle);
};
/////////////////////////////////////////////////////////////////////////////
// CControlBarInfo - used for docking serialization
class CControlBarInfo
{
public:
// Implementation
CControlBarInfo();
// Attributes
UINT m_nBarID; // ID of this bar
BOOL m_bVisible; // visibility of this bar
BOOL m_bFloating; // whether floating or not
BOOL m_bHorz; // orientation of floating dockbar
BOOL m_bDockBar; // TRUE if a dockbar
CPoint m_pointPos; // topleft point of window
UINT m_nMRUWidth; // MRUWidth for Dynamic Toolbars
BOOL m_bDocking; // TRUE if this bar has a DockContext
UINT m_uMRUDockID; // most recent docked dockbar
CRect m_rectMRUDockPos; // most recent docked position
DWORD m_dwMRUFloatStyle; // most recent floating orientation
CPoint m_ptMRUFloatPos; // most recent floating position
CPtrArray m_arrBarID; // bar IDs for bars contained within this one
CControlBar* m_pBar; // bar which this refers to (transient)
void Serialize(CArchive& ar, CDockState* pDockState);
BOOL LoadState(LPCTSTR lpszProfileName, int nIndex, CDockState* pDockState);
BOOL SaveState(LPCTSTR lpszProfileName, int nIndex);
};
/////////////////////////////////////////////////////////////////////////////
// CDockBar - used for docking
class CDockBar : public CControlBar
{
DECLARE_DYNAMIC(CDockBar)
// Construction
public:
CDockBar(BOOL bFloating = FALSE); // TRUE if attached to CMiniDockFrameWnd
BOOL Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID);
// Attributes
BOOL m_bFloating;
virtual BOOL IsDockBar() const;
int GetDockedCount() const;
virtual int GetDockedVisibleCount() const;
// Operations
void DockControlBar(CControlBar* pBar, LPCRECT lpRect = NULL);
void ReDockControlBar(CControlBar* pBar, LPCRECT lpRect = NULL);
BOOL RemoveControlBar(CControlBar*, int nPosExclude = -1, int nAddPlaceHolder = 0);
void RemovePlaceHolder(CControlBar* pBar);
// Implementation
public:
virtual ~CDockBar();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
virtual void DoPaint(CDC* pDC);
// public implementation helpers
void GetBarInfo(CControlBarInfo* pInfo);
void SetBarInfo(CControlBarInfo* pInfo, CFrameWnd* pFrameWnd);
int FindBar(CControlBar* pBar, int nPosExclude = -1);
void ShowAll(BOOL bShow);
CPtrArray m_arrBars; // each element is a CControlBar
protected:
BOOL m_bLayoutQuery;
CRect m_rectLayout;
CControlBar* GetDockedControlBar(int nPos) const;
// implementation helpers
int Insert(CControlBar* pBar, CRect rect, CPoint ptMid);
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
//{{AFX_MSG(CDockBar)
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
afx_msg void OnNcPaint();
afx_msg void OnWindowPosChanging(LPWINDOWPOS lpWndPos);
afx_msg void OnPaint();
afx_msg LRESULT OnSizeParent(WPARAM, LPARAM);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
friend class CMiniDockFrameWnd;
};
class CMiniDockFrameWnd : public CMiniFrameWnd
{
DECLARE_DYNCREATE(CMiniDockFrameWnd)
public:
// Construction
CMiniDockFrameWnd();
virtual BOOL Create(CWnd* pParent, DWORD dwBarStyle);
// Operations
virtual void RecalcLayout(BOOL bNotify = TRUE);
// Implementation
public:
CDockBar m_wndDockBar;
//{{AFX_MSG(CMiniFrameWnd)
afx_msg void OnClose();
afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
//}}AFX_MSG
afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// COleCntrFrameWnd
class COleIPFrameWnd;
class COleCntrFrameWnd : public CFrameWnd
{
// Constructor
public:
COleCntrFrameWnd(COleIPFrameWnd* pInPlaceFrame);
// Implementation
protected:
COleIPFrameWnd* m_pInPlaceFrame;
virtual void PostNcDestroy();
public:
virtual ~COleCntrFrameWnd();
virtual void RecalcLayout(BOOL bNotify = TRUE);
void OnIdleUpdateCmdUI();
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
#ifdef _DEBUG
void AssertValid() const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// CDialogTemplate
class CDialogTemplate
{
// Constructors
public:
CDialogTemplate(const DLGTEMPLATE* pTemplate = NULL);
CDialogTemplate(HGLOBAL hGlobal);
// Attributes
BOOL HasFont() const;
BOOL SetFont(LPCTSTR lpFaceName, WORD nFontSize);
BOOL SetSystemFont(WORD nFontSize = 0);
BOOL GetFont(CString& strFaceName, WORD& nFontSize) const;
void GetSizeInDialogUnits(SIZE* pSize) const;
void GetSizeInPixels(SIZE* pSize) const;
static BOOL AFX_CDECL GetFont(const DLGTEMPLATE* pTemplate,
CString& strFaceName, WORD& nFontSize);
// Operations
BOOL Load(LPCTSTR lpDialogTemplateID);
HGLOBAL Detach();
// Implementation
public:
~CDialogTemplate();
HGLOBAL m_hTemplate;
DWORD m_dwTemplateSize;
BOOL m_bSystemFont;
protected:
static BYTE* AFX_CDECL GetFontSizeField(const DLGTEMPLATE* pTemplate);
static UINT AFX_CDECL GetTemplateSize(const DLGTEMPLATE* pTemplate);
BOOL SetTemplate(const DLGTEMPLATE* pTemplate, UINT cb);
};
/////////////////////////////////////////////////////////////////////////////
// WM_NOTIFY support
struct AFX_NOTIFY
{
LRESULT* pResult;
NMHDR* pNMHDR;
};
/////////////////////////////////////////////////////////////////////////////
// Global implementation helpers
// window creation hooking
void AFXAPI AfxHookWindowCreate(CWnd* pWnd);
BOOL AFXAPI AfxUnhookWindowCreate();
void AFXAPI AfxResetMsgCache();
// for backward compatibility to previous versions
#define _AfxHookWindowCreate AfxHookWindowCreate
#define _AfxUnhookWindowCreate AfxUnhookWindowCreate
// string helpers
void AFXAPI AfxSetWindowText(HWND hWndCtrl, LPCTSTR lpszNew);
int AFXAPI AfxLoadString(UINT nIDS, LPTSTR lpszBuf, UINT nMaxBuf = 256);
HDC AFXAPI AfxCreateDC(HGLOBAL hDevNames, HGLOBAL hDevMode);
void AFXAPI AfxGetModuleShortFileName(HINSTANCE hInst, CString& strShortName);
// Failure dialog helpers
void AFXAPI AfxFailMaxChars(CDataExchange* pDX, int nChars);
void AFXAPI AfxFailRadio(CDataExchange* pDX);
// DLL load helpers
HINSTANCE AFXAPI AfxLoadDll(HINSTANCE* volatile hInst, LPCSTR lpszDLL);
HINSTANCE AFXAPI AfxLoadDll(HINSTANCE* volatile hInst, LPCSTR lpszDLL,
FARPROC* pProcPtrs, LPCSTR lpszProcName);
#ifndef __AFXCONV_H__
#include <afxconv.h>
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXPRIV_H__
/////////////////////////////////////////////////////////////////////////////
#ifndef __AFXPRIV2_H__
#include <afxpriv2.h>
#endif
@@ -0,0 +1,225 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Note: This header file contains useful classes that are documented only
// in the MFC Technical Notes. These classes may change from version to
// version, so be prepared to change your code accordingly if you utilize
// this header. In the future, commonly used portions of this header
// may be moved and officially documented.
#ifndef __AFXPRIV2_H__
// Do not define __AFXPRIV2_H__ here. It is defined at the bottom.
#ifndef __AFXPRIV_H__
#include <afxpriv.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXPRIV2 - MFC Private Classes
// General OLE features
#if (!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
// Implementation structures
struct AFX_EVENT; // Event sink implementation
// Classes declared in this file
class COleControlLock;
#endif
// OLE Automation features
#ifdef __AFXDISP_H__
// Classes declared in this file
//IStream
class CArchiveStream;
// Functions declared in this file
// AfxBSTR2ABTSR
// AfxTaskStringA2W
// AfxTaskStringW2A
#endif
/////////////////////////////////////////////////////////////////////////////
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// General OLE features
#if (!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
#ifndef __AFXPRIV2_H__OLE__
#define __AFXPRIV2_H__OLE__
/////////////////////////////////////////////////////////////////////////////
// Implementation of event sink handling
struct AFX_EVENT
{
enum
{
event,
propRequest, propChanged,
propDSCNotify
};
AFX_EVENT(int eventKind);
AFX_EVENT(int eventKind, DISPID dispid, DISPPARAMS* pDispParams = NULL,
EXCEPINFO* pExcepInfo = NULL, UINT* puArgError = NULL);
int m_eventKind;
DISPID m_dispid;
DISPPARAMS* m_pDispParams;
EXCEPINFO* m_pExcepInfo;
UINT* m_puArgError;
BOOL m_bPropChanged;
HRESULT m_hResult;
DSCSTATE m_nDSCState;
DSCREASON m_nDSCReason;
};
AFX_INLINE AFX_EVENT::AFX_EVENT(int eventKind)
{
m_eventKind = eventKind;
m_dispid = DISPID_UNKNOWN;
m_pDispParams = NULL;
m_pExcepInfo = NULL;
m_puArgError = NULL;
m_hResult = NOERROR;
m_nDSCState = dscNoState;
m_nDSCReason = dscNoReason;
}
AFX_INLINE AFX_EVENT::AFX_EVENT(int eventKind, DISPID dispid,
DISPPARAMS* pDispParams, EXCEPINFO* pExcepInfo, UINT* puArgError)
{
m_eventKind = eventKind;
m_dispid = dispid;
m_pDispParams = pDispParams;
m_pExcepInfo = pExcepInfo;
m_puArgError = puArgError;
m_hResult = NOERROR;
m_nDSCState = dscNoState;
m_nDSCReason = dscNoReason;
}
/////////////////////////////////////////////////////////////////////////////
// COleControlLock
class COleControlLock
{
// Constructors
public:
COleControlLock(REFCLSID clsid);
// Attributes
CLSID m_clsid;
LPCLASSFACTORY m_pClassFactory;
COleControlLock* m_pNextLock;
// Implementation
public:
virtual ~COleControlLock();
};
#endif // __AFXPRIV2_H__OLE__
#endif //(!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
/////////////////////////////////////////////////////////////////////////////
// OLE Automation features
#ifdef __AFXDISP_H__
#ifndef __AFXPRIV2_H__DISP__
#define __AFXPRIV2_H__DISP__
/////////////////////////////////////////////////////////////////////////////
// CArchiveStream
class CArchiveStream : public IStream
{
public:
CArchiveStream(CArchive* pArchive);
// Implementation
CArchive* m_pArchive;
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
STDMETHOD(QueryInterface)(REFIID, LPVOID*);
STDMETHOD(Read)(void*, ULONG, ULONG*);
STDMETHOD(Write)(const void*, ULONG cb, ULONG*);
STDMETHOD(Seek)(LARGE_INTEGER, DWORD, ULARGE_INTEGER*);
STDMETHOD(SetSize)(ULARGE_INTEGER);
STDMETHOD(CopyTo)(LPSTREAM, ULARGE_INTEGER, ULARGE_INTEGER*,
ULARGE_INTEGER*);
STDMETHOD(Commit)(DWORD);
STDMETHOD(Revert)();
STDMETHOD(LockRegion)(ULARGE_INTEGER, ULARGE_INTEGER,DWORD);
STDMETHOD(UnlockRegion)(ULARGE_INTEGER, ULARGE_INTEGER, DWORD);
STDMETHOD(Stat)(STATSTG*, DWORD);
STDMETHOD(Clone)(LPSTREAM*);
};
/////////////////////////////////////////////////////////////////////////////
// Global UNICODE<>ANSI translation helpers
void AFXAPI AfxBSTR2CString(CString* pStr, BSTR bstr);
#if !defined(_UNICODE) && !defined(OLE2ANSI)
BSTR AFXAPI AfxBSTR2ABSTR(BSTR bstrW);
LPWSTR AFXAPI AfxTaskStringA2W(LPCSTR lpa);
LPSTR AFXAPI AfxTaskStringW2A(LPCWSTR lpw);
#endif
#endif // __AFXPRIV2_H__DISP__
#endif // __AFXDISP_H__
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#if (defined __AFXPRIV2_H__OLE__) && (defined __AFXPRIV2_H__DISP__)
#define __AFXPRIV2_H__
#endif
#endif // __AFXPRIV2_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,774 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXRES_H__
#define __AFXRES_H__
#ifdef RC_INVOKED
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#include "winres.h" // extract from windows header
#endif
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS
#endif
/////////////////////////////////////////////////////////////////////////////
// MFC resource types (see Technical note TN024 for implementation details)
#ifndef RC_INVOKED
#define RT_DLGINIT MAKEINTRESOURCE(240)
#define RT_TOOLBAR MAKEINTRESOURCE(241)
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS
#endif
/////////////////////////////////////////////////////////////////////////////
// General style bits etc
// ControlBar styles
#define CBRS_ALIGN_LEFT 0x1000L
#define CBRS_ALIGN_TOP 0x2000L
#define CBRS_ALIGN_RIGHT 0x4000L
#define CBRS_ALIGN_BOTTOM 0x8000L
#define CBRS_ALIGN_ANY 0xF000L
#define CBRS_BORDER_LEFT 0x0100L
#define CBRS_BORDER_TOP 0x0200L
#define CBRS_BORDER_RIGHT 0x0400L
#define CBRS_BORDER_BOTTOM 0x0800L
#define CBRS_BORDER_ANY 0x0F00L
#define CBRS_TOOLTIPS 0x0010L
#define CBRS_FLYBY 0x0020L
#define CBRS_FLOAT_MULTI 0x0040L
#define CBRS_BORDER_3D 0x0080L
#define CBRS_HIDE_INPLACE 0x0008L
#define CBRS_SIZE_DYNAMIC 0x0004L
#define CBRS_SIZE_FIXED 0x0002L
#define CBRS_FLOATING 0x0001L
#define CBRS_GRIPPER 0x00400000L
#define CBRS_ORIENT_HORZ (CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM)
#define CBRS_ORIENT_VERT (CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT)
#define CBRS_ORIENT_ANY (CBRS_ORIENT_HORZ|CBRS_ORIENT_VERT)
#define CBRS_ALL 0x0040FFFFL
// the CBRS_ style is made up of an alignment style and a draw border style
// the alignment styles are mutually exclusive
// the draw border styles may be combined
#define CBRS_NOALIGN 0x00000000L
#define CBRS_LEFT (CBRS_ALIGN_LEFT|CBRS_BORDER_RIGHT)
#define CBRS_TOP (CBRS_ALIGN_TOP|CBRS_BORDER_BOTTOM)
#define CBRS_RIGHT (CBRS_ALIGN_RIGHT|CBRS_BORDER_LEFT)
#define CBRS_BOTTOM (CBRS_ALIGN_BOTTOM|CBRS_BORDER_TOP)
/////////////////////////////////////////////////////////////////////////////
// Standard window components
// Mode indicators in status bar - these are routed like commands
#define ID_INDICATOR_EXT 0xE700 // extended selection indicator
#define ID_INDICATOR_CAPS 0xE701 // cap lock indicator
#define ID_INDICATOR_NUM 0xE702 // num lock indicator
#define ID_INDICATOR_SCRL 0xE703 // scroll lock indicator
#define ID_INDICATOR_OVR 0xE704 // overtype mode indicator
#define ID_INDICATOR_REC 0xE705 // record mode indicator
#define ID_INDICATOR_KANA 0xE706 // kana lock indicator
#define ID_SEPARATOR 0 // special separator value
#ifndef RC_INVOKED // code only
// Standard control bars (IDW = window ID)
#define AFX_IDW_CONTROLBAR_FIRST 0xE800
#define AFX_IDW_CONTROLBAR_LAST 0xE8FF
#define AFX_IDW_TOOLBAR 0xE800 // main Toolbar for window
#define AFX_IDW_STATUS_BAR 0xE801 // Status bar window
#define AFX_IDW_PREVIEW_BAR 0xE802 // PrintPreview Dialog Bar
#define AFX_IDW_RESIZE_BAR 0xE803 // OLE in-place resize bar
#define AFX_IDW_REBAR 0xE804 // COMCTL32 "rebar" Bar
#define AFX_IDW_DIALOGBAR 0xE805 // CDialogBar
// Note: If your application supports docking toolbars, you should
// not use the following IDs for your own toolbars. The IDs chosen
// are at the top of the first 32 such that the bars will be hidden
// while in print preview mode, and are not likely to conflict with
// IDs your application may have used succesfully in the past.
#define AFX_IDW_DOCKBAR_TOP 0xE81B
#define AFX_IDW_DOCKBAR_LEFT 0xE81C
#define AFX_IDW_DOCKBAR_RIGHT 0xE81D
#define AFX_IDW_DOCKBAR_BOTTOM 0xE81E
#define AFX_IDW_DOCKBAR_FLOAT 0xE81F
// Macro for mapping standard control bars to bitmask (limit of 32)
#define AFX_CONTROLBAR_MASK(nIDC) (1L << (nIDC - AFX_IDW_CONTROLBAR_FIRST))
// parts of Main Frame
#define AFX_IDW_PANE_FIRST 0xE900 // first pane (256 max)
#define AFX_IDW_PANE_LAST 0xE9ff
#define AFX_IDW_HSCROLL_FIRST 0xEA00 // first Horz scrollbar (16 max)
#define AFX_IDW_VSCROLL_FIRST 0xEA10 // first Vert scrollbar (16 max)
#define AFX_IDW_SIZE_BOX 0xEA20 // size box for splitters
#define AFX_IDW_PANE_SAVE 0xEA21 // to shift AFX_IDW_PANE_FIRST
#endif //!RC_INVOKED
#ifndef APSTUDIO_INVOKED
// common style for form views
#define AFX_WS_DEFAULT_VIEW (WS_CHILD | WS_VISIBLE | WS_BORDER)
#endif //!APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Standard app configurable strings
// for application title (defaults to EXE name or name in constructor)
#define AFX_IDS_APP_TITLE 0xE000
// idle message bar line
#define AFX_IDS_IDLEMESSAGE 0xE001
// message bar line when in shift-F1 help mode
#define AFX_IDS_HELPMODEMESSAGE 0xE002
// document title when editing OLE embedding
#define AFX_IDS_APP_TITLE_EMBEDDING 0xE003
// company name
#define AFX_IDS_COMPANY_NAME 0xE004
// object name when server is inplace
#define AFX_IDS_OBJ_TITLE_INPLACE 0xE005
/////////////////////////////////////////////////////////////////////////////
// Standard Commands
// File commands
#define ID_FILE_NEW 0xE100
#define ID_FILE_OPEN 0xE101
#define ID_FILE_CLOSE 0xE102
#define ID_FILE_SAVE 0xE103
#define ID_FILE_SAVE_AS 0xE104
#define ID_FILE_PAGE_SETUP 0xE105
#define ID_FILE_PRINT_SETUP 0xE106
#define ID_FILE_PRINT 0xE107
#define ID_FILE_PRINT_DIRECT 0xE108
#define ID_FILE_PRINT_PREVIEW 0xE109
#define ID_FILE_UPDATE 0xE10A
#define ID_FILE_SAVE_COPY_AS 0xE10B
#define ID_FILE_SEND_MAIL 0xE10C
#define ID_FILE_MRU_FIRST 0xE110
#define ID_FILE_MRU_FILE1 0xE110 // range - 16 max
#define ID_FILE_MRU_FILE2 0xE111
#define ID_FILE_MRU_FILE3 0xE112
#define ID_FILE_MRU_FILE4 0xE113
#define ID_FILE_MRU_FILE5 0xE114
#define ID_FILE_MRU_FILE6 0xE115
#define ID_FILE_MRU_FILE7 0xE116
#define ID_FILE_MRU_FILE8 0xE117
#define ID_FILE_MRU_FILE9 0xE118
#define ID_FILE_MRU_FILE10 0xE119
#define ID_FILE_MRU_FILE11 0xE11A
#define ID_FILE_MRU_FILE12 0xE11B
#define ID_FILE_MRU_FILE13 0xE11C
#define ID_FILE_MRU_FILE14 0xE11D
#define ID_FILE_MRU_FILE15 0xE11E
#define ID_FILE_MRU_FILE16 0xE11F
#define ID_FILE_MRU_LAST 0xE11F
// Edit commands
#define ID_EDIT_CLEAR 0xE120
#define ID_EDIT_CLEAR_ALL 0xE121
#define ID_EDIT_COPY 0xE122
#define ID_EDIT_CUT 0xE123
#define ID_EDIT_FIND 0xE124
#define ID_EDIT_PASTE 0xE125
#define ID_EDIT_PASTE_LINK 0xE126
#define ID_EDIT_PASTE_SPECIAL 0xE127
#define ID_EDIT_REPEAT 0xE128
#define ID_EDIT_REPLACE 0xE129
#define ID_EDIT_SELECT_ALL 0xE12A
#define ID_EDIT_UNDO 0xE12B
#define ID_EDIT_REDO 0xE12C
// Window commands
#define ID_WINDOW_NEW 0xE130
#define ID_WINDOW_ARRANGE 0xE131
#define ID_WINDOW_CASCADE 0xE132
#define ID_WINDOW_TILE_HORZ 0xE133
#define ID_WINDOW_TILE_VERT 0xE134
#define ID_WINDOW_SPLIT 0xE135
#ifndef RC_INVOKED // code only
#define AFX_IDM_WINDOW_FIRST 0xE130
#define AFX_IDM_WINDOW_LAST 0xE13F
#define AFX_IDM_FIRST_MDICHILD 0xFF00 // window list starts here
#endif //!RC_INVOKED
// Help and App commands
#define ID_APP_ABOUT 0xE140
#define ID_APP_EXIT 0xE141
#define ID_HELP_INDEX 0xE142
#define ID_HELP_FINDER 0xE143
#define ID_HELP_USING 0xE144
#define ID_CONTEXT_HELP 0xE145 // shift-F1
// special commands for processing help
#define ID_HELP 0xE146 // first attempt for F1
#define ID_DEFAULT_HELP 0xE147 // last attempt
// Misc
#define ID_NEXT_PANE 0xE150
#define ID_PREV_PANE 0xE151
// Format
#define ID_FORMAT_FONT 0xE160
// OLE commands
#define ID_OLE_INSERT_NEW 0xE200
#define ID_OLE_EDIT_LINKS 0xE201
#define ID_OLE_EDIT_CONVERT 0xE202
#define ID_OLE_EDIT_CHANGE_ICON 0xE203
#define ID_OLE_EDIT_PROPERTIES 0xE204
#define ID_OLE_VERB_FIRST 0xE210 // range - 16 max
#ifndef RC_INVOKED // code only
#define ID_OLE_VERB_LAST 0xE21F
#endif //!RC_INVOKED
// for print preview dialog bar
#define AFX_ID_PREVIEW_CLOSE 0xE300
#define AFX_ID_PREVIEW_NUMPAGE 0xE301 // One/Two Page button
#define AFX_ID_PREVIEW_NEXT 0xE302
#define AFX_ID_PREVIEW_PREV 0xE303
#define AFX_ID_PREVIEW_PRINT 0xE304
#define AFX_ID_PREVIEW_ZOOMIN 0xE305
#define AFX_ID_PREVIEW_ZOOMOUT 0xE306
// View commands (same number used as IDW used for control bar)
#define ID_VIEW_TOOLBAR 0xE800
#define ID_VIEW_STATUS_BAR 0xE801
#define ID_VIEW_REBAR 0xE804
#define ID_VIEW_AUTOARRANGE 0xE805
// E810 -> E81F must be kept in order for RANGE macros
#define ID_VIEW_SMALLICON 0xE810
#define ID_VIEW_LARGEICON 0xE811
#define ID_VIEW_LIST 0xE812
#define ID_VIEW_DETAILS 0xE813
#define ID_VIEW_LINEUP 0xE814
#define ID_VIEW_BYNAME 0xE815
#define AFX_ID_VIEW_MINIMUM ID_VIEW_SMALLICON
#define AFX_ID_VIEW_MAXIMUM ID_VIEW_BYNAME
// E800 -> E8FF reserved for other control bar commands
// RecordForm commands
#define ID_RECORD_FIRST 0xE900
#define ID_RECORD_LAST 0xE901
#define ID_RECORD_NEXT 0xE902
#define ID_RECORD_PREV 0xE903
/////////////////////////////////////////////////////////////////////////////
// Standard control IDs
#ifdef IDC_STATIC
#undef IDC_STATIC
#endif
#define IDC_STATIC (-1) // all static controls
/////////////////////////////////////////////////////////////////////////////
// Standard string error/warnings
#ifndef RC_INVOKED // code only
#define AFX_IDS_SCFIRST 0xEF00
#endif //!RC_INVOKED
#define AFX_IDS_SCSIZE 0xEF00
#define AFX_IDS_SCMOVE 0xEF01
#define AFX_IDS_SCMINIMIZE 0xEF02
#define AFX_IDS_SCMAXIMIZE 0xEF03
#define AFX_IDS_SCNEXTWINDOW 0xEF04
#define AFX_IDS_SCPREVWINDOW 0xEF05
#define AFX_IDS_SCCLOSE 0xEF06
#define AFX_IDS_SCRESTORE 0xEF12
#define AFX_IDS_SCTASKLIST 0xEF13
#define AFX_IDS_MDICHILD 0xEF1F
#define AFX_IDS_DESKACCESSORY 0xEFDA
// General strings
#define AFX_IDS_OPENFILE 0xF000
#define AFX_IDS_SAVEFILE 0xF001
#define AFX_IDS_ALLFILTER 0xF002
#define AFX_IDS_UNTITLED 0xF003
#define AFX_IDS_SAVEFILECOPY 0xF004
#define AFX_IDS_PREVIEW_CLOSE 0xF005
#define AFX_IDS_UNNAMED_FILE 0xF006
#define AFX_IDS_HIDE 0xF011
// MFC Standard Exception Error messages
#define AFX_IDP_NO_ERROR_AVAILABLE 0xF020
#define AFX_IDS_NOT_SUPPORTED_EXCEPTION 0xF021
#define AFX_IDS_RESOURCE_EXCEPTION 0xF022
#define AFX_IDS_MEMORY_EXCEPTION 0xF023
#define AFX_IDS_USER_EXCEPTION 0xF024
// Printing and print preview strings
#define AFX_IDS_PRINTONPORT 0xF040
#define AFX_IDS_ONEPAGE 0xF041
#define AFX_IDS_TWOPAGE 0xF042
#define AFX_IDS_PRINTPAGENUM 0xF043
#define AFX_IDS_PREVIEWPAGEDESC 0xF044
#define AFX_IDS_PRINTDEFAULTEXT 0xF045
#define AFX_IDS_PRINTDEFAULT 0xF046
#define AFX_IDS_PRINTFILTER 0xF047
#define AFX_IDS_PRINTCAPTION 0xF048
#define AFX_IDS_PRINTTOFILE 0xF049
// OLE strings
#define AFX_IDS_OBJECT_MENUITEM 0xF080
#define AFX_IDS_EDIT_VERB 0xF081
#define AFX_IDS_ACTIVATE_VERB 0xF082
#define AFX_IDS_CHANGE_LINK 0xF083
#define AFX_IDS_AUTO 0xF084
#define AFX_IDS_MANUAL 0xF085
#define AFX_IDS_FROZEN 0xF086
#define AFX_IDS_ALL_FILES 0xF087
// dynamically changing menu items
#define AFX_IDS_SAVE_MENU 0xF088
#define AFX_IDS_UPDATE_MENU 0xF089
#define AFX_IDS_SAVE_AS_MENU 0xF08A
#define AFX_IDS_SAVE_COPY_AS_MENU 0xF08B
#define AFX_IDS_EXIT_MENU 0xF08C
#define AFX_IDS_UPDATING_ITEMS 0xF08D
// COlePasteSpecialDialog defines
#define AFX_IDS_METAFILE_FORMAT 0xF08E
#define AFX_IDS_DIB_FORMAT 0xF08F
#define AFX_IDS_BITMAP_FORMAT 0xF090
#define AFX_IDS_LINKSOURCE_FORMAT 0xF091
#define AFX_IDS_EMBED_FORMAT 0xF092
// other OLE utility strings
#define AFX_IDS_PASTELINKEDTYPE 0xF094
#define AFX_IDS_UNKNOWNTYPE 0xF095
#define AFX_IDS_RTF_FORMAT 0xF096
#define AFX_IDS_TEXT_FORMAT 0xF097
// OLE datatype format error strings
#define AFX_IDS_INVALID_CURRENCY 0xF098
#define AFX_IDS_INVALID_DATETIME 0xF099
#define AFX_IDS_INVALID_DATETIMESPAN 0xF09A
// General error / prompt strings
#define AFX_IDP_INVALID_FILENAME 0xF100
#define AFX_IDP_FAILED_TO_OPEN_DOC 0xF101
#define AFX_IDP_FAILED_TO_SAVE_DOC 0xF102
#define AFX_IDP_ASK_TO_SAVE 0xF103
#define AFX_IDP_FAILED_TO_CREATE_DOC 0xF104
#define AFX_IDP_FILE_TOO_LARGE 0xF105
#define AFX_IDP_FAILED_TO_START_PRINT 0xF106
#define AFX_IDP_FAILED_TO_LAUNCH_HELP 0xF107
#define AFX_IDP_INTERNAL_FAILURE 0xF108 // general failure
#define AFX_IDP_COMMAND_FAILURE 0xF109 // command failure
#define AFX_IDP_FAILED_MEMORY_ALLOC 0xF10A
#define AFX_IDP_UNREG_DONE 0xF10B
#define AFX_IDP_UNREG_FAILURE 0xF10C
#define AFX_IDP_DLL_LOAD_FAILED 0xF10D
#define AFX_IDP_DLL_BAD_VERSION 0xF10E
// DDV parse errors
#define AFX_IDP_PARSE_INT 0xF110
#define AFX_IDP_PARSE_REAL 0xF111
#define AFX_IDP_PARSE_INT_RANGE 0xF112
#define AFX_IDP_PARSE_REAL_RANGE 0xF113
#define AFX_IDP_PARSE_STRING_SIZE 0xF114
#define AFX_IDP_PARSE_RADIO_BUTTON 0xF115
#define AFX_IDP_PARSE_BYTE 0xF116
#define AFX_IDP_PARSE_UINT 0xF117
#define AFX_IDP_PARSE_DATETIME 0xF118
#define AFX_IDP_PARSE_CURRENCY 0xF119
// CFile/CArchive error strings for user failure
#define AFX_IDP_FAILED_INVALID_FORMAT 0xF120
#define AFX_IDP_FAILED_INVALID_PATH 0xF121
#define AFX_IDP_FAILED_DISK_FULL 0xF122
#define AFX_IDP_FAILED_ACCESS_READ 0xF123
#define AFX_IDP_FAILED_ACCESS_WRITE 0xF124
#define AFX_IDP_FAILED_IO_ERROR_READ 0xF125
#define AFX_IDP_FAILED_IO_ERROR_WRITE 0xF126
// OLE errors / prompt strings
#define AFX_IDP_STATIC_OBJECT 0xF180
#define AFX_IDP_FAILED_TO_CONNECT 0xF181
#define AFX_IDP_SERVER_BUSY 0xF182
#define AFX_IDP_BAD_VERB 0xF183
#define AFX_IDS_NOT_DOCOBJECT 0xF184
#define AFX_IDP_FAILED_TO_NOTIFY 0xF185
#define AFX_IDP_FAILED_TO_LAUNCH 0xF186
#define AFX_IDP_ASK_TO_UPDATE 0xF187
#define AFX_IDP_FAILED_TO_UPDATE 0xF188
#define AFX_IDP_FAILED_TO_REGISTER 0xF189
#define AFX_IDP_FAILED_TO_AUTO_REGISTER 0xF18A
#define AFX_IDP_FAILED_TO_CONVERT 0xF18B
#define AFX_IDP_GET_NOT_SUPPORTED 0xF18C
#define AFX_IDP_SET_NOT_SUPPORTED 0xF18D
#define AFX_IDP_ASK_TO_DISCARD 0xF18E
#define AFX_IDP_FAILED_TO_CREATE 0xF18F
// MAPI errors / prompt strings
#define AFX_IDP_FAILED_MAPI_LOAD 0xF190
#define AFX_IDP_INVALID_MAPI_DLL 0xF191
#define AFX_IDP_FAILED_MAPI_SEND 0xF192
#define AFX_IDP_FILE_NONE 0xF1A0
#define AFX_IDP_FILE_GENERIC 0xF1A1
#define AFX_IDP_FILE_NOT_FOUND 0xF1A2
#define AFX_IDP_FILE_BAD_PATH 0xF1A3
#define AFX_IDP_FILE_TOO_MANY_OPEN 0xF1A4
#define AFX_IDP_FILE_ACCESS_DENIED 0xF1A5
#define AFX_IDP_FILE_INVALID_FILE 0xF1A6
#define AFX_IDP_FILE_REMOVE_CURRENT 0xF1A7
#define AFX_IDP_FILE_DIR_FULL 0xF1A8
#define AFX_IDP_FILE_BAD_SEEK 0xF1A9
#define AFX_IDP_FILE_HARD_IO 0xF1AA
#define AFX_IDP_FILE_SHARING 0xF1AB
#define AFX_IDP_FILE_LOCKING 0xF1AC
#define AFX_IDP_FILE_DISKFULL 0xF1AD
#define AFX_IDP_FILE_EOF 0xF1AE
#define AFX_IDP_ARCH_NONE 0xF1B0
#define AFX_IDP_ARCH_GENERIC 0xF1B1
#define AFX_IDP_ARCH_READONLY 0xF1B2
#define AFX_IDP_ARCH_ENDOFFILE 0xF1B3
#define AFX_IDP_ARCH_WRITEONLY 0xF1B4
#define AFX_IDP_ARCH_BADINDEX 0xF1B5
#define AFX_IDP_ARCH_BADCLASS 0xF1B6
#define AFX_IDP_ARCH_BADSCHEMA 0xF1B7
#define AFX_IDS_OCC_SCALEUNITS_PIXELS 0xF1C0
// 0xf200-0xf20f reserved
// font names and point sizes
#define AFX_IDS_STATUS_FONT 0xF230
#define AFX_IDS_TOOLTIP_FONT 0xF231
#define AFX_IDS_UNICODE_FONT 0xF232
#define AFX_IDS_MINI_FONT 0xF233
// ODBC Database errors / prompt strings
#ifndef RC_INVOKED // code only
#define AFX_IDP_SQL_FIRST 0xF280
#endif //!RC_INVOKED
#define AFX_IDP_SQL_CONNECT_FAIL 0xF281
#define AFX_IDP_SQL_RECORDSET_FORWARD_ONLY 0xF282
#define AFX_IDP_SQL_EMPTY_COLUMN_LIST 0xF283
#define AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH 0xF284
#define AFX_IDP_SQL_ILLEGAL_MODE 0xF285
#define AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED 0xF286
#define AFX_IDP_SQL_NO_CURRENT_RECORD 0xF287
#define AFX_IDP_SQL_NO_ROWS_AFFECTED 0xF288
#define AFX_IDP_SQL_RECORDSET_READONLY 0xF289
#define AFX_IDP_SQL_SQL_NO_TOTAL 0xF28A
#define AFX_IDP_SQL_ODBC_LOAD_FAILED 0xF28B
#define AFX_IDP_SQL_DYNASET_NOT_SUPPORTED 0xF28C
#define AFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED 0xF28D
#define AFX_IDP_SQL_API_CONFORMANCE 0xF28E
#define AFX_IDP_SQL_SQL_CONFORMANCE 0xF28F
#define AFX_IDP_SQL_NO_DATA_FOUND 0xF290
#define AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED 0xF291
#define AFX_IDP_SQL_ODBC_V2_REQUIRED 0xF292
#define AFX_IDP_SQL_NO_POSITIONED_UPDATES 0xF293
#define AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED 0xF294
#define AFX_IDP_SQL_DATA_TRUNCATED 0xF295
#define AFX_IDP_SQL_ROW_FETCH 0xF296
#define AFX_IDP_SQL_INCORRECT_ODBC 0xF297
#define AFX_IDP_SQL_UPDATE_DELETE_FAILED 0xF298
#define AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED 0xF299
#define AFX_IDP_SQL_FIELD_NOT_FOUND 0xF29A
#define AFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED 0xF29B
#define AFX_IDP_SQL_BOOKMARKS_NOT_ENABLED 0xF29C
// ODBC Database strings
#define AFX_IDS_DELETED 0xF29D
// DAO Database errors / prompt strings
#ifndef RC_INVOKED // code only
#define AFX_IDP_DAO_FIRST 0xF2B0
#endif //!RC_INVOKED
#define AFX_IDP_DAO_ENGINE_INITIALIZATION 0xF2B0
#define AFX_IDP_DAO_DFX_BIND 0xF2B1
#define AFX_IDP_DAO_OBJECT_NOT_OPEN 0xF2B2
// ICDAORecordset::GetRows Errors
// These are not placed in DAO Errors collection
// and must be handled directly by MFC.
#define AFX_IDP_DAO_ROWTOOSHORT 0xF2B3
#define AFX_IDP_DAO_BADBINDINFO 0xF2B4
#define AFX_IDP_DAO_COLUMNUNAVAILABLE 0xF2B5
/////////////////////////////////////////////////////////////////////////////
// Strings for ISAPI support
#define AFX_IDS_HTTP_TITLE 0xF2D1
#define AFX_IDS_HTTP_NO_TEXT 0xF2D2
#define AFX_IDS_HTTP_BAD_REQUEST 0xF2D3
#define AFX_IDS_HTTP_AUTH_REQUIRED 0xF2D4
#define AFX_IDS_HTTP_FORBIDDEN 0xF2D5
#define AFX_IDS_HTTP_NOT_FOUND 0xF2D6
#define AFX_IDS_HTTP_SERVER_ERROR 0xF2D7
#define AFX_IDS_HTTP_NOT_IMPLEMENTED 0xF2D8
/////////////////////////////////////////////////////////////////////////////
// AFX implementation - control IDs (AFX_IDC)
// Parts of dialogs
#define AFX_IDC_LISTBOX 100
#define AFX_IDC_CHANGE 101
// for print dialog
#define AFX_IDC_PRINT_DOCNAME 201
#define AFX_IDC_PRINT_PRINTERNAME 202
#define AFX_IDC_PRINT_PORTNAME 203
#define AFX_IDC_PRINT_PAGENUM 204
// Property Sheet control id's (determined with Spy++)
#define ID_APPLY_NOW 0x3021
#define ID_WIZBACK 0x3023
#define ID_WIZNEXT 0x3024
#define ID_WIZFINISH 0x3025
#define AFX_IDC_TAB_CONTROL 0x3020
/////////////////////////////////////////////////////////////////////////////
// IDRs for standard components
#ifndef RC_INVOKED // code only
// These are really COMMDLG dialogs, so there usually isn't a resource
// for them, but these IDs are used as help IDs.
#define AFX_IDD_FILEOPEN 28676
#define AFX_IDD_FILESAVE 28677
#define AFX_IDD_FONT 28678
#define AFX_IDD_COLOR 28679
#define AFX_IDD_PRINT 28680
#define AFX_IDD_PRINTSETUP 28681
#define AFX_IDD_FIND 28682
#define AFX_IDD_REPLACE 28683
#endif //!RC_INVOKED
// Standard dialogs app should leave alone (0x7801->)
#define AFX_IDD_NEWTYPEDLG 30721
#define AFX_IDD_PRINTDLG 30722
#define AFX_IDD_PREVIEW_TOOLBAR 30723
// Dialogs defined for OLE2UI library
#define AFX_IDD_INSERTOBJECT 30724
#define AFX_IDD_CHANGEICON 30725
#define AFX_IDD_CONVERT 30726
#define AFX_IDD_PASTESPECIAL 30727
#define AFX_IDD_EDITLINKS 30728
#define AFX_IDD_FILEBROWSE 30729
#define AFX_IDD_BUSY 30730
#define AFX_IDD_OBJECTPROPERTIES 30732
#define AFX_IDD_CHANGESOURCE 30733
// Standard cursors (0x7901->)
// AFX_IDC = Cursor resources
#define AFX_IDC_CONTEXTHELP 30977 // context sensitive help
#define AFX_IDC_MAGNIFY 30978 // print preview zoom
#define AFX_IDC_SMALLARROWS 30979 // splitter
#define AFX_IDC_HSPLITBAR 30980 // splitter
#define AFX_IDC_VSPLITBAR 30981 // splitter
#define AFX_IDC_NODROPCRSR 30982 // No Drop Cursor
#define AFX_IDC_TRACKNWSE 30983 // tracker
#define AFX_IDC_TRACKNESW 30984 // tracker
#define AFX_IDC_TRACKNS 30985 // tracker
#define AFX_IDC_TRACKWE 30986 // tracker
#define AFX_IDC_TRACK4WAY 30987 // tracker
#define AFX_IDC_MOVE4WAY 30988 // resize bar (server only)
// Mini frame window bitmap ID
#define AFX_IDB_MINIFRAME_MENU 30994
// CheckListBox checks bitmap ID
#define AFX_IDB_CHECKLISTBOX_NT 30995
#define AFX_IDB_CHECKLISTBOX_95 30996
// AFX standard accelerator resources
#define AFX_IDR_PREVIEW_ACCEL 30997
// AFX standard ICON IDs (for MFC V1 apps) (0x7A01->)
#define AFX_IDI_STD_MDIFRAME 31233
#define AFX_IDI_STD_FRAME 31234
/////////////////////////////////////////////////////////////////////////////
// AFX OLE control implementation - control IDs (AFX_IDC)
// Font property page
#define AFX_IDC_FONTPROP 1000
#define AFX_IDC_FONTNAMES 1001
#define AFX_IDC_FONTSTYLES 1002
#define AFX_IDC_FONTSIZES 1003
#define AFX_IDC_STRIKEOUT 1004
#define AFX_IDC_UNDERLINE 1005
#define AFX_IDC_SAMPLEBOX 1006
// Color property page
#define AFX_IDC_COLOR_BLACK 1100
#define AFX_IDC_COLOR_WHITE 1101
#define AFX_IDC_COLOR_RED 1102
#define AFX_IDC_COLOR_GREEN 1103
#define AFX_IDC_COLOR_BLUE 1104
#define AFX_IDC_COLOR_YELLOW 1105
#define AFX_IDC_COLOR_MAGENTA 1106
#define AFX_IDC_COLOR_CYAN 1107
#define AFX_IDC_COLOR_GRAY 1108
#define AFX_IDC_COLOR_LIGHTGRAY 1109
#define AFX_IDC_COLOR_DARKRED 1110
#define AFX_IDC_COLOR_DARKGREEN 1111
#define AFX_IDC_COLOR_DARKBLUE 1112
#define AFX_IDC_COLOR_LIGHTBROWN 1113
#define AFX_IDC_COLOR_DARKMAGENTA 1114
#define AFX_IDC_COLOR_DARKCYAN 1115
#define AFX_IDC_COLORPROP 1116
#define AFX_IDC_SYSTEMCOLORS 1117
// Picture porperty page
#define AFX_IDC_PROPNAME 1201
#define AFX_IDC_PICTURE 1202
#define AFX_IDC_BROWSE 1203
#define AFX_IDC_CLEAR 1204
/////////////////////////////////////////////////////////////////////////////
// IDRs for OLE control standard components
// Standard propery page dialogs app should leave alone (0x7E01->)
#define AFX_IDD_PROPPAGE_COLOR 32257
#define AFX_IDD_PROPPAGE_FONT 32258
#define AFX_IDD_PROPPAGE_PICTURE 32259
#define AFX_IDB_TRUETYPE 32384
/////////////////////////////////////////////////////////////////////////////
// Standard OLE control strings
// OLE Control page strings
#define AFX_IDS_PROPPAGE_UNKNOWN 0xFE01
#define AFX_IDS_COLOR_DESKTOP 0xFE04
#define AFX_IDS_COLOR_APPWORKSPACE 0xFE05
#define AFX_IDS_COLOR_WNDBACKGND 0xFE06
#define AFX_IDS_COLOR_WNDTEXT 0xFE07
#define AFX_IDS_COLOR_MENUBAR 0xFE08
#define AFX_IDS_COLOR_MENUTEXT 0xFE09
#define AFX_IDS_COLOR_ACTIVEBAR 0xFE0A
#define AFX_IDS_COLOR_INACTIVEBAR 0xFE0B
#define AFX_IDS_COLOR_ACTIVETEXT 0xFE0C
#define AFX_IDS_COLOR_INACTIVETEXT 0xFE0D
#define AFX_IDS_COLOR_ACTIVEBORDER 0xFE0E
#define AFX_IDS_COLOR_INACTIVEBORDER 0xFE0F
#define AFX_IDS_COLOR_WNDFRAME 0xFE10
#define AFX_IDS_COLOR_SCROLLBARS 0xFE11
#define AFX_IDS_COLOR_BTNFACE 0xFE12
#define AFX_IDS_COLOR_BTNSHADOW 0xFE13
#define AFX_IDS_COLOR_BTNTEXT 0xFE14
#define AFX_IDS_COLOR_BTNHIGHLIGHT 0xFE15
#define AFX_IDS_COLOR_DISABLEDTEXT 0xFE16
#define AFX_IDS_COLOR_HIGHLIGHT 0xFE17
#define AFX_IDS_COLOR_HIGHLIGHTTEXT 0xFE18
#define AFX_IDS_REGULAR 0xFE19
#define AFX_IDS_BOLD 0xFE1A
#define AFX_IDS_ITALIC 0xFE1B
#define AFX_IDS_BOLDITALIC 0xFE1C
#define AFX_IDS_SAMPLETEXT 0xFE1D
#define AFX_IDS_DISPLAYSTRING_FONT 0xFE1E
#define AFX_IDS_DISPLAYSTRING_COLOR 0xFE1F
#define AFX_IDS_DISPLAYSTRING_PICTURE 0xFE20
#define AFX_IDS_PICTUREFILTER 0xFE21
#define AFX_IDS_PICTYPE_UNKNOWN 0xFE22
#define AFX_IDS_PICTYPE_NONE 0xFE23
#define AFX_IDS_PICTYPE_BITMAP 0xFE24
#define AFX_IDS_PICTYPE_METAFILE 0xFE25
#define AFX_IDS_PICTYPE_ICON 0xFE26
#define AFX_IDS_COLOR_PPG 0xFE28
#define AFX_IDS_COLOR_PPG_CAPTION 0xFE29
#define AFX_IDS_FONT_PPG 0xFE2A
#define AFX_IDS_FONT_PPG_CAPTION 0xFE2B
#define AFX_IDS_PICTURE_PPG 0xFE2C
#define AFX_IDS_PICTURE_PPG_CAPTION 0xFE2D
#define AFX_IDS_PICTUREBROWSETITLE 0xFE30
#define AFX_IDS_BORDERSTYLE_0 0xFE31
#define AFX_IDS_BORDERSTYLE_1 0xFE32
// OLE Control verb names
#define AFX_IDS_VERB_EDIT 0xFE40
#define AFX_IDS_VERB_PROPERTIES 0xFE41
// OLE Control internal error messages
#define AFX_IDP_PICTURECANTOPEN 0xFE83
#define AFX_IDP_PICTURECANTLOAD 0xFE84
#define AFX_IDP_PICTURETOOLARGE 0xFE85
#define AFX_IDP_PICTUREREADFAILED 0xFE86
// Standard OLE Control error strings
#define AFX_IDP_E_ILLEGALFUNCTIONCALL 0xFEA0
#define AFX_IDP_E_OVERFLOW 0xFEA1
#define AFX_IDP_E_OUTOFMEMORY 0xFEA2
#define AFX_IDP_E_DIVISIONBYZERO 0xFEA3
#define AFX_IDP_E_OUTOFSTRINGSPACE 0xFEA4
#define AFX_IDP_E_OUTOFSTACKSPACE 0xFEA5
#define AFX_IDP_E_BADFILENAMEORNUMBER 0xFEA6
#define AFX_IDP_E_FILENOTFOUND 0xFEA7
#define AFX_IDP_E_BADFILEMODE 0xFEA8
#define AFX_IDP_E_FILEALREADYOPEN 0xFEA9
#define AFX_IDP_E_DEVICEIOERROR 0xFEAA
#define AFX_IDP_E_FILEALREADYEXISTS 0xFEAB
#define AFX_IDP_E_BADRECORDLENGTH 0xFEAC
#define AFX_IDP_E_DISKFULL 0xFEAD
#define AFX_IDP_E_BADRECORDNUMBER 0xFEAE
#define AFX_IDP_E_BADFILENAME 0xFEAF
#define AFX_IDP_E_TOOMANYFILES 0xFEB0
#define AFX_IDP_E_DEVICEUNAVAILABLE 0xFEB1
#define AFX_IDP_E_PERMISSIONDENIED 0xFEB2
#define AFX_IDP_E_DISKNOTREADY 0xFEB3
#define AFX_IDP_E_PATHFILEACCESSERROR 0xFEB4
#define AFX_IDP_E_PATHNOTFOUND 0xFEB5
#define AFX_IDP_E_INVALIDPATTERNSTRING 0xFEB6
#define AFX_IDP_E_INVALIDUSEOFNULL 0xFEB7
#define AFX_IDP_E_INVALIDFILEFORMAT 0xFEB8
#define AFX_IDP_E_INVALIDPROPERTYVALUE 0xFEB9
#define AFX_IDP_E_INVALIDPROPERTYARRAYINDEX 0xFEBA
#define AFX_IDP_E_SETNOTSUPPORTEDATRUNTIME 0xFEBB
#define AFX_IDP_E_SETNOTSUPPORTED 0xFEBC
#define AFX_IDP_E_NEEDPROPERTYARRAYINDEX 0xFEBD
#define AFX_IDP_E_SETNOTPERMITTED 0xFEBE
#define AFX_IDP_E_GETNOTSUPPORTEDATRUNTIME 0xFEBF
#define AFX_IDP_E_GETNOTSUPPORTED 0xFEC0
#define AFX_IDP_E_PROPERTYNOTFOUND 0xFEC1
#define AFX_IDP_E_INVALIDCLIPBOARDFORMAT 0xFEC2
#define AFX_IDP_E_INVALIDPICTURE 0xFEC3
#define AFX_IDP_E_PRINTERERROR 0xFEC4
#define AFX_IDP_E_CANTSAVEFILETOTEMP 0xFEC5
#define AFX_IDP_E_SEARCHTEXTNOTFOUND 0xFEC6
#define AFX_IDP_E_REPLACEMENTSTOOLONG 0xFEC7
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#endif //__AFXRES_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,202 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXRES_RC__
#define __AFXRES_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< Cannot change standard MFC resources! >\0"
END
#endif //APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// Default resource description for MFC applications
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Strings
STRINGTABLE DISCARDABLE
BEGIN
#ifndef _AFX_NO_APPMENU_RESOURCES
AFX_IDS_OPENFILE, "Open"
AFX_IDS_SAVEFILE, "Save As"
AFX_IDS_ALLFILTER, "All Files (*.*)"
AFX_IDS_UNTITLED, "Untitled"
AFX_IDS_HIDE, "&Hide"
#endif // !_AFX_NO_APPMENUSTRING_RESOURCES
AFX_IDS_MEMORY_EXCEPTION, "Out of memory."
AFX_IDS_NOT_SUPPORTED_EXCEPTION,"An unsupported operation was attempted."
AFX_IDS_RESOURCE_EXCEPTION, "A required resource was unavailable."
AFX_IDS_USER_EXCEPTION, "An unknown error has occurred."
// General error prompts
#ifndef _AFX_NO_FILECMD_RESOURCES
AFX_IDP_INVALID_FILENAME, "Invalid filename."
AFX_IDP_FAILED_TO_OPEN_DOC, "Failed to open document."
AFX_IDP_FAILED_TO_SAVE_DOC, "Failed to save document."
AFX_IDP_ASK_TO_SAVE, "Save changes to %1?"
AFX_IDP_FAILED_TO_CREATE_DOC, "Failed to create empty document."
AFX_IDP_FILE_TOO_LARGE, "The file is too large to open."
AFX_IDP_FAILED_TO_START_PRINT, "Could not start print job."
#endif // !_AFX_NO_FILECMD_RESOURCES
AFX_IDP_FAILED_TO_LAUNCH_HELP, "Failed to launch help."
AFX_IDP_INTERNAL_FAILURE, "Internal application error."
AFX_IDP_COMMAND_FAILURE, "Command failed."
AFX_IDP_FAILED_MEMORY_ALLOC "Insufficient memory to perform operation."
AFX_IDP_GET_NOT_SUPPORTED, "Unable to read write-only property."
AFX_IDP_SET_NOT_SUPPORTED, "Unable to write read-only property."
AFX_IDP_UNREG_DONE, "System registry entries have been removed and the INI file (if any) was deleted."
AFX_IDP_UNREG_FAILURE, "Not all of the system registry entries (or INI file) were removed."
AFX_IDP_DLL_LOAD_FAILED, "This program requires the file %s, which was not found on this system."
AFX_IDP_DLL_BAD_VERSION, "This program is linked to the missing export %s in the file %s. This machine may have an incompatible version of %s."
// CFile/CArchive error strings for user failure
#ifndef _AFX_NO_CFILE_RESOURCES
AFX_IDP_FAILED_INVALID_FORMAT "Unexpected file format."
AFX_IDP_FAILED_INVALID_PATH "%1\nCannot find this file.\nPlease verify that the correct path and file name are given."
AFX_IDP_FAILED_DISK_FULL "Destination disk drive is full."
AFX_IDP_FAILED_ACCESS_READ "Unable to read from %1, it is opened by someone else."
AFX_IDP_FAILED_ACCESS_WRITE "Unable to write to %1, it is read-only or opened by someone else."
AFX_IDP_FAILED_IO_ERROR_READ "An unexpected error occurred while reading %1."
AFX_IDP_FAILED_IO_ERROR_WRITE "An unexpected error occurred while writing %1."
#endif // !_AFX_NO_CFILE_RESOURCES
// Parsing error prompts
AFX_IDP_PARSE_INT, "Please enter an integer."
AFX_IDP_PARSE_REAL, "Please enter a number."
AFX_IDP_PARSE_INT_RANGE, "Please enter an integer between %1 and %2."
AFX_IDP_PARSE_REAL_RANGE, "Please enter a number between %1 and %2."
AFX_IDP_PARSE_STRING_SIZE, "Please enter no more than %1 characters."
AFX_IDP_PARSE_RADIO_BUTTON, "Please select a button."
AFX_IDP_PARSE_BYTE, "Please enter an integer between 0 and 255."
AFX_IDP_PARSE_UINT, "Please enter a positive integer."
AFX_IDP_PARSE_DATETIME, "Please enter a date and/or time."
AFX_IDP_PARSE_CURRENCY, "Please enter a currency."
#ifndef _AFX_NO_OLE_RESOURCES
// OLE strings required for both servers and containers
AFX_IDS_PASTELINKEDTYPE "Linked %s"
AFX_IDS_UNKNOWNTYPE "Unknown Type"
AFX_IDP_FAILED_TO_NOTIFY "%1\nUnable to register document.\nThe document may already be open."
AFX_IDS_NOT_DOCOBJECT "The file is not supported by a Document Object server."
#endif //!_AFX_NO_OLE_RESOURCES
AFX_IDP_NO_ERROR_AVAILABLE "No error message is available."
#ifndef _AFX_NO_CFILE_RESOURCES
AFX_IDP_FILE_NONE "No error occurred."
AFX_IDP_FILE_GENERIC "An unknown error occurred while accessing %1."
AFX_IDP_FILE_NOT_FOUND "%1 was not found."
AFX_IDP_FILE_BAD_PATH "%1 contains an invalid path."
AFX_IDP_FILE_TOO_MANY_OPEN "%1 could not be opened because there are too many open files."
AFX_IDP_FILE_ACCESS_DENIED "Access to %1 was denied."
AFX_IDP_FILE_INVALID_FILE "An invalid file handle was associated with %1."
AFX_IDP_FILE_REMOVE_CURRENT "%1 could not be removed because it is the current directory."
AFX_IDP_FILE_DIR_FULL "%1 could not be created because the directory is full."
AFX_IDP_FILE_BAD_SEEK "Seek failed on %1"
AFX_IDP_FILE_HARD_IO "A hardware I/O error was reported while accessing %1."
AFX_IDP_FILE_SHARING "A sharing violation occurred while accessing %1."
AFX_IDP_FILE_LOCKING "A locking violation occurred while accessing %1."
AFX_IDP_FILE_DISKFULL "Disk full while accessing %1."
AFX_IDP_FILE_EOF "An attempt was made to access %1 past its end."
AFX_IDS_UNNAMED_FILE "an unnamed file"
#endif // !_AFX_NO_CFILE_RESOURCES
AFX_IDP_ARCH_NONE "No error occurred."
AFX_IDP_ARCH_GENERIC "An unknown error occurred while accessing %1."
AFX_IDP_ARCH_READONLY "An attempt was made to write to the reading %1."
AFX_IDP_ARCH_ENDOFFILE "An attempt was made to access %1 past its end."
AFX_IDP_ARCH_WRITEONLY "An attempt was made to read from the writing %1."
AFX_IDP_ARCH_BADINDEX "%1 has a bad format."
AFX_IDP_ARCH_BADCLASS "%1 contained an unexpected object."
AFX_IDP_ARCH_BADSCHEMA "%1 contains an incorrect schema."
#ifndef _AFX_NO_MAPI_RESOURCES
// MAPI strings / error messages
AFX_IDP_FAILED_MAPI_LOAD "Unable to load mail system support."
AFX_IDP_INVALID_MAPI_DLL "Mail system DLL is invalid."
AFX_IDP_FAILED_MAPI_SEND "Send Mail failed to send message."
#endif //!_AFX_NO_MAPI_RESOURCES
#ifndef _AFX_NO_OCC_RESOURCES
AFX_IDS_OCC_SCALEUNITS_PIXELS "pixels"
#endif //!_AFX_NO_OCC_RESOURCES
END
/////////////////////////////////////////////////////////////////////////////
// Cursors
AFX_IDC_CONTEXTHELP CURSOR DISCARDABLE "res\\help.cur"
#ifndef _AFX_NO_SPLITTER_RESOURCES
AFX_IDC_SMALLARROWS CURSOR DISCARDABLE "res\\sarrows.cur"
AFX_IDC_HSPLITBAR CURSOR DISCARDABLE "res\\splith.cur"
AFX_IDC_VSPLITBAR CURSOR DISCARDABLE "res\\splitv.cur"
AFX_IDC_NODROPCRSR CURSOR DISCARDABLE "res\\nodrop.cur"
#endif //!_AFX_NO_SPLITTER_RESOURCES
#ifndef _AFX_NO_TRACKER_RESOURCES
AFX_IDC_TRACKNWSE CURSOR DISCARDABLE "res\\trcknwse.cur"
AFX_IDC_TRACKNESW CURSOR DISCARDABLE "res\\trcknesw.cur"
AFX_IDC_TRACKNS CURSOR DISCARDABLE "res\\trckns.cur"
AFX_IDC_TRACKWE CURSOR DISCARDABLE "res\\trckwe.cur"
AFX_IDC_TRACK4WAY CURSOR DISCARDABLE "res\\trck4way.cur"
AFX_IDC_MOVE4WAY CURSOR DISCARDABLE "res\\move4way.cur"
#endif //!_AFX_NO_TRACKER_RESOURCES
#ifndef _AFX_NO_CTL3D_RESOURCES
26567 BITMAP "res\\3dcheck.bmp" // Note: 26567 comes from CTL3D.H
#endif
/////////////////////////////////////////////////////////////////////////////
// Standard Dialogs
#ifndef _AFX_NO_NEWTYPEDLG_RESOURCES
AFX_IDD_NEWTYPEDLG DIALOG DISCARDABLE 9, 26, 183, 70
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | 0x04
CAPTION "New"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&New ",IDC_STATIC,6,5,123,8,NOT WS_GROUP
LISTBOX AFX_IDC_LISTBOX,6,15,125,49,WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,137,6,40,14
PUSHBUTTON "Cancel",IDCANCEL,137,23,40,14
PUSHBUTTON "&Help",ID_HELP,137,43,40,14
END
#endif // !_AFX_NO_NEWTYPEDLG_RESOURCES
/////////////////////////////////////////////////////////////////////////////
// CMiniFrameWnd Bitmap
AFX_IDB_MINIFRAME_MENU BITMAP DISCARDABLE "res\\minifwnd.bmp"
/////////////////////////////////////////////////////////////////////////////
// CCheckListBox Bitmaps
AFX_IDB_CHECKLISTBOX_NT BITMAP DISCARDABLE "res\\ntcheck.bmp"
AFX_IDB_CHECKLISTBOX_95 BITMAP DISCARDABLE "res\\95check.bmp"
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //!__AFXRES_RC__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,403 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXRICH_H__
#define __AFXRICH_H__
#ifdef _AFX_NO_RICHEDIT_SUPPORT
#error Windows RichEdit classes not supported in this library variant.
#endif
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifndef __AFXDLGS_H__
#include <afxdlgs.h>
#endif
#ifndef __AFXOLE_H__
#include <afxole.h>
#endif
#ifndef _RICHEDIT_
#include <richedit.h>
#endif
#ifndef _RICHOLE_
#include <richole.h>
#define _RICHOLE_
#endif
#ifndef __AFXCMN_H__
#include <afxcmn.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXRICH - MFC RichEdit classes
// Classes declared in this file
//CObject
//CCmdTarget;
//CWnd
//CView
//CCtrlView
class CRichEditView;// rich text editor view
//CDocument
//COleDocument
class CRichEditDoc;
//CDocItem
//COleClientItem
class CRichEditCntrItem;
#undef AFX_DATA
#define AFX_DATA AFX_OLE_DATA
/////////////////////////////////////////////////////////////////////////////
// CRichEditView
class _AFX_RICHEDIT_STATE; // private to implementation
class CRichEditView : public CCtrlView
{
DECLARE_DYNCREATE(CRichEditView)
// Construction
public:
CRichEditView();
// Attributes
public:
enum WordWrapType
{
WrapNone = 0,
WrapToWindow = 1,
WrapToTargetDevice = 2
};
int m_nWordWrap;
int m_nBulletIndent;
void SetPaperSize(CSize sizePaper);
CSize GetPaperSize() const;
void SetMargins(const CRect& rectMargin);
CRect GetMargins() const;
int GetPrintWidth() const;
CRect GetPrintRect() const;
CRect GetPageRect() const;
//formatting
CHARFORMAT& GetCharFormatSelection();
PARAFORMAT& GetParaFormatSelection();
void SetCharFormat(CHARFORMAT cf);
BOOL SetParaFormat(PARAFORMAT& pf);
CRichEditCntrItem* GetSelectedItem() const;
CRichEditCntrItem* GetInPlaceActiveItem() const;
// CEdit control access
CRichEditCtrl& GetRichEditCtrl() const;
CRichEditDoc* GetDocument() const;
// other attributes
long GetTextLength() const;
static BOOL AFX_CDECL IsRichEditFormat(CLIPFORMAT cf);
BOOL CanPaste() const;
// Operations
public:
void AdjustDialogPosition(CDialog* pDlg);
HRESULT InsertItem(CRichEditCntrItem* pItem);
void InsertFileAsObject(LPCTSTR lpszFileName);
BOOL FindText(LPCTSTR lpszFind, BOOL bCase = TRUE, BOOL bWord = TRUE);
BOOL FindTextSimple(LPCTSTR lpszFind, BOOL bCase = TRUE,
BOOL bWord = TRUE);
long PrintInsideRect(CDC* pDC, RECT& rectLayout, long nIndexStart,
long nIndexStop, BOOL bOutput);
long PrintPage(CDC* pDC, long nIndexStart, long nIndexStop);
void DoPaste(COleDataObject& dataobj, CLIPFORMAT cf,
HMETAFILEPICT hMetaPict);
// Helpers
void OnCharEffect(DWORD dwMask, DWORD dwEffect);
void OnUpdateCharEffect(CCmdUI* pCmdUI, DWORD dwMask, DWORD dwEffect) ;
void OnParaAlign(WORD wAlign);
void OnUpdateParaAlign(CCmdUI* pCmdUI, WORD wAlign);
// Overrideables
protected:
virtual BOOL IsSelected(const CObject* pDocItem) const;
virtual void OnInitialUpdate();
virtual void OnFindNext(LPCTSTR lpszFind, BOOL bNext, BOOL bCase, BOOL bWord);
virtual void OnReplaceSel(LPCTSTR lpszFind, BOOL bNext, BOOL bCase,
BOOL bWord, LPCTSTR lpszReplace);
virtual void OnReplaceAll(LPCTSTR lpszFind, LPCTSTR lpszReplace,
BOOL bCase, BOOL bWord);
virtual void OnTextNotFound(LPCTSTR lpszFind);
virtual void OnPrinterChanged(const CDC& dcPrinter);
virtual void WrapChanged();
// Advanced
virtual BOOL OnPasteNativeObject(LPSTORAGE lpStg);
virtual HMENU GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* );
virtual HRESULT GetClipboardData(CHARRANGE* lpchrg, DWORD dwReco,
LPDATAOBJECT lpRichDataObj, LPDATAOBJECT* lplpdataobj);
virtual HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD,
BOOL, HGLOBAL);
// Implementation
public:
LPRICHEDITOLE m_lpRichEditOle;
CDC m_dcTarget;
long m_lInitialSearchPos;
UINT m_nPasteType;
BOOL m_bFirstSearch;
void TextNotFound(LPCTSTR lpszFind);
BOOL FindText(_AFX_RICHEDIT_STATE* pEditState);
BOOL FindTextSimple(_AFX_RICHEDIT_STATE* pEditState);
long FindAndSelect(DWORD dwFlags, FINDTEXTEX& ft);
void Stream(CArchive& ar, BOOL bSelection);
HRESULT GetWindowContext(LPOLEINPLACEFRAME* lplpFrame,
LPOLEINPLACEUIWINDOW* lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
HRESULT ShowContainerUI(BOOL b);
static DWORD CALLBACK EditStreamCallBack(DWORD dwCookie,
LPBYTE pbBuff, LONG cb, LONG *pcb);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
virtual void Serialize(CArchive& ar);
virtual void DeleteContents();
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
static AFX_DATA ULONG lMaxSize; // maximum number of characters supported
protected:
CRect m_rectMargin;
CSize m_sizePaper;
CDWordArray m_aPageStart; // array of starting pages
PARAFORMAT m_paraformat;
CHARFORMAT m_charformat;
BOOL m_bSyncCharFormat;
BOOL m_bSyncParaFormat;
// construction
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
// printing support
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo = NULL);
BOOL PaginateTo(CDC* pDC, CPrintInfo* pInfo);
// find & replace support
void OnEditFindReplace(BOOL bFindOnly);
BOOL SameAsSelected(LPCTSTR lpszCompare, BOOL bCase, BOOL bWord);
// special overrides for implementation
//{{AFX_MSG(CRichEditView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnUpdateNeedSel(CCmdUI* pCmdUI);
afx_msg void OnUpdateNeedClip(CCmdUI* pCmdUI);
afx_msg void OnUpdateNeedText(CCmdUI* pCmdUI);
afx_msg void OnUpdateNeedFind(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
afx_msg void OnEditCut();
afx_msg void OnEditCopy();
afx_msg void OnEditPaste();
afx_msg void OnEditClear();
afx_msg void OnEditUndo();
afx_msg void OnEditSelectAll();
afx_msg void OnEditFind();
afx_msg void OnEditReplace();
afx_msg void OnEditRepeat();
afx_msg void OnDestroy();
afx_msg void OnEditProperties();
afx_msg void OnUpdateEditProperties(CCmdUI* pCmdUI);
afx_msg void OnInsertObject();
afx_msg void OnCancelEditCntr();
afx_msg void OnCharBold();
afx_msg void OnUpdateCharBold(CCmdUI* pCmdUI);
afx_msg void OnCharItalic();
afx_msg void OnUpdateCharItalic(CCmdUI* pCmdUI);
afx_msg void OnCharUnderline();
afx_msg void OnUpdateCharUnderline(CCmdUI* pCmdUI);
afx_msg void OnParaCenter();
afx_msg void OnUpdateParaCenter(CCmdUI* pCmdUI);
afx_msg void OnParaLeft();
afx_msg void OnUpdateParaLeft(CCmdUI* pCmdUI);
afx_msg void OnParaRight();
afx_msg void OnUpdateParaRight(CCmdUI* pCmdUI);
afx_msg void OnBullet();
afx_msg void OnUpdateBullet(CCmdUI* pCmdUI);
afx_msg void OnFormatFont();
afx_msg void OnColorPick(COLORREF cr);
afx_msg void OnColorDefault();
afx_msg void OnEditPasteSpecial();
afx_msg void OnUpdateEditPasteSpecial(CCmdUI* pCmdUI);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnDropFiles(HDROP hDropInfo);
afx_msg void OnDevModeChange(LPTSTR lpDeviceName);
//}}AFX_MSG
afx_msg LRESULT OnFindReplaceCmd(WPARAM, LPARAM lParam);
afx_msg void OnSelChange(NMHDR* pNMHDR, LRESULT* pResult);
DECLARE_MESSAGE_MAP()
// Interface Map
public:
BEGIN_INTERFACE_PART(RichEditOleCallback, IRichEditOleCallback)
INIT_INTERFACE_PART(CRichEditView, RichEditOleCallback)
STDMETHOD(GetNewStorage) (LPSTORAGE*);
STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME*,
LPOLEINPLACEUIWINDOW*,
LPOLEINPLACEFRAMEINFO);
STDMETHOD(ShowContainerUI) (BOOL);
STDMETHOD(QueryInsertObject) (LPCLSID, LPSTORAGE, LONG);
STDMETHOD(DeleteObject) (LPOLEOBJECT);
STDMETHOD(QueryAcceptData) (LPDATAOBJECT, CLIPFORMAT*, DWORD,BOOL, HGLOBAL);
STDMETHOD(ContextSensitiveHelp) (BOOL);
STDMETHOD(GetClipboardData) (CHARRANGE*, DWORD, LPDATAOBJECT*);
STDMETHOD(GetDragDropEffect) (BOOL, DWORD, LPDWORD);
STDMETHOD(GetContextMenu) (WORD, LPOLEOBJECT, CHARRANGE*, HMENU*);
END_INTERFACE_PART(RichEditOleCallback)
DECLARE_INTERFACE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CRichEditDoc
#ifdef _AFXDLL
class CRichEditDoc : public COleServerDoc
#else
class AFX_NOVTABLE CRichEditDoc : public COleServerDoc
#endif
{
protected: // create from serialization only
CRichEditDoc();
DECLARE_DYNAMIC(CRichEditDoc)
// Attributes
public:
BOOL m_bRTF; // TRUE when formatted, FALSE when plain text
virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo = NULL) const = 0;
virtual CRichEditView* GetView() const;
int GetStreamFormat() const;
// Implementation
protected:
virtual COleServerItem* OnGetEmbeddedItem();
void MarkItemsClear() const;
void DeleteUnmarkedItems() const;
void UpdateObjectCache();
public:
BOOL m_bUpdateObjectCache;
virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU);
virtual void SetTitle(LPCTSTR lpszTitle);
virtual COleClientItem* GetPrimarySelectedItem(CView* pView);
virtual void DeleteContents();
virtual POSITION GetStartPosition() const;
virtual void PreCloseFrame(CFrameWnd* pFrameWnd);
virtual void UpdateModifiedFlag();
virtual BOOL IsModified();
virtual void SetModifiedFlag(BOOL bModified = TRUE);
virtual COleClientItem* GetInPlaceActiveItem(CWnd* pWnd);
CRichEditCntrItem* LookupItem(LPOLEOBJECT lpobj) const;
void InvalidateObjectCache();
virtual void Serialize(CArchive& ar); // overridden for document i/o
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// CRichEditCntrItem
class CRichEditCntrItem : public COleClientItem
{
DECLARE_SERIAL(CRichEditCntrItem)
// Constructors
public:
CRichEditCntrItem(REOBJECT* preo = NULL, CRichEditDoc* pContainer = NULL);
// Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIAL.
// IMPLEMENT_SERIAL requires the class have a constructor with
// zero arguments. Normally, OLE items are constructed with a
// non-NULL document pointer.
// Operations
void SyncToRichEditObject(REOBJECT& reo);
// Implementation
public:
~CRichEditCntrItem();
LPOLECLIENTSITE m_lpClientSite;
BOOL m_bMark;
BOOL m_bLock; // lock it during creation to avoid deletion
void Mark(BOOL b);
BOOL IsMarked();
CRichEditDoc* GetDocument();
CRichEditView* GetActiveView();
HRESULT ShowContainerUI(BOOL b);
HRESULT GetWindowContext(LPOLEINPLACEFRAME* lplpFrame,
LPOLEINPLACEUIWINDOW* lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
virtual LPOLECLIENTSITE GetClientSite();
virtual BOOL ConvertTo(REFCLSID clsidNew);
virtual BOOL ActivateAs(LPCTSTR lpszUserType, REFCLSID clsidOld,
REFCLSID clsidNew);
virtual void SetDrawAspect(DVASPECT nDrawAspect);
virtual void OnDeactivateUI(BOOL bUndoable);
virtual BOOL CanActivate();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
virtual BOOL OnChangeItemPosition(const CRect& rectPos);
};
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXRICH_INLINE AFX_INLINE
#include <afxrich.inl>
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif //__AFXRICH_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,56 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXRICH.H
#ifdef _AFXRICH_INLINE
// CRichEditView
_AFXRICH_INLINE CRichEditCtrl& CRichEditView::GetRichEditCtrl() const
{ return *(CRichEditCtrl*)this; }
int _AFXRICH_INLINE CRichEditView::GetPrintWidth() const
{ return m_sizePaper.cx - m_rectMargin.left - m_rectMargin.right;}
CRect _AFXRICH_INLINE CRichEditView::GetPrintRect() const
{ return CRect(m_rectMargin.left, m_rectMargin.top, m_sizePaper.cx - m_rectMargin.right, m_sizePaper.cy - m_rectMargin.bottom); }
CRect _AFXRICH_INLINE CRichEditView::GetPageRect() const
{ return CRect(CPoint(0,0), m_sizePaper); }
void _AFXRICH_INLINE CRichEditView::SetPaperSize(CSize sizePaper)
{ m_sizePaper = sizePaper; }
CSize _AFXRICH_INLINE CRichEditView::GetPaperSize() const
{ return m_sizePaper; }
void _AFXRICH_INLINE CRichEditView::SetMargins(const CRect& rectMargin)
{ m_rectMargin = rectMargin; }
CRect _AFXRICH_INLINE CRichEditView::GetMargins() const
{ return m_rectMargin; }
_AFXRICH_INLINE long CRichEditView::GetTextLength() const
{ return GetRichEditCtrl().GetTextLength(); }
_AFXRICH_INLINE CRichEditDoc* CRichEditView::GetDocument() const
{
ASSERT(m_pDocument != NULL);
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRichEditDoc)));
return (CRichEditDoc*)m_pDocument;
}
_AFXRICH_INLINE int CRichEditDoc::GetStreamFormat() const
{ return m_bRTF ? SF_RTF : SF_TEXT; }
_AFXRICH_INLINE void CRichEditDoc::InvalidateObjectCache()
{ m_bUpdateObjectCache = TRUE; }
_AFXRICH_INLINE void CRichEditCntrItem::Mark(BOOL b)
{ m_bMark = b; }
_AFXRICH_INLINE BOOL CRichEditCntrItem::IsMarked()
{ return m_bMark||m_bLock; }
_AFXRICH_INLINE CRichEditDoc* CRichEditCntrItem::GetDocument()
{ return (CRichEditDoc*)COleClientItem::GetDocument(); }
_AFXRICH_INLINE CRichEditView* CRichEditCntrItem::GetActiveView()
{ return (CRichEditView*)COleClientItem::GetActiveView(); }
#endif //_AFXRICH_INLINE
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,350 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXSOCK_H__
#define __AFXSOCK_H__
#ifdef _AFX_NO_SOCKET_SUPPORT
#error Windows Sockets classes not supported in this library variant.
#endif
#ifndef __AFXWIN_H__
#include <afxwin.h>
#endif
#ifndef _WINSOCKAPI_
#include <winsock.h>
#endif
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, on)
#endif
#ifndef _AFX_NOFORCE_LIBS
/////////////////////////////////////////////////////////////////////////////
// Win32 libraries
#ifdef _AFXDLL
#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
#ifndef _UNICODE
#pragma comment(lib, "mfcn42d.lib")
#else
#pragma comment(lib, "mfcn42ud.lib")
#endif
#endif
#endif
#pragma comment(lib, "wsock32.lib")
#endif //!_AFX_NOFORCE_LIBS
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
/////////////////////////////////////////////////////////////////////////////
// AFXSOCK - MFC support for Windows Sockets
// Classes declared in this file
// CObject
class CAsyncSocket; // Async Socket implementation and
// base class for Synchronous Socket
class CSocket; // Synchronous Socket
// CFile
class CSocketFile; // Used with CSocket and CArchive for
// streaming objects on sockets.
/////////////////////////////////////////////////////////////////////////////
// AFXDLL support
#undef AFX_DATA
#define AFX_DATA AFX_NET_DATA
/////////////////////////////////////////////////////////////////////////////
// CSocketWnd -- internal use only
// Implementation for sockets notification callbacks.
// Future versions of MFC may or may not include this exact class.
class CSocketWnd : public CWnd
{
// Construction
public:
CSocketWnd();
protected:
//{{AFX_MSG(CSocketWnd)
LRESULT OnSocketNotify(WPARAM wParam, LPARAM lParam);
LRESULT OnSocketDead(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CAsyncSocket
class CAsyncSocket : public CObject
{
DECLARE_DYNAMIC(CAsyncSocket);
private:
CAsyncSocket(const CAsyncSocket& rSrc); // no implementation
void operator=(const CAsyncSocket& rSrc); // no implementation
// Construction
public:
CAsyncSocket();
BOOL Create(UINT nSocketPort = 0, int nSocketType=SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL);
// Attributes
public:
SOCKET m_hSocket;
operator SOCKET() const;
BOOL Attach(SOCKET hSocket, long lEvent =
FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE);
SOCKET Detach();
BOOL GetPeerName(CString& rPeerAddress, UINT& rPeerPort);
BOOL GetPeerName(SOCKADDR* lpSockAddr, int* lpSockAddrLen);
BOOL GetSockName(CString& rSocketAddress, UINT& rSocketPort);
BOOL GetSockName(SOCKADDR* lpSockAddr, int* lpSockAddrLen);
BOOL SetSockOpt(int nOptionName, const void* lpOptionValue,
int nOptionLen, int nLevel = SOL_SOCKET);
BOOL GetSockOpt(int nOptionName, void* lpOptionValue,
int* lpOptionLen, int nLevel = SOL_SOCKET);
static CAsyncSocket* PASCAL FromHandle(SOCKET hSocket);
static int PASCAL GetLastError();
// Operations
public:
virtual BOOL Accept(CAsyncSocket& rConnectedSocket,
SOCKADDR* lpSockAddr = NULL, int* lpSockAddrLen = NULL);
BOOL Bind(UINT nSocketPort, LPCTSTR lpszSocketAddress = NULL);
BOOL Bind (const SOCKADDR* lpSockAddr, int nSockAddrLen);
virtual void Close();
BOOL Connect(LPCTSTR lpszHostAddress, UINT nHostPort);
BOOL Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen);
BOOL IOCtl(long lCommand, DWORD* lpArgument);
BOOL Listen(int nConnectionBacklog=5);
virtual int Receive(void* lpBuf, int nBufLen, int nFlags = 0);
int ReceiveFrom(void* lpBuf, int nBufLen,
CString& rSocketAddress, UINT& rSocketPort, int nFlags = 0);
int ReceiveFrom(void* lpBuf, int nBufLen,
SOCKADDR* lpSockAddr, int* lpSockAddrLen, int nFlags = 0);
enum { receives = 0, sends = 1, both = 2 };
BOOL ShutDown(int nHow = sends);
virtual int Send(const void* lpBuf, int nBufLen, int nFlags = 0);
int SendTo(const void* lpBuf, int nBufLen,
UINT nHostPort, LPCTSTR lpszHostAddress = NULL, int nFlags = 0);
int SendTo(const void* lpBuf, int nBufLen,
const SOCKADDR* lpSockAddr, int nSockAddrLen, int nFlags = 0);
BOOL AsyncSelect(long lEvent =
FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE);
// Overridable callbacks
protected:
virtual void OnReceive(int nErrorCode);
virtual void OnSend(int nErrorCode);
virtual void OnOutOfBandData(int nErrorCode);
virtual void OnAccept(int nErrorCode);
virtual void OnConnect(int nErrorCode);
virtual void OnClose(int nErrorCode);
// Implementation
public:
virtual ~CAsyncSocket();
static CAsyncSocket* PASCAL LookupHandle(SOCKET hSocket, BOOL bDead = FALSE);
static void PASCAL AttachHandle(SOCKET hSocket, CAsyncSocket* pSocket, BOOL bDead = FALSE);
static void PASCAL DetachHandle(SOCKET hSocket, BOOL bDead = FALSE);
static void PASCAL KillSocket(SOCKET hSocket, CAsyncSocket* pSocket);
static void PASCAL DoCallBack(WPARAM wParam, LPARAM lParam);
BOOL Socket(int nSocketType=SOCK_STREAM, long lEvent =
FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
int nProtocolType = 0, int nAddressFormat = PF_INET);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
friend class CSocketWnd;
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);
};
/////////////////////////////////////////////////////////////////////////////
// CSocket
class CSocket : public CAsyncSocket
{
DECLARE_DYNAMIC(CSocket);
private:
CSocket(const CSocket& rSrc); // no implementation
void operator=(const CSocket& rSrc); // no implementation
// Construction
public:
CSocket();
BOOL Create(UINT nSocketPort = 0, int nSocketType=SOCK_STREAM,
LPCTSTR lpszSocketAddress = NULL);
// Attributes
public:
BOOL IsBlocking();
static CSocket* PASCAL FromHandle(SOCKET hSocket);
BOOL Attach(SOCKET hSocket);
// Operations
public:
void CancelBlockingCall();
// Overridable callbacks
protected:
virtual BOOL OnMessagePending();
// Implementation
public:
int m_nTimeOut;
virtual ~CSocket();
static int PASCAL ProcessAuxQueue();
virtual BOOL Accept(CAsyncSocket& rConnectedSocket,
SOCKADDR* lpSockAddr = NULL, int* lpSockAddrLen = NULL);
virtual void Close();
virtual int Receive(void* lpBuf, int nBufLen, int nFlags = 0);
virtual int Send(const void* lpBuf, int nBufLen, int nFlags = 0);
int SendChunk(const void* lpBuf, int nBufLen, int nFlags);
protected:
friend class CSocketWnd;
BOOL* m_pbBlocking;
int m_nConnectError;
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);
static void PASCAL AuxQueueAdd(UINT message, WPARAM wParam, LPARAM lParam);
virtual BOOL PumpMessages(UINT uStopFlag);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
// CSocketFile
class CSocketFile : public CFile
{
DECLARE_DYNAMIC(CSocketFile)
public:
//Constructors
CSocketFile(CSocket* pSocket, BOOL bArchiveCompatible = TRUE);
// Implementation
public:
CSocket* m_pSocket;
BOOL m_bArchiveCompatible;
virtual ~CSocketFile();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
virtual UINT Read(void* lpBuf, UINT nCount);
virtual void Write(const void* lpBuf, UINT nCount);
virtual void Close();
// Unsupported APIs
virtual BOOL Open(LPCTSTR lpszFileName, UINT nOpenFlags, CFileException* pError = NULL);
virtual CFile* Duplicate() const;
virtual DWORD GetPosition() const;
virtual LONG Seek(LONG lOff, UINT nFrom);
virtual void SetLength(DWORD dwNewLen);
virtual DWORD GetLength() const;
virtual void LockRange(DWORD dwPos, DWORD dwCount);
virtual void UnlockRange(DWORD dwPos, DWORD dwCount);
virtual void Flush();
virtual void Abort();
};
/////////////////////////////////////////////////////////////////////////////
// Global functions
BOOL AFXAPI AfxSocketInit(WSADATA* lpwsaData = NULL);
void AFXAPI AfxSocketTerm();
/////////////////////////////////////////////////////////////////////////////
// Inline function declarations
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#ifdef _AFX_ENABLE_INLINES
#define _AFXSOCK_INLINE AFX_INLINE
#include <afxsock.inl>
#undef _AFXSOCK_INLINE
#endif
#undef AFX_DATA
#define AFX_DATA
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
#ifndef _AFX_FULLTYPEINFO
#pragma component(mintypeinfo, off)
#endif
#endif // __AFXSOCK_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,53 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// Inlines for AFXSOCK.H
#ifdef _AFXSOCK_INLINE
_AFXSOCK_INLINE CAsyncSocket::operator SOCKET() const
{ return m_hSocket; }
_AFXSOCK_INLINE BOOL CAsyncSocket::GetPeerName(SOCKADDR* lpSockAddr, int* lpSockAddrLen)
{ return (SOCKET_ERROR != getpeername(m_hSocket, lpSockAddr, lpSockAddrLen)); }
_AFXSOCK_INLINE BOOL CAsyncSocket::GetSockName(SOCKADDR* lpSockAddr, int* lpSockAddrLen)
{ return (SOCKET_ERROR != getsockname(m_hSocket, lpSockAddr, lpSockAddrLen)); }
_AFXSOCK_INLINE BOOL CAsyncSocket::SetSockOpt(int nOptionName, const void* lpOptionValue, int nOptionLen, int nLevel)
{ return (SOCKET_ERROR != setsockopt(m_hSocket, nLevel, nOptionName, (LPCSTR)lpOptionValue, nOptionLen)); }
_AFXSOCK_INLINE BOOL CAsyncSocket::GetSockOpt(int nOptionName, void* lpOptionValue, int* lpOptionLen, int nLevel)
{ return (SOCKET_ERROR != getsockopt(m_hSocket, nLevel, nOptionName, (LPSTR)lpOptionValue, lpOptionLen)); }
_AFXSOCK_INLINE CAsyncSocket* PASCAL CAsyncSocket::FromHandle(SOCKET hSocket)
{ return CAsyncSocket::LookupHandle(hSocket, FALSE); }
_AFXSOCK_INLINE int PASCAL CAsyncSocket::GetLastError()
{ return WSAGetLastError(); }
_AFXSOCK_INLINE BOOL CAsyncSocket::Bind(const SOCKADDR* lpSockAddr, int nSockAddrLen)
{ return (SOCKET_ERROR != bind(m_hSocket, lpSockAddr, nSockAddrLen)); }
_AFXSOCK_INLINE BOOL CAsyncSocket::Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen)
{ return ConnectHelper(lpSockAddr, nSockAddrLen); }
_AFXSOCK_INLINE BOOL CAsyncSocket::IOCtl(long lCommand, DWORD* lpArgument)
{ return (SOCKET_ERROR != ioctlsocket(m_hSocket, lCommand, lpArgument)); }
_AFXSOCK_INLINE BOOL CAsyncSocket::Listen(int nConnectionBacklog)
{ return (SOCKET_ERROR != listen(m_hSocket, nConnectionBacklog)); }
_AFXSOCK_INLINE int CAsyncSocket::ReceiveFrom(void* lpBuf, int nBufLen, SOCKADDR* lpSockAddr, int* lpSockAddrLen, int nFlags)
{ return ReceiveFromHelper(lpBuf, nBufLen, lpSockAddr, lpSockAddrLen, nFlags); }
_AFXSOCK_INLINE BOOL CAsyncSocket::ShutDown(int nHow)
{ return (SOCKET_ERROR != shutdown(m_hSocket,nHow)); }
_AFXSOCK_INLINE int CAsyncSocket::SendTo(const void* lpBuf, int nBufLen, const SOCKADDR* lpSockAddr, int nSockAddrLen, int nFlags)
{ return SendToHelper(lpBuf, nBufLen, lpSockAddr, nSockAddrLen, nFlags); }
_AFXSOCK_INLINE BOOL CSocket::Create(UINT nSocketPort, int nSocketType, LPCTSTR lpszSocketAddress)
{ return CAsyncSocket::Create(nSocketPort, nSocketType, FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE, lpszSocketAddress); }
_AFXSOCK_INLINE BOOL CSocket::IsBlocking()
{ return (m_pbBlocking != NULL); }
_AFXSOCK_INLINE CSocket* PASCAL CSocket::FromHandle(SOCKET hSocket)
{ return (CSocket*)CAsyncSocket::LookupHandle(hSocket, FALSE); }
_AFXSOCK_INLINE BOOL CSocket::Attach(SOCKET hSocket)
{ return CAsyncSocket::Attach(hSocket); }
#endif //_AFXSOCK_INLINE
@@ -0,0 +1,395 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXSTATE_H__
#define __AFXSTATE_H__
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
#ifndef __AFXTLS_H__
#include <afxtls_.h>
#endif
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
/////////////////////////////////////////////////////////////////////////////
// _AFX_DEBUG_STATE
#ifdef _DEBUG
class _AFX_DEBUG_STATE : public CNoTrackObject
{
public:
_AFX_DEBUG_STATE();
virtual ~_AFX_DEBUG_STATE();
};
EXTERN_PROCESS_LOCAL(_AFX_DEBUG_STATE, afxDebugState)
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// _AFX_WIN_STATE
#undef AFX_DATA
#define AFX_DATA
class _AFX_WIN_STATE : public CNoTrackObject
{
#ifndef _AFX_NO_GRAYDLG_SUPPORT
public:
_AFX_WIN_STATE();
virtual ~_AFX_WIN_STATE();
// gray dialog support
HBRUSH m_hDlgBkBrush; // dialog and message box background brush
COLORREF m_crDlgTextClr;
#endif //!_AFX_NO_GRAYDLG_SUPPORT
public:
// printing abort
BOOL m_bUserAbort;
};
EXTERN_PROCESS_LOCAL(_AFX_WIN_STATE, _afxWinState)
/////////////////////////////////////////////////////////////////////////////
// Type library cache - AFX_INTERNAL
#ifndef _AFX_NO_OLE_SUPPORT
struct ITypeInfo;
typedef ITypeInfo* LPTYPEINFO;
struct ITypeLib;
typedef ITypeLib* LPTYPELIB;
typedef struct _GUID GUID;
#ifndef _REFCLSID_DEFINED
#define REFGUID const GUID &
#endif
class CTypeLibCache
{
public:
CTypeLibCache() : m_cRef(0), m_lcid((LCID)-1), m_ptlib(NULL), m_ptinfo(NULL) {}
void Lock();
void Unlock();
BOOL Lookup(LCID lcid, LPTYPELIB* pptlib);
void Cache(LCID lcid, LPTYPELIB ptlib);
BOOL LookupTypeInfo(LCID lcid, REFGUID guid, LPTYPEINFO* pptinfo);
void CacheTypeInfo(LCID lcid, REFGUID guid, LPTYPEINFO ptinfo);
const GUID* m_pTypeLibID;
protected:
LCID m_lcid;
LPTYPELIB m_ptlib;
GUID m_guidInfo;
LPTYPEINFO m_ptinfo;
long m_cRef;
};
#endif //!_AFX_NO_OLE_SUPPORT
/////////////////////////////////////////////////////////////////////////////
// AFX_MODULE_STATE : portion of state that is pushed/popped
// forward references required for AFX_MODULE_THREAD_STATE definition
class CWinThread;
class CHandleMap;
class CFrameWnd;
#ifndef _PNH_DEFINED
typedef int (__cdecl * _PNH)( size_t );
#define _PNH_DEFINED
#endif
template<class TYPE>
class CEmbeddedButActsLikePtr
{
public:
AFX_INLINE TYPE* operator->() { return &m_data; }
AFX_INLINE operator TYPE*() { return &m_data; }
TYPE m_data;
};
// AFX_MODULE_THREAD_STATE (local to thread *and* module)
class AFX_MODULE_THREAD_STATE : public CNoTrackObject
{
public:
AFX_MODULE_THREAD_STATE();
virtual ~AFX_MODULE_THREAD_STATE();
// current CWinThread pointer
CWinThread* m_pCurrentWinThread;
// list of CFrameWnd objects for thread
CTypedSimpleList<CFrameWnd*> m_frameList;
// temporary/permanent map state
DWORD m_nTempMapLock; // if not 0, temp maps locked
CHandleMap* m_pmapHWND;
CHandleMap* m_pmapHMENU;
CHandleMap* m_pmapHDC;
CHandleMap* m_pmapHGDIOBJ;
CHandleMap* m_pmapHIMAGELIST;
// thread-local MFC new handler (separate from C-runtime)
_PNH m_pfnNewHandler;
#ifndef _AFX_NO_SOCKET_SUPPORT
// WinSock specific thread state
HWND m_hSocketWindow;
#ifdef _AFXDLL
CEmbeddedButActsLikePtr<CMapPtrToPtr> m_pmapSocketHandle;
CEmbeddedButActsLikePtr<CMapPtrToPtr> m_pmapDeadSockets;
CEmbeddedButActsLikePtr<CPtrList> m_plistSocketNotifications;
#else
CMapPtrToPtr* m_pmapSocketHandle;
CMapPtrToPtr* m_pmapDeadSockets;
CPtrList* m_plistSocketNotifications;
#endif
#endif
};
// forward references required for AFX_MODULE_STATE definition
class CWinApp;
class COleObjectFactory;
class CWnd;
#ifdef _AFXDLL
class CDynLinkLibrary;
#endif
#ifndef _AFX_NO_OCC_SUPPORT
class COccManager;
class COleControlLock;
#endif
#ifndef _AFX_NO_DAO_SUPPORT
class _AFX_DAO_STATE;
#endif
class CTypeLibCacheMap : public CMapPtrToPtr
{
public:
virtual void RemoveAll(void* pExcept);
};
// AFX_MODULE_STATE (global data for a module)
class AFX_MODULE_STATE : public CNoTrackObject
{
public:
#ifdef _AFXDLL
AFX_MODULE_STATE(BOOL bDLL, WNDPROC pfnAfxWndProc, DWORD dwVersion);
AFX_MODULE_STATE(BOOL bDLL, WNDPROC pfnAfxWndProc, DWORD dwVersion,
BOOL bSystem);
#else
AFX_MODULE_STATE(BOOL bDLL);
#endif
~AFX_MODULE_STATE();
CWinApp* m_pCurrentWinApp;
HINSTANCE m_hCurrentInstanceHandle;
HINSTANCE m_hCurrentResourceHandle;
LPCTSTR m_lpszCurrentAppName;
BYTE m_bDLL; // TRUE if module is a DLL, FALSE if it is an EXE
BYTE m_bSystem; // TRUE if module is a "system" module, FALSE if not
BYTE m_bReserved[2]; // padding
DWORD m_fRegisteredClasses; // flags for registered window classes
// runtime class data
#ifdef _AFXDLL
CRuntimeClass* m_pClassInit;
#endif
CTypedSimpleList<CRuntimeClass*> m_classList;
// OLE object factories
#ifndef _AFX_NO_OLE_SUPPORT
#ifdef _AFXDLL
COleObjectFactory* m_pFactoryInit;
#endif
CTypedSimpleList<COleObjectFactory*> m_factoryList;
#endif
// number of locked OLE objects
long m_nObjectCount;
BOOL m_bUserCtrl;
// AfxRegisterClass and AfxRegisterWndClass data
TCHAR m_szUnregisterList[4096];
#ifdef _AFXDLL
WNDPROC m_pfnAfxWndProc;
DWORD m_dwVersion; // version that module linked against
#endif
// variables related to a given process in a module
// (used to be AFX_MODULE_PROCESS_STATE)
#ifdef _AFX_OLD_EXCEPTIONS
// exceptions
AFX_TERM_PROC m_pfnTerminate;
#endif
void (PASCAL *m_pfnFilterToolTipMessage)(MSG*, CWnd*);
#ifdef _AFXDLL
// CDynLinkLibrary objects (for resource chain)
CTypedSimpleList<CDynLinkLibrary*> m_libraryList;
// special case for MFCxxLOC.DLL (localized MFC resources)
HINSTANCE m_appLangDLL;
#endif
#ifndef _AFX_NO_OCC_SUPPORT
// OLE control container manager
COccManager* m_pOccManager;
// locked OLE controls
CTypedSimpleList<COleControlLock*> m_lockList;
#endif
#ifndef _AFX_NO_DAO_SUPPORT
_AFX_DAO_STATE* m_pDaoState;
#endif
#ifndef _AFX_NO_OLE_SUPPORT
// Type library caches
CTypeLibCache m_typeLibCache;
CTypeLibCacheMap* m_pTypeLibCacheMap;
#endif
// define thread local portions of module state
THREAD_LOCAL(AFX_MODULE_THREAD_STATE, m_thread)
};
AFX_MODULE_STATE* AFXAPI AfxGetAppModuleState();
#ifdef _AFXDLL
AFX_MODULE_STATE* AFXAPI AfxSetModuleState(AFX_MODULE_STATE* pNewState);
#endif
AFX_MODULE_STATE* AFXAPI AfxGetModuleState();
AFX_MODULE_STATE* AFXAPI AfxGetStaticModuleState();
AFX_MODULE_THREAD_STATE* AFXAPI AfxGetModuleThreadState();
#ifdef _AFXDLL
#define _AFX_CMDTARGET_GETSTATE() (m_pModuleState)
#else
#define _AFX_CMDTARGET_GETSTATE() (AfxGetModuleState())
#endif
/////////////////////////////////////////////////////////////////////////////
// macros & classes to manage pushing/popping the module state
#ifdef _AFXDLL
struct AFX_MAINTAIN_STATE
{
AFX_MAINTAIN_STATE(AFX_MODULE_STATE* pModuleState);
~AFX_MAINTAIN_STATE();
protected:
AFX_MODULE_STATE* m_pPrevModuleState;
};
class _AFX_THREAD_STATE;
struct AFX_MAINTAIN_STATE2
{
AFX_MAINTAIN_STATE2(AFX_MODULE_STATE* pModuleState);
~AFX_MAINTAIN_STATE2();
protected:
AFX_MODULE_STATE* m_pPrevModuleState;
_AFX_THREAD_STATE* m_pThreadState;
};
#define AFX_MANAGE_STATE(p) AFX_MAINTAIN_STATE2 _ctlState(p);
#else // _AFXDLL
#define AFX_MANAGE_STATE(p)
#endif //!_AFXDLL
/////////////////////////////////////////////////////////////////////////////
// Thread global state
// forward references required for _AFX_THREAD_STATE definition
class CView;
class CToolTipCtrl;
class CControlBar;
class _AFX_THREAD_STATE : public CNoTrackObject
{
public:
_AFX_THREAD_STATE();
virtual ~_AFX_THREAD_STATE();
// override for m_pModuleState in _AFX_APP_STATE
AFX_MODULE_STATE* m_pModuleState;
AFX_MODULE_STATE* m_pPrevModuleState;
// memory safety pool for temp maps
void* m_pSafetyPoolBuffer; // current buffer
// thread local exception context
AFX_EXCEPTION_CONTEXT m_exceptionContext;
// CWnd create, gray dialog hook, and other hook data
CWnd* m_pWndInit;
CWnd* m_pAlternateWndInit; // special case commdlg hooking
DWORD m_dwPropStyle;
DWORD m_dwPropExStyle;
HWND m_hWndInit;
BOOL m_bDlgCreate;
HHOOK m_hHookOldCbtFilter;
HHOOK m_hHookOldMsgFilter;
// other CWnd modal data
MSG m_lastSentMsg; // see CWnd::WindowProc
HWND m_hTrackingWindow; // see CWnd::TrackPopupMenu
HMENU m_hTrackingMenu;
TCHAR m_szTempClassName[96]; // see AfxRegisterWndClass
HWND m_hLockoutNotifyWindow; // see CWnd::OnCommand
BOOL m_bInMsgFilter;
// other framework modal data
CView* m_pRoutingView; // see CCmdTarget::GetRoutingView
CFrameWnd* m_pRoutingFrame; // see CCmdTarget::GetRoutingFrame
// MFC/DB thread-local data
BOOL m_bWaitForDataSource;
// common controls thread state
CToolTipCtrl* m_pToolTip;
CWnd* m_pLastHit; // last window to own tooltip
int m_nLastHit; // last hittest code
TOOLINFO m_lastInfo; // last TOOLINFO structure
int m_nLastStatus; // last flyby status message
CControlBar* m_pLastStatus; // last flyby status control bar
// OLE control thread-local data
CWnd* m_pWndPark; // "parking space" window
long m_nCtrlRef; // reference count on parking window
BOOL m_bNeedTerm; // TRUE if OleUninitialize needs to be called
};
EXTERN_THREAD_LOCAL(_AFX_THREAD_STATE, _afxThreadState)
_AFX_THREAD_STATE* AFXAPI AfxGetThreadState();
/////////////////////////////////////////////////////////////////////////////
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#endif //__AFXSTATE_H__
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,243 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXTLS_H__
#define __AFXTLS_H__
#ifdef _AFX_PACKING
#pragma pack(push, _AFX_PACKING)
#endif
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
// Classes declared in this file
class CSimpleList;
class CThreadSlotData; // for manipulationg thread local storage
class CThreadLocalObject; // for storing thread local data
class CProcessLocalObject; // for storing thread local data
class CNoTrackObject;
// template class CTypedSimpleList<>
// template class CThreadLocal<>
// template class CProcessLocal<>
/////////////////////////////////////////////////////////////////////////////
// CSimpleList (simple/small subset of CList)
class CSimpleList
{
public:
CSimpleList(int nNextOffset = 0);
void Construct(int nNextOffset);
// Operations
BOOL IsEmpty() const;
void AddHead(void* p);
void RemoveAll();
void* GetHead() const;
void* GetNext(void* p) const;
BOOL Remove(void* p);
// Implementation
void* m_pHead;
size_t m_nNextOffset;
void** GetNextPtr(void* p) const; // somewhat trusting...
};
AFX_INLINE CSimpleList::CSimpleList(int nNextOffset)
{ m_pHead = NULL; m_nNextOffset = nNextOffset; }
AFX_INLINE void CSimpleList::Construct(int nNextOffset)
{ ASSERT(m_pHead == NULL); m_nNextOffset = nNextOffset; }
AFX_INLINE BOOL CSimpleList::IsEmpty() const
{ return m_pHead == NULL; }
AFX_INLINE void** CSimpleList::GetNextPtr(void* p) const
{ ASSERT(p != NULL); return (void**)((BYTE*)p+m_nNextOffset); }
AFX_INLINE void CSimpleList::RemoveAll()
{ m_pHead = NULL; }
AFX_INLINE void* CSimpleList::GetHead() const
{ return m_pHead; }
AFX_INLINE void* CSimpleList::GetNext(void* prevElement) const
{ return *GetNextPtr(prevElement); }
template<class TYPE>
class CTypedSimpleList : public CSimpleList
{
public:
CTypedSimpleList(int nNextOffset = 0)
: CSimpleList(nNextOffset) { }
void AddHead(TYPE p)
{ CSimpleList::AddHead(p); }
TYPE GetHead()
{ return (TYPE)CSimpleList::GetHead(); }
TYPE GetNext(TYPE p)
{ return (TYPE)CSimpleList::GetNext(p); }
BOOL Remove(TYPE p)
{ return CSimpleList::Remove((TYPE)p); }
operator TYPE()
{ return (TYPE)CSimpleList::GetHead(); }
};
/////////////////////////////////////////////////////////////////////////////
// CThreadSlotData - manages owned array of "slots" for thread local storage
struct CThreadData; // private to implementation
struct CSlotData; // private to implementation
class CThreadSlotData
{
public:
CThreadSlotData();
// Operations
int AllocSlot();
void FreeSlot(int nSlot);
void* GetValue(int nSlot);
void SetValue(int nSlot, void* pValue);
// delete all values in process/thread
void DeleteValues(HINSTANCE hInst, BOOL bAll = FALSE);
// assign instance handle to just constructed slots
void AssignInstance(HINSTANCE hInst);
// Implementation
DWORD m_tlsIndex; // used to access system thread-local storage
int m_nAlloc; // number of slots allocated (in UINTs)
int m_nRover; // (optimization) for quick finding of free slots
int m_nMax; // size of slot table below (in bits)
CSlotData* m_pSlotData; // state of each slot (allocated or not)
CTypedSimpleList<CThreadData*> m_list; // list of CThreadData structures
CRITICAL_SECTION m_sect;
void* GetThreadValue(int nSlot); // special version for threads only!
void* PASCAL operator new(size_t, void* p)
{ return p; }
void DeleteValues(CThreadData* pData, HINSTANCE hInst);
~CThreadSlotData();
};
class AFX_NOVTABLE CNoTrackObject
{
public:
void* PASCAL operator new(size_t nSize);
void PASCAL operator delete(void*);
#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
void* PASCAL operator new(size_t nSize, LPCSTR, int);
#if _MSC_VER >= 1200
void PASCAL operator delete(void* pObject, LPCSTR, int);
#endif
#endif
virtual ~CNoTrackObject() { }
};
class AFX_NOVTABLE CThreadLocalObject
{
public:
// Attributes
CNoTrackObject* GetData(CNoTrackObject* (AFXAPI* pfnCreateObject)());
CNoTrackObject* GetDataNA();
// Implementation
int m_nSlot;
~CThreadLocalObject();
};
class AFX_NOVTABLE CProcessLocalObject
{
public:
// Attributes
CNoTrackObject* GetData(CNoTrackObject* (AFXAPI* pfnCreateObject)());
// Implementation
CNoTrackObject* volatile m_pObject;
~CProcessLocalObject();
};
template<class TYPE>
class CThreadLocal : public CThreadLocalObject
{
// Attributes
public:
AFX_INLINE TYPE* GetData()
{
TYPE* pData = (TYPE*)CThreadLocalObject::GetData(&CreateObject);
ASSERT(pData != NULL);
return pData;
}
AFX_INLINE TYPE* GetDataNA()
{
TYPE* pData = (TYPE*)CThreadLocalObject::GetDataNA();
return pData;
}
AFX_INLINE operator TYPE*()
{ return GetData(); }
AFX_INLINE TYPE* operator->()
{ return GetData(); }
// Implementation
public:
static CNoTrackObject* AFXAPI CreateObject()
{ return new TYPE; }
};
#define THREAD_LOCAL(class_name, ident_name) \
AFX_DATADEF CThreadLocal<class_name> ident_name;
#define EXTERN_THREAD_LOCAL(class_name, ident_name) \
extern AFX_DATA THREAD_LOCAL(class_name, ident_name)
template<class TYPE>
class CProcessLocal : public CProcessLocalObject
{
// Attributes
public:
AFX_INLINE TYPE* GetData()
{
TYPE* pData = (TYPE*)CProcessLocalObject::GetData(&CreateObject);
ASSERT(pData != NULL);
return pData;
}
AFX_INLINE TYPE* GetDataNA()
{ return (TYPE*)m_pObject; }
AFX_INLINE operator TYPE*()
{ return GetData(); }
AFX_INLINE TYPE* operator->()
{ return GetData(); }
// Implementation
public:
static CNoTrackObject* AFXAPI CreateObject()
{ return new TYPE; }
};
#define PROCESS_LOCAL(class_name, ident_name) \
AFX_DATADEF CProcessLocal<class_name> ident_name;
#define EXTERN_PROCESS_LOCAL(class_name, ident_name) \
extern AFX_DATA PROCESS_LOCAL(class_name, ident_name)
/////////////////////////////////////////////////////////////////////////////
void AFXAPI AfxInitLocalData(HINSTANCE hInstInit);
void AFXAPI AfxTermLocalData(HINSTANCE hInstTerm, BOOL bAll = FALSE);
void AFXAPI AfxTlsAddRef();
void AFXAPI AfxTlsRelease();
#ifdef _AFX_PACKING
#pragma pack(pop)
#endif
#undef AFX_DATA
#define AFX_DATA
#endif //__AFXTLS_H__
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,353 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// afxver_.h - target version/configuration control
/////////////////////////////////////////////////////////////////////////////
// Master version numbers
#define _AFX 1 // Microsoft Application Framework Classes
#ifndef _MFC_VER
#define _MFC_VER 0x0600 // Microsoft Foundation Classes version 6.00, VC++ 6.0
#endif
/////////////////////////////////////////////////////////////////////////////
// Default swap tuning for AFX library
#define _TEXTSEG(name) ".text$" #name
// Most segments are tuned via function order list (DLL version)
#ifndef _AFX_FUNCTION_ORDER
#define AFX_CORE1_SEG _TEXTSEG(AFX_CORE1) // core functionality
#define AFX_CORE2_SEG _TEXTSEG(AFX_CORE2) // more core functionality
#define AFX_CORE3_SEG _TEXTSEG(AFX_CORE3) // more core functionality
#define AFX_CORE4_SEG _TEXTSEG(AFX_CORE4) // more core functionality
#define AFX_AUX_SEG _TEXTSEG(AFX_AUX) // auxilliary functionality
#define AFX_CMNCTL_SEG _TEXTSEG(AFX_CMNCTL)// most common controls
#define AFX_COLL_SEG _TEXTSEG(AFX_COL1) // collections
#define AFX_COLL2_SEG _TEXTSEG(AFX_COL2) // more collections
#define AFX_INET_SEG _TEXTSEG(AFX_INET) // Internet client-side stuff
#define AFX_OLE_SEG _TEXTSEG(AFX_OLE1) // OLE support
#define AFX_OLE2_SEG _TEXTSEG(AFX_OLE2) // more OLE support
#define AFX_OLE3_SEG _TEXTSEG(AFX_OLE3) // and more OLE support
#define AFX_OLE4_SEG _TEXTSEG(AFX_OLE4) // and more OLE support
#define AFX_OLE5_SEG _TEXTSEG(AFX_OLE5) // and even more OLE support
#define AFX_OLERA_SEG _TEXTSEG(AFX_OLERA) // (reserved for future use)
#define AFX_PRINT_SEG _TEXTSEG(AFX_PRNT) // Printing functionality
#define AFX_DBG1_SEG _TEXTSEG(AFX_DBG1) // inlines go here in _DEBUG
#define AFX_DBG2_SEG _TEXTSEG(AFX_DBG2) // inlines go here in _DEBUG
#define AFX_VDEL_SEG _TEXTSEG(AFX_VDEL) // vector deleting destructors
#define AFX_TERM_SEG _TEXTSEG(AFX_TERM) // cleanup routines
#define AFX_MAPI_SEG _TEXTSEG(AFX_MAPI) // simple MAPI support
#define AFX_SOCK_SEG _TEXTSEG(AFX_SOCK) // windows sockets support
#else
#define AFX_CORE1_SEG // core functionality
#define AFX_CORE2_SEG // more core functionality
#define AFX_CORE3_SEG // more core functionality
#define AFX_CORE4_SEG // more core functionality
#define AFX_AUX_SEG // auxilliary functionality
#define AFX_CMNCTL_SEG // most common controls
#define AFX_COLL_SEG // collections
#define AFX_COLL2_SEG // more collections
#define AFX_INET_SEG // Internet client-side stuff
#define AFX_OLE_SEG // OLE support
#define AFX_OLE2_SEG // more OLE support
#define AFX_OLE3_SEG // and more OLE support
#define AFX_OLE4_SEG // and more OLE support
#define AFX_OLE5_SEG // and even more OLE support
#define AFX_OLERA_SEG // (reserved for future use)
#define AFX_PRINT_SEG // Printing functionality
#define AFX_DBG1_SEG // inlines go here in _DEBUG
#define AFX_DBG2_SEG // inlines go here in _DEBUG
#define AFX_VDEL_SEG // vector deleting destructors
#define AFX_TERM_SEG // cleanup routines
#define AFX_MAPI_SEG // simple MAPI support
#define AFX_SOCK_SEG // windows sockets support
#endif
// AFX_INIT_SEG is hand tuned even in DLL version
#define AFX_INIT_SEG _TEXTSEG(AFX_INIT) // initialization
/////////////////////////////////////////////////////////////////////////////
// turn off reference tracking for certain often used symbols
#ifndef _AFX_PORTABLE
#pragma component(browser, off, references, "ASSERT")
#pragma component(browser, off, references, "AfxAssertFailedLine")
#pragma component(browser, off, references, "AfxDebugBreak")
#pragma component(browser, off, references, "BOOL")
#pragma component(browser, off, references, "BYTE")
#pragma component(browser, off, references, "DECLSPEC_IMPORT")
#pragma component(browser, off, references, "DWORD")
#pragma component(browser, off, references, "FALSE")
#pragma component(browser, off, references, "FAR")
#pragma component(browser, off, references, "LPSTR")
#pragma component(browser, off, references, "LPTSTR")
#pragma component(browser, off, references, "LPCSTR")
#pragma component(browser, off, references, "LPCTSTR")
#pragma component(browser, off, references, "NULL")
#pragma component(browser, off, references, "PASCAL")
#pragma component(browser, off, references, "THIS_FILE")
#pragma component(browser, off, references, "TRUE")
#pragma component(browser, off, references, "UINT")
#pragma component(browser, off, references, "WINAPI")
#pragma component(browser, off, references, "WORD")
#endif //!_AFX_PORTABLE
/////////////////////////////////////////////////////////////////////////////
// For target version (one of)
// _CUSTOM : for custom configurations (causes afxv_cfg.h to be included)
//
// Additional build options:
// _DEBUG debug versions (full diagnostics)
// _AFXDLL use shared MFC DLL
// _AFXEXT extension DLL version, implies _AFXDLL
// _USRDLL create regular DLL (_AFXDLL is valid too)
//
#ifndef _DEBUG
#define _AFX_ENABLE_INLINES
#endif
#define _AFX_NO_NESTED_DERIVATION
/////////////////////////////////////////////////////////////////////////////
// Special configurations
// _AFXEXT implies _AFXDLL
#if defined(_AFXEXT) && !defined(_AFXDLL)
#define _AFXDLL
#endif
#if defined(_AFXDLL) && !defined(_DLL)
#error Please use the /MD switch for _AFXDLL builds
#endif
#if defined(_AFXDLL) && !defined(_MT)
#error Please use the /MD switch (multithreaded DLL C-runtime)
#endif
/////////////////////////////////////////////////////////////////////////////
// special include files
#ifndef AFX_INLINE
#define AFX_INLINE inline /*__forceinline*/
#endif
#include <afxv_w32.h>
// Include any non-Intel platform specific items
#ifndef _X86_
#include <afxv_cpu.h>
#endif
#ifdef _X86_
#define _AFX_MINREBUILD
#endif
#ifdef _CUSTOM
// Put any custom configuration items in afxv_cfg.h
#include <afxv_cfg.h>
#endif
// setup default packing value
#ifndef _AFX_PACKING
#define _AFX_PACKING 4 // default packs structs at 4 bytes
#endif
#ifdef _AFXDLL
#include <afxv_dll.h>
#endif
// Define this virtual key for use by status bar
#ifndef VK_KANA
#define VK_KANA 0x15
#endif
/////////////////////////////////////////////////////////////////////////////
// Special AfxDebugBreak: used to break into debugger at critical times
#ifndef AfxDebugBreak
#ifdef _AFX_NO_DEBUG_CRT
// by default, debug break is asm int 3, or a call to DebugBreak, or nothing
#if defined(_M_IX86) && !defined(_AFX_PORTABLE)
#define AfxDebugBreak() _asm { int 3 }
#else
#define AfxDebugBreak() DebugBreak()
#endif
#else
#define AfxDebugBreak() _CrtDbgBreak()
#endif
#endif
#ifndef _DEBUG
#ifdef AfxDebugBreak
#undef AfxDebugBreak
#endif
#define AfxDebugBreak()
#endif // _DEBUG
/////////////////////////////////////////////////////////////////////////////
// Standard preprocessor symbols if not already defined
/////////////////////////////////////////////////////////////////////////////
// SIZE_T_MAX is used by the collection classes
#ifndef SIZE_T_MAX
#define SIZE_T_MAX UINT_MAX
#endif
// PASCAL is used for static member functions
#ifndef PASCAL
#define PASCAL __stdcall
#endif
// FASTCALL is used for static member functions with little or no params
#ifndef FASTCALL
#define FASTCALL __fastcall
#endif
// CDECL and EXPORT are defined in case WINDOWS.H doesn't
#ifndef CDECL
#define CDECL __cdecl
#endif
#ifndef EXPORT
#define EXPORT
#endif
// UNALIGNED is used for unaligned data access (in CArchive mostly)
#ifndef UNALIGNED
#define UNALIGNED
#endif
// AFXAPI is used on global public functions
#ifndef AFXAPI
#define AFXAPI __stdcall
#endif
// AFXOLEAPI is used for some special OLE functions
#ifndef AFXOLEAPI
#define AFXOLEAPI __stdcall
#endif
// AFX_CDECL is used for rare functions taking variable arguments
#ifndef AFX_CDECL
#define AFX_CDECL __cdecl
#endif
// AFX_EXPORT is used for functions which need to be exported
#ifndef AFX_EXPORT
#define AFX_EXPORT EXPORT
#endif
#ifndef AFX_STATIC
#define AFX_STATIC extern
#define AFX_STATIC_DATA extern __declspec(selectany)
#endif
// The following macros are used to enable export/import
// for data
#ifndef AFX_DATA_EXPORT
#define AFX_DATA_EXPORT __declspec(dllexport)
#endif
#ifndef AFX_DATA_IMPORT
#define AFX_DATA_IMPORT __declspec(dllimport)
#endif
// for classes
#ifndef AFX_CLASS_EXPORT
#define AFX_CLASS_EXPORT __declspec(dllexport)
#endif
#ifndef AFX_CLASS_IMPORT
#define AFX_CLASS_IMPORT __declspec(dllimport)
#endif
// for global APIs
#ifndef AFX_API_EXPORT
#define AFX_API_EXPORT __declspec(dllexport)
#endif
#ifndef AFX_API_IMPORT
#define AFX_API_IMPORT __declspec(dllimport)
#endif
// This macro is used to reduce size requirements of some classes
#ifndef AFX_ALWAYS_VTABLE
#ifndef AFX_NOVTABLE
#if _MSC_VER >= 1100 && !defined(_DEBUG)
#define AFX_NOVTABLE __declspec(novtable)
#else
#define AFX_NOVTABLE
#endif
#endif
#endif
// for global data that should be in COMDATs (packaged data)
#ifndef AFX_COMDAT
#define AFX_COMDAT
#endif
// The following macros are used on data declarations/definitions
// (they are redefined for extension DLLs and the shared MFC DLL)
#define AFX_DATA
#define AFX_DATADEF
#define AFX_API
// used when building the "core" MFC42.DLL
#ifndef AFX_CORE_DATA
#define AFX_CORE_DATA
#define AFX_CORE_DATADEF
#endif
// used when building the MFC/OLE support MFCO42.DLL
#ifndef AFX_OLE_DATA
#define AFX_OLE_DATA
#define AFX_OLE_DATADEF
#endif
// used when building the MFC/DB support MFCD42.DLL
#ifndef AFX_DB_DATA
#define AFX_DB_DATA
#define AFX_DB_DATADEF
#endif
// used when building the MFC/NET support MFCN42.DLL
#ifndef AFX_NET_DATA
#define AFX_NET_DATA
#define AFX_NET_DATADEF
#endif
// used when building extension DLLs
#ifndef AFX_EXT_DATA
#define AFX_EXT_DATA
#define AFX_EXT_DATADEF
#define AFX_EXT_CLASS
#define AFX_EXT_API
#endif
// BASED_XXXX macros are provided for backward compatibility
#ifndef BASED_CODE
#define BASED_CODE
#endif
#ifndef BASED_DEBUG
#define BASED_DEBUG
#endif
#ifndef BASED_STACK
#define BASED_STACK
#endif
// setup default code segment
#ifdef AFX_DEF_SEG
#pragma code_seg(AFX_DEF_SEG)
#endif
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,17 @@
// afxv_cfg.h - target configuration control for non-Microsoft compilers
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// You can define _AFX_PORTABLE in order to keep the library from using
// certain Microsoft extensions that are not commonly implemented by
// other compilers.
#define _AFX_PORTABLE
@@ -0,0 +1,45 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// afxv_cpu.h - target version/configuration control for non-Intel CPUs
#if !defined(_M_MRX000) && !defined(_M_ALPHA) && !defined(_M_PPC)
#error afxv_cpu.h is only for MIPS R4000, DEC AXP, and IBM PowerPC builds
#endif
/////////////////////////////////////////////////////////////////////////////
#ifdef _MIPS_
// specific overrides for MIPS...
#define _AFX_PACKING 8 // default MIPS alignment (required)
#endif //_MIPS_
/////////////////////////////////////////////////////////////////////////////
#ifdef _ALPHA_
// specific overrides for ALPHA...
#define _AFX_PACKING 8 // default AXP alignment (required)
#ifdef _AFX_NO_DEBUG_CRT
extern "C" void _BPT();
#pragma intrinsic(_BPT)
#define AfxDebugBreak() _BPT()
#else
#define AfxDebugBreak() _CrtDbgBreak()
#endif
#endif //_ALPHA_
/////////////////////////////////////////////////////////////////////////////
#ifdef _PPC_
// specific overrides for PPC...
#define _AFX_PACKING 8 // default PPC alignment (required)
#endif //_PPC_
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,53 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// special header for _AFXDLL variant.
// default AFX_XXX_DATA and AFX_XXX_DATADEF macros for using MFC DLLs
#ifndef AFX_CORE_DATA
#define AFX_CORE_DATA AFX_DATA_IMPORT
#define AFX_CORE_DATADEF
#endif
#ifndef AFX_OLE_DATA
#define AFX_OLE_DATA AFX_DATA_IMPORT
#define AFX_OLE_DATADEF
#endif
#ifndef AFX_DB_DATA
#define AFX_DB_DATA AFX_DATA_IMPORT
#define AFX_DB_DATADEF
#endif
#ifndef AFX_NET_DATA
#define AFX_NET_DATA AFX_DATA_IMPORT
#define AFX_NET_DATADEF
#endif
// default AFX_EXT_DATA and AFX_EXT_DATADEF macros for using or
// creating MFC extension DLLs, depending on _AFX_EXT_IMPL
// AFX_EXT_CLASS can be used to import or export entire classes
// in an extension DLL without the hassle of creating a .DEF file
// with decorated names.
#ifndef AFX_EXT_DATA
#ifdef _AFXEXT
#define AFX_EXT_CLASS AFX_CLASS_EXPORT
#define AFX_EXT_API AFX_API_EXPORT
#define AFX_EXT_DATA AFX_DATA_EXPORT
#define AFX_EXT_DATADEF
#else
#define AFX_EXT_CLASS AFX_CLASS_IMPORT
#define AFX_EXT_API AFX_API_IMPORT
#define AFX_EXT_DATA AFX_DATA_IMPORT
#define AFX_EXT_DATADEF
#endif
#endif
@@ -0,0 +1,216 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// afxv_w32.h - target version/configuration control for Win32
#ifdef _WINDOWS_
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
#endif
// STRICT is the only supported option (NOSTRICT is no longer supported)
#ifndef STRICT
#define STRICT 1
#endif
// certain parts of WINDOWS.H are necessary
#undef NOKERNEL
#undef NOGDI
#undef NOUSER
#undef NODRIVERS
#undef NOLOGERROR
#undef NOPROFILER
#undef NOMEMMGR
#undef NOLFILEIO
#undef NOOPENFILE
#undef NORESOURCE
#undef NOATOM
#undef NOLANGUAGE
#undef NOLSTRING
#undef NODBCS
#undef NOKEYBOARDINFO
#undef NOGDICAPMASKS
#undef NOCOLOR
#undef NOGDIOBJ
#undef NODRAWTEXT
#undef NOTEXTMETRIC
#undef NOSCALABLEFONT
#undef NOBITMAP
#undef NORASTEROPS
#undef NOMETAFILE
#undef NOSYSMETRICS
#undef NOSYSTEMPARAMSINFO
#undef NOMSG
#undef NOWINSTYLES
#undef NOWINOFFSETS
#undef NOSHOWWINDOW
#undef NODEFERWINDOWPOS
#undef NOVIRTUALKEYCODES
#undef NOKEYSTATES
#undef NOWH
#undef NOMENUS
#undef NOSCROLL
#undef NOCLIPBOARD
#undef NOICONS
#undef NOMB
#undef NOSYSCOMMANDS
#undef NOMDI
#undef NOCTLMGR
#undef NOWINMESSAGES
#ifndef WIN32
#define WIN32
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifdef _UNICODE
#ifndef UNICODE
#define UNICODE // UNICODE is used by Windows headers
#endif
#endif
#ifdef UNICODE
#ifndef _UNICODE
#define _UNICODE // _UNICODE is used by C-runtime/MFC headers
#endif
#endif
#ifdef VC_EXTRALEAN
#define WIN32_EXTRA_LEAN
#define NOSERVICE
#define NOMCX
#define NOIME
#define NOSOUND
#define NOCOMM
#define NOKANJI
#define NORPC
#define NOPROXYSTUB
#define NOIMAGE
#define NOTAPE
#ifndef NO_ANSIUNI_ONLY
#ifdef _UNICODE
#define UNICODE_ONLY
#else
#define ANSI_ONLY
#endif
#endif //!NO_ANSIUNI_ONLY
#endif //VC_EXTRALEAN
/////////////////////////////////////////////////////////////////////////////
// Turn off warnings for /W4
// To resume any of these warning: #pragma warning(default: 4xxx)
// which should be placed after the AFX include files
#ifndef ALL_WARNINGS
#pragma warning(disable: 4201) // winnt.h uses nameless structs
#endif
#define _WIN32_WINDOWS 0x0500
#include <windows.h>
#undef WM_MOUSELAST
#define WM_MOUSELAST 0x0209
#include <zmouse.h>
struct HKEY__;
typedef struct HKEY__ *HKEY;
#ifndef _INC_COMMCTRL
#include <commctrl.h>
// Note: We must avoid using TB_ADDBUTTONW and TB_INSERTBUTTONW in the Unicode
// build or else MFC42U.DLL will not be compatible with pre-IE4 versions of
// COMCTL32.DLL.
#ifdef TB_ADDBUTTONSA
#undef TB_ADDBUTTONS
#define TB_ADDBUTTONS TB_ADDBUTTONSA
#endif
#ifdef TB_INSERTBUTTONA
#undef TB_INSERTBUTTON
#define TB_INSERTBUTTON TB_INSERTBUTTONA
#endif
#endif
#ifndef EXPORT
#define EXPORT
#endif
#ifndef _INC_TCHAR
#include <tchar.h> // used for ANSI v.s. UNICODE abstraction
#endif
#ifdef _MBCS
#ifndef _INC_MBCTYPE
#include <mbctype.h>
#endif
#ifndef _INC_MBSTRING
#include <mbstring.h>
#endif
#endif
/////////////////////////////////////////////////////////////////////////////
// Now for the Windows API specific parts
// WM_CTLCOLOR for 16 bit API compatability
#define WM_CTLCOLOR 0x0019
// Win32 uses macros with parameters for this, which breaks C++ code.
#ifdef GetWindowTask
#undef GetWindowTask
AFX_INLINE HTASK GetWindowTask(HWND hWnd)
{ return (HTASK)::GetWindowThreadProcessId(hWnd, NULL); }
#endif
// Win32 uses macros with parameters for this, which breaks C++ code.
#ifdef GetNextWindow
#undef GetNextWindow
AFX_INLINE HWND GetNextWindow(HWND hWnd, UINT nDirection)
{ return ::GetWindow(hWnd, nDirection); }
#endif
// Avoid Win95 mapping CToolBar::DrawState to DrawState[A/W]
#ifdef DrawState
#undef DrawState
AFX_INLINE BOOL WINAPI DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC lpOutputFunc,
LPARAM lData, WPARAM wData, int x, int y, int cx, int cy, UINT fuFlags)
#ifdef UNICODE
{ return ::DrawStateW(hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy,
fuFlags); }
#else
{ return ::DrawStateA(hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy,
fuFlags); }
#endif
#endif
// Avoid Win95 mapping CStatusBar::DrawStatusText to DrawStatusText[A/W]
#ifdef DrawStatusText
#undef DrawStatusText
AFX_INLINE void WINAPI DrawStatusText(HDC hDC, LPRECT lprc, LPCTSTR szText,
UINT uFlags)
#ifdef UNICODE
{ ::DrawStatusTextW(hDC, lprc, szText, uFlags); }
#else
{ ::DrawStatusTextA(hDC, lprc, szText, uFlags); }
#endif
#endif
// FreeResource is not required on Win32 platforms
#undef FreeResource
AFX_INLINE BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; }
// UnlockResource is not required on Win32 platforms
#undef UnlockResource
AFX_INLINE int WINAPI UnlockResource(HGLOBAL) { return 0; }
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,404 @@
# This is a part of the Microsoft Foundation Classes C++ library.
# Copyright (C) 1992-1998 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.
# Common include for building MFC Sample programs
#
# typical usage
# PROJ=foo
# OBJS=foo.obj bar.obj ...
# !INCLUDE ..\..\SAMPLE_.MAK
#
# ROOT specifies the location of the msdev\samples\mfc directory,
# relative to the project directory. Because the MFC tutorial samples
# have an intermediate STEP<n> subdirectory, they use
# ROOT=..\..\..
# instead of the default
# ROOT=..\..
#
# NOTE: do not include 'stdafx.obj' in the OBJS list - the correctly
# built version will be included for you
#
# Options to NMAKE:
# "PLATFORM=?"
# This option chooses the appropriate tools and sources for the
# different platforms support by Windows/NT. Currently INTEL,
# MIPS, ALPHA, PPC are supported. The default is chosen based on
# the host environment.
# "DEBUG=0" use release (default debug)
# "CODEVIEW=1" include codeview info (even for release builds)
# "AFXDLL=1" to use shared DLL version of MFC
# "USRDLL=1" to build a DLL that uses static MFC
# "UNICODE=1" to build UNICODE enabled applications
# (not all samples support UNICODE)
# "NO_PCH=1" do not use precompiled headers (defaults to use pch)
# "COFF=1" include COFF symbols
!ifndef PROJ
!ERROR You forgot to define 'PROJ' symbol!!
!endif
ROOT=.
!ifndef ROOT
!endif
!ifndef OBJS
!ERROR You forgot to define 'OBJS' symbol!!
!endif
!ifndef DEBUG
DEBUG=1
!endif
!ifndef AFXDLL
AFXDLL=0
!endif
!ifndef UNICODE
UNICODE=0
!endif
!ifndef USRDLL
USRDLL=0
!endif
!if "$(USRDLL)" != "0"
AFXDLL=0
!endif
!ifndef PLATFORM
!ifndef PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITECTURE=x86
!endif
!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
PLATFORM=INTEL
!endif
!if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
PLATFORM=ALPHA
!endif
!if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
PLATFORM=MIPS
!endif
!if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
PLATFORM=PPC
!endif
!endif
!ifndef USES_OLE
USES_OLE=0
!endif
!ifndef USES_DB
USES_DB=0
!endif
!ifndef CONSOLE
CONSOLE=0
!endif
!ifndef MBCS
MBCS=1
!endif
!ifndef NO_PCH
NO_PCH=0
!endif
BASE=W
!if "$(UNICODE)" == "0"
!if "$(AFXDLL)" == "0"
!if "$(USRDLL)" != "1"
STDAFX=stdafx
!else
STDAFX=stdusr
!endif
!else
STDAFX=stddll
!endif
!endif
!if "$(UNICODE)" == "1"
!if "$(AFXDLL)" == "0"
!if "$(USRDLL)" != "1"
STDAFX=uniafx
!else
STDAFX=uniusr
!endif
!else
STDAFX=unidll
!endif
!endif
!if "$(DEBUG)" == "1"
STDAFX=$(STDAFX)d
!if "$(COFF)" != "1"
!ifndef CODEVIEW
CODEVIEW=1
!endif
!endif
!endif
!if "$(CODEVIEW)" == "1"
STDAFX=$(STDAFX)v
!endif
!if "$(DEBUG)" == "1"
DEBUG_SUFFIX=d
!endif
!if "$(DEBUG)" != "0"
DEBUGFLAGS=/Od
MFCDEFS=$(MFCDEFS) /D_DEBUG
!endif
!if "$(DEBUG)" == "0"
!if "$(PLATFORM)" == "INTEL"
DEBUGFLAGS=/O1 /Gy
!endif
!if "$(PLATFORM)" == "MIPS"
DEBUGFLAGS=/O1 /Gy
!endif
!if "$(PLATFORM)" == "ALPHA"
DEBUGFLAGS=/O1 /Gy
!endif
!if "$(PLATFORM)" == "PPC"
DEBUGFLAGS=/O1 /Gy
!endif
!endif # DEBUG == 0
!if "$(CODEVIEW)" == "1" || "$(COFF)" == "1"
DEBUGFLAGS=$(DEBUGFLAGS) /Z7
!endif
!if "$(UNICODE)" == "1"
DLL_SUFFIX=u
!endif
!if "$(AFXDLL)" == "1"
MFCFLAGS=$(MFCFLAGS) /MD$(DEBUG_SUFFIX)
MFCDEFS=$(MFCDEFS) /D_AFXDLL
!endif # AFXDLL == 1
!if "$(USRDLL)" == "1"
MFCDEFS=$(MFCDEFS) /D_USRDLL /D_WINDLL
!endif
!if "$(AFXDLL)" == "0"
!if "$(MD)" == "1"
MFCFLAGS=$(MFCFLAGS) /MD$(DEBUG_SUFFIX)
!elseif "$(MT)" == "0"
MFCFLAGS=$(MFCFLAGS) /ML$(DEBUG_SUFFIX)
!else
MFCFLAGS=$(MFCFLAGS) /MT$(DEBUG_SUFFIX)
!endif
!endif
!if "$(UNICODE)" == "1"
MFCDEFS=$(MFCDEFS) /D_UNICODE
!else
!if "$(MBCS)" == "1"
MFCDEFS=$(MFCDEFS) /D_MBCS
!endif
!endif
!if "$(PLATFORM)" == "INTEL"
MFCDEFS=$(MFCDEFS) /D_X86_
CPP=cl
CFLAGS=/GX /c /W3 $(DEBUGFLAGS) $(MFCFLAGS) $(MFCDEFS)
!endif
!if "$(PLATFORM)" == "MIPS"
MFCDEFS=$(MFCDEFS) /D_MIPS_
CPP=cl
CFLAGS=/GX /c /W3 $(DEBUGFLAGS) $(MFCFLAGS) $(MFCDEFS)
!endif
!if "$(PLATFORM)" == "ALPHA"
MFCDEFS=$(MFCDEFS) /D_ALPHA_
CPP=cl
CFLAGS=/GX /c /W3 $(DEBUGFLAGS) $(MFCFLAGS) $(MFCDEFS)
!endif
!if "$(PLATFORM)" == "PPC"
MFCDEFS=$(MFCDEFS) /D_PPC_
!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
CPP=mcl
!else
CPP=cl
!endif
CFLAGS=/GX /c /W3 $(DEBUGFLAGS) $(MFCFLAGS) $(MFCDEFS)
!endif
CPPMAIN_FLAGS=$(CFLAGS)
!if "$(NO_PCH)" == "1"
CPPFLAGS=$(CPPMAIN_FLAGS)
!else
PCHDIR=.
CPPFLAGS=$(CPPMAIN_FLAGS) /Yustdafx.h /Fp$(PCHDIR)\$(STDAFX).pch
!endif
!if "$(COFF)" == "1"
NO_PDB=1
!if "$(CODEVIEW)" != "1"
LINKDEBUG=/incremental:no /debug:full /debugtype:coff
!else
LINKDEBUG=/incremental:no /debug:full /debugtype:both
!endif
!endif
!if "$(COFF)" != "1"
!if "$(CODEVIEW)" == "1"
LINKDEBUG=/incremental:no /debug:full /debugtype:cv
!else
LINKDEBUG=/incremental:no /debug:none
!endif
!endif
!if "$(NO_PDB)" == "1"
LINKDEBUG=$(LINKDEBUG) /pdb:none
!endif
!if "$(PLATFORM)" == "INTEL"
LINKCMD=link $(LINKDEBUG)
!endif
!if "$(PLATFORM)" == "MIPS"
LINKCMD=link $(LINKDEBUG)
!endif
!if "$(PLATFORM)" == "ALPHA"
LINKCMD=link $(LINKDEBUG)
!endif
!if "$(PLATFORM)" == "PPC"
LINKCMD=link $(LINKDEBUG)
!endif
# link flags - must be specified after $(LINKCMD)
#
# conflags : creating a character based console application
# guiflags : creating a GUI based "Windows" application
CONFLAGS=/subsystem:console
GUIFLAGS=/subsystem:windows
!if "$(UNICODE)" == "1"
CONFLAGS=$(CONFLAGS) /entry:wmainCRTStartup
GUIFLAGS=$(GUIFLAGS) /entry:wWinMainCRTStartup
!endif
PROJRESFILE=$(PROJ).res
RESFILE=$(PROJRESFILE)
.SUFFIXES:
.SUFFIXES: .c .cpp .rcm .rc
.cpp.obj:
$(CPP) @<<
$(CPPFLAGS) $*.cpp
<<
.c.obj:
$(CPP) @<<
$(CFLAGS) $(CVARS) $*.c
<<
.rc.res:
rc /r $(MFCDEFS) $<
#############################################################################
!if "$(NO_PCH)" == "0"
LINK_OBJS=$(OBJS) $(PCHDIR)\$(STDAFX).obj
!else
LINK_OBJS=$(OBJS)
!endif
#
# Build CONSOLE Win32 application
#
!if "$(CONSOLE)" == "1"
$(PROJ).exe: $(LINK_OBJS)
$(LINKCMD) @<<
$(CONFLAGS) /out:$(PROJ).exe /map:$(PROJ).map
$(LINK_OBJS) $(EXTRA_LIBS)
<<
!endif # CONSOLE=1
#
# Build Win32 application
#
!if "$(CONSOLE)" == "0"
!if "$(USRDLL)" == "1"
$(PROJ).dll: $(LINK_OBJS) $(PROJRESFILE)
$(LINKCMD) @<<
$(GUIFLAGS) /out:$(PROJ).dll /map:$(PROJ).map
/dll /def:$(PROJ).def
$(LINK_OBJS) $(RESFILE) $(EXTRA_LIBS)
<<
$(PROJ).res: resource.h
$(PROJ).rsc: resource.h
!endif
!if "$(SIMPLE_APP)" != "1"
$(PROJ).exe: $(LINK_OBJS) $(PROJRESFILE)
$(LINKCMD) @<<
$(GUIFLAGS) /out:$(PROJ).exe /map:$(PROJ).map
$(LINK_OBJS) $(RESFILE) $(EXTRA_LIBS)
<<
$(PROJ).res: resource.h
$(PROJ).rsc: resource.h
!endif
!if "$(SIMPLE_APP)" == "1"
$(PROJ).exe: $(LINK_OBJS)
$(LINKCMD) @<<
$(GUIFLAGS) /out:$(PROJ).exe /map:$(PROJ).map
$(LINK_OBJS) $(EXTRA_LIBS)
<<
!endif
!if "$(NO_PCH)" == "0"
$(PCHDIR)\$(STDAFX).obj $(PCHDIR)\$(STDAFX).pch: stdafx.h stdafx.cpp
echo "BUILDING SHARED PCH and PCT files"
$(CPP) @<<
$(CPPMAIN_FLAGS) /Ycstdafx.h /Fp$(PCHDIR)\$(STDAFX).pch /Fo$(PCHDIR)\$(STDAFX).obj /c $(ROOT)\stdafx.cpp
<<
$(OBJS): $(PCHDIR)\$(STDAFX).pch
!endif
!endif # CONSOLE=0
clean::
if exist $(PROJ).exe erase $(PROJ).exe
if exist *.aps erase *.aps
if exist *.pch erase *.pch
if exist *.map erase *.map
if exist *.obj erase *.obj
if exist *.exp erase *.exp
if exist *.pdb erase *.pdb
if exist *.map erase *.map
if exist *.lib erase *.lib
if exist *.res erase *.res
if exist *.rsc erase *.rsc
if exist *.pef erase *.pef
#############################################################################
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,45 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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.
// winres.h - Windows resource definitions
// extracted from WINUSER.H and COMMCTRL.H
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#define VS_VERSION_INFO 1
#ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
#endif
#ifndef WINVER
#define WINVER 0x0400 // default to Windows Version 4.0
#endif
#include <winresrc.h>
// operation messages sent to DLGINIT
#define LB_ADDSTRING (WM_USER+1)
#define CB_ADDSTRING (WM_USER+3)
#ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS
#endif
#ifdef IDC_STATIC
#undef IDC_STATIC
#endif
#define IDC_STATIC (-1)
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif
@@ -0,0 +1,284 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXCTL_RC__
#define __AFXCTL_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< 不能更改标准 MFC 资源! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// OLE Control Resources
#ifndef _AFX_NO_STOCKPPG_RESOURCES
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
AFX_IDB_TRUETYPE BITMAP DISCARDABLE "RES\\TRUETYPE.BMP"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
AFX_IDD_PROPPAGE_FONT DIALOG DISCARDABLE 13, 54, 250, 110
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "特性名(&N)",IDC_STATIC,3,5,61,8
COMBOBOX AFX_IDC_FONTPROP,65,3,100,71,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "字体(&F)",IDC_STATIC,3,19,91,8
COMBOBOX AFX_IDC_FONTNAMES,3,29,91,77,CBS_SIMPLE |
CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT |
CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL |
WS_TABSTOP
LTEXT "字形(&Y)",IDC_STATIC,102,19,53,8
COMBOBOX AFX_IDC_FONTSTYLES,104,29,53,53,CBS_DROPDOWNLIST |
CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "大小(&S)",IDC_STATIC,167,19,40,8
COMBOBOX AFX_IDC_FONTSIZES,167,29,36,53,CBS_DROPDOWN | CBS_SORT |
CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
GROUPBOX "效果",IDC_STATIC,104,44,142,24,WS_GROUP
CONTROL "删除线(&K)",AFX_IDC_STRIKEOUT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,109,55,65,10
CONTROL "下划线(&U)",AFX_IDC_UNDERLINE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,175,55,65,10
GROUPBOX "字体范例",IDC_STATIC,104,71,142,36,WS_GROUP
CTEXT "AaBbYyZz",AFX_IDC_SAMPLEBOX,110,80,130,22,SS_NOPREFIX |
NOT WS_VISIBLE
END
AFX_IDD_PROPPAGE_COLOR DIALOG DISCARDABLE 0, 0, 250, 62
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "特性名(&N)",IDC_STATIC,3,3,100,8
COMBOBOX AFX_IDC_COLORPROP,3,13,100,54,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "系统颜色(&C)",IDC_STATIC,3,29,100,8
COMBOBOX AFX_IDC_SYSTEMCOLORS,3,39,100,54,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",AFX_IDC_COLOR_BLACK,"Button",BS_OWNERDRAW | WS_GROUP |
WS_TABSTOP,118,4,15,11
CONTROL "",AFX_IDC_COLOR_BLUE,"Button",BS_OWNERDRAW,138,4,15,11
CONTROL "",AFX_IDC_COLOR_CYAN,"Button",BS_OWNERDRAW,158,4,15,11
CONTROL "",AFX_IDC_COLOR_DARKBLUE,"Button",BS_OWNERDRAW,178,4,15,
11
CONTROL "",AFX_IDC_COLOR_DARKCYAN,"Button",BS_OWNERDRAW,118,18,
15,11
CONTROL "",AFX_IDC_COLOR_DARKGREEN,"Button",BS_OWNERDRAW,138,18,
15,11
CONTROL "",AFX_IDC_COLOR_DARKMAGENTA,"Button",BS_OWNERDRAW,158,
18,15,11
CONTROL "",AFX_IDC_COLOR_GRAY,"Button",BS_OWNERDRAW,178,18,15,11
CONTROL "",AFX_IDC_COLOR_DARKRED,"Button",BS_OWNERDRAW,118,32,15,
11
CONTROL "",AFX_IDC_COLOR_GREEN,"Button",BS_OWNERDRAW,138,32,15,
11
CONTROL "",AFX_IDC_COLOR_LIGHTBROWN,"Button",BS_OWNERDRAW,158,32,
15,11
CONTROL "",AFX_IDC_COLOR_LIGHTGRAY,"Button",BS_OWNERDRAW,178,32,
15,11
CONTROL "",AFX_IDC_COLOR_MAGENTA,"Button",BS_OWNERDRAW,118,46,15,
11
CONTROL "",AFX_IDC_COLOR_RED,"Button",BS_OWNERDRAW,138,46,15,11
CONTROL "",AFX_IDC_COLOR_WHITE,"Button",BS_OWNERDRAW,158,46,15,
11
CONTROL "",AFX_IDC_COLOR_YELLOW,"Button",BS_OWNERDRAW,178,46,15,
11
END
AFX_IDD_PROPPAGE_PICTURE DIALOG DISCARDABLE 0, 0, 250, 62
STYLE WS_CHILD | 0x4
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "特性名(&N)",IDC_STATIC,3,3,100,8
COMBOBOX AFX_IDC_PROPNAME,3,13,100,30,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "浏览(&B)...",AFX_IDC_BROWSE,3,35,54,14
PUSHBUTTON "清除(&C)",AFX_IDC_CLEAR,61,35,54,14
RTEXT "预阅:",IDC_STATIC,107,3,42,16
CONTROL "",AFX_IDC_PICTURE,"Static",SS_BLACKFRAME,151,4,93,54
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
AFX_IDD_PROPPAGE_FONT DLGINIT
BEGIN
1002, 0x403, 12, 0
0x6f42, 0x646c, 0x4920, 0x6174, 0x696c, 0x0063,
0
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_PROPPAGE_UNKNOWN "(未知)"
AFX_IDS_COLOR_DESKTOP "台式"
AFX_IDS_COLOR_APPWORKSPACE "应用程序工作区"
AFX_IDS_COLOR_WNDBACKGND "窗口背景"
AFX_IDS_COLOR_WNDTEXT "窗口文本"
AFX_IDS_COLOR_MENUBAR "菜单栏"
AFX_IDS_COLOR_MENUTEXT "菜单文字"
AFX_IDS_COLOR_ACTIVEBAR "活动的标题栏"
AFX_IDS_COLOR_INACTIVEBAR "不活动的标题栏"
AFX_IDS_COLOR_ACTIVETEXT "活动的标题栏文字"
AFX_IDS_COLOR_INACTIVETEXT "不活动的标题栏文字"
AFX_IDS_COLOR_ACTIVEBORDER "活动边框"
AFX_IDS_COLOR_INACTIVEBORDER "不活动边框"
END
#endif // !_AFX_NO_STOCKPPG_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_COLOR_WNDFRAME "窗口框架"
AFX_IDS_COLOR_SCROLLBARS "卷动条"
AFX_IDS_COLOR_BTNFACE "按钮表面"
AFX_IDS_COLOR_BTNSHADOW "按钮阴影"
AFX_IDS_COLOR_BTNTEXT "按钮文字"
AFX_IDS_COLOR_BTNHIGHLIGHT "按钮突出"
AFX_IDS_COLOR_DISABLEDTEXT "失效文字"
AFX_IDS_COLOR_HIGHLIGHT "突出"
AFX_IDS_COLOR_HIGHLIGHTTEXT "突出的文字"
AFX_IDS_REGULAR "正常体"
AFX_IDS_BOLD "黑体"
AFX_IDS_ITALIC "斜体"
AFX_IDS_BOLDITALIC "黑斜体"
AFX_IDS_SAMPLETEXT "AaBbYyZz"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_DISPLAYSTRING_FONT "(字体)"
AFX_IDS_DISPLAYSTRING_COLOR "(颜色)"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_DISPLAYSTRING_PICTURE "(图片 - %s)"
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_PICTUREFILTER "所有图片类型|*.bmp;*.cur;*.dib;*.emf;*.ico;*.wmf|Bitmaps (*.bmp;*.dib)|*.bmp;*.dib|Icons/Cursors (*.ico;*.cur)|*.ico;*.cur|Metafiles (*.wmf;*.emf)|*.wmf;*.emf|所有文件(*.*)|*.*||"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_PICTYPE_UNKNOWN "未知"
AFX_IDS_PICTYPE_NONE "无"
AFX_IDS_PICTYPE_BITMAP "位图"
AFX_IDS_PICTYPE_METAFILE "元文件"
AFX_IDS_PICTYPE_ICON "图标"
#ifndef _AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_COLOR_PPG "颜色特性页"
AFX_IDS_COLOR_PPG_CAPTION "颜色"
AFX_IDS_FONT_PPG "字体特性页"
AFX_IDS_FONT_PPG_CAPTION "字体"
AFX_IDS_PICTURE_PPG "图片特性页"
AFX_IDS_PICTURE_PPG_CAPTION "图片"
#endif // !_AFX_NO_STOCKPPG_RESOURCES
AFX_IDS_BORDERSTYLE_0 "0 - 无"
AFX_IDS_BORDERSTYLE_1 "1 - 固定单个"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_VERB_EDIT "编辑(&E)"
AFX_IDS_VERB_PROPERTIES "特性(&P)..."
END
#ifndef _AFX_NO_STOCKPPG_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_PICTURECANTOPEN "无法打开图片文件 %1。此文件可能不存在或不可读。"
AFX_IDP_PICTURECANTLOAD "无法装入图片文件 %1。该文件可能格式不正确。"
AFX_IDP_PICTURETOOLARGE "无法装入图片文件 %1。该文件太大内存无法容纳。"
AFX_IDP_PICTUREREADFAILED
"无法装入图片文件 %1。未予具体说明的读操作失败。"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_PICTUREBROWSETITLE "浏览图片"
END
#endif // !_AFX_NO_STOCKPPG_RESOURCES
#ifndef _AFX_NO_CTLERROR_RESOURCES
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_ILLEGALFUNCTIONCALL "非法函数调用"
AFX_IDP_E_OVERFLOW "溢出"
AFX_IDP_E_OUTOFMEMORY "内存不足"
AFX_IDP_E_DIVISIONBYZERO "被零除"
AFX_IDP_E_OUTOFSTRINGSPACE "字符串空间不足"
AFX_IDP_E_OUTOFSTACKSPACE "堆栈空间不足"
AFX_IDP_E_BADFILENAMEORNUMBER "文件名或文件号错"
AFX_IDP_E_FILENOTFOUND "文件未找到"
AFX_IDP_E_BADFILEMODE "文件模式错"
AFX_IDP_E_FILEALREADYOPEN "文件已经打开"
AFX_IDP_E_DEVICEIOERROR "设备输入/输出出错"
AFX_IDP_E_FILEALREADYEXISTS "文件已经存在"
AFX_IDP_E_BADRECORDLENGTH "记录长度错"
AFX_IDP_E_DISKFULL "磁盘已满"
AFX_IDP_E_BADRECORDNUMBER "记录号码错"
AFX_IDP_E_BADFILENAME "文件名错"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_TOOMANYFILES "文件太多"
AFX_IDP_E_DEVICEUNAVAILABLE "设备不适合"
AFX_IDP_E_PERMISSIONDENIED "未获得许可"
AFX_IDP_E_DISKNOTREADY "磁盘未准备好"
AFX_IDP_E_PATHFILEACCESSERROR "路径/文件访问错误"
AFX_IDP_E_PATHNOTFOUND "没有找到路径"
AFX_IDP_E_INVALIDPATTERNSTRING "无效的字符串型样"
AFX_IDP_E_INVALIDUSEOFNULL "空值使用不当"
AFX_IDP_E_INVALIDFILEFORMAT "无效的文件格式"
AFX_IDP_E_INVALIDPROPERTYVALUE "无效的特性值"
AFX_IDP_E_INVALIDPROPERTYARRAYINDEX "无效的数组下标"
AFX_IDP_E_SETNOTSUPPORTEDATRUNTIME "该特性在运行时刻不能设置"
AFX_IDP_E_SETNOTSUPPORTED "该特性为只读特性"
AFX_IDP_E_NEEDPROPERTYARRAYINDEX
"使用特性数组时必须指明数组下标"
AFX_IDP_E_SETNOTPERMITTED "不可在这个控制上设置特性"
AFX_IDP_E_GETNOTSUPPORTEDATRUNTIME "该特性不可在运行时刻读取"
END
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_E_GETNOTSUPPORTED "该特性为只写特性"
AFX_IDP_E_PROPERTYNOTFOUND "没有找到特性"
AFX_IDP_E_INVALIDCLIPBOARDFORMAT "无效的剪贴板格式"
AFX_IDP_E_INVALIDPICTURE "无效图片"
AFX_IDP_E_PRINTERERROR "打印机出错"
AFX_IDP_E_CANTSAVEFILETOTEMP
"无法创建存贮过程所需要的临时文件"
AFX_IDP_E_SEARCHTEXTNOTFOUND "没有找到要查找的文本"
AFX_IDP_E_REPLACEMENTSTOOLONG "要替换的文本太长"
END
#endif //!_AFX_NO_CTLERROR_RESOURCES
#endif //!_AFXDLL
#endif //__AFXOLECL_RC__
@@ -0,0 +1,105 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXDB_RC__
#define __AFXDB_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< 不能更改标准 MFC 资源! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// Database Resources
// Database strings
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_SQL_CONNECT_FAIL
"试图连接数据源失败"
AFX_IDP_SQL_RECORDSET_FORWARD_ONLY
"记录集仅支持向前移动。"
AFX_IDP_SQL_EMPTY_COLUMN_LIST
"试图打开表格失败—未指明要检索的列。"
AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH
"查询返回的列数据类型与期望不符。"
AFX_IDP_SQL_ILLEGAL_MODE "更新或删除的企图失败了。"
AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED "多行数据被更新。"
AFX_IDP_SQL_NO_CURRENT_RECORD "操作失败,无当前记录。"
AFX_IDP_SQL_NO_ROWS_AFFECTED
"更新或删除操作未涉及任何数据行。"
AFX_IDP_SQL_RECORDSET_READONLY "记录集是只读"
AFX_IDP_SQL_SQL_NO_TOTAL
"ODBC 驱动程序不支持 Microsoft 基础类长二进制数据模型。"
AFX_IDP_SQL_ODBC_LOAD_FAILED
"装入所需的 ODBC32.DLL 部件的企图失败。"
AFX_IDP_SQL_DYNASET_NOT_SUPPORTED
"ODBC 驱动程序不支持动态记录集。"
AFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED
"要支持快照功能,ODBC 静态游标是必要的。"
AFX_IDP_SQL_API_CONFORMANCE
"ODBC 驱动程序与 Microsoft 基础类数据库类不匹配 (API_CONFORMANCE >= SQL_OAC_LEVEL1 必须成立)。"
AFX_IDP_SQL_SQL_CONFORMANCE
"ODBC 驱动程序与 Microsoft 基础类数据库类不匹配 (API_CONFORMANCE >= SQL_OAC_MINIMUM 必须成立)。"
AFX_IDP_SQL_NO_DATA_FOUND
"试图越过数据的有效存贮区间。"
AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED
"ODBC 驱动程序不支持动态记录集。"
AFX_IDP_SQL_ODBC_V2_REQUIRED
"需要符合 ODBC 的二级标准的驱动程序。"
AFX_IDP_SQL_NO_POSITIONED_UPDATES
"ODBC 驱动程序不支持定位更新。"
AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED
"不支持所要求的锁模式。"
AFX_IDP_SQL_DATA_TRUNCATED
"数据被截断。"
AFX_IDP_SQL_ROW_FETCH
"检索记录出错。"
AFX_IDP_SQL_INCORRECT_ODBC
"没有找到所需的 ODBC 进入点。确保 ODBC 安装正确。"
AFX_IDP_SQL_UPDATE_DELETE_FAILED
"更新或删除操作失败。"
AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED
"“ODBC驱动程序不支持动态指针。”"
AFX_IDP_SQL_FIELD_NOT_FOUND
"无效的字段名或字段索引。"
AFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED
"书签不被 ODBC 驱动程序支持。"
AFX_IDP_SQL_BOOKMARKS_NOT_ENABLED
"书签在记录集中未激活。"
AFX_IDP_DAO_ENGINE_INITIALIZATION
"“无法对DAO/Jet db引擎进行初始化。”"
AFX_IDP_DAO_DFX_BIND
"“错的DFX值参数。”"
AFX_IDP_DAO_OBJECT_NOT_OPEN
"“DAO TableDef或QueryDef没有打开。”"
AFX_IDP_DAO_ROWTOOSHORT
"“GetRows 失败。分配给行的内存不够。”"
AFX_IDP_DAO_BADBINDINFO
"“GetRows 赋值错误。可能是数据类型不匹配造成的。”"
AFX_IDP_DAO_COLUMNUNAVAILABLE
"“GetRows 失败。所请求的列不是该记录值的一个成分。”"
AFX_IDS_DELETED "<已删除>"
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXDB_RC__
@@ -0,0 +1,45 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXISAPI_RC__
#define __AFXISAPI_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< 不能改变标准的MFC资源! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// ISAPI HTML Text for HTTP error conditions
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDS_HTTP_TITLE "<HEAD><TITLE>HTTP 错误 %d</TITLE></HEAD>"
AFX_IDS_HTTP_NO_TEXT "<BODY><H1>HTTP 错误 %d: 无可用消息</H1></BODY>\r\n"
AFX_IDS_HTTP_BAD_REQUEST "<BODY><H1>无效请求</H1><P>客户端发出一个服务器无法处理的请求.<br>请求: %s\r\n"
AFX_IDS_HTTP_AUTH_REQUIRED "<BODY><H1>需要鉴定</H1><P>浏览器无鉴定功能或鉴定失败.</BODY>\r\n"
AFX_IDS_HTTP_FORBIDDEN "<BODY><H1>禁止</H1><P>客户没有权限从服务器获取该URL.</BODY>\r\n"
AFX_IDS_HTTP_NOT_FOUND "<BODY><H1>没有发现</H1><P>在该服务器上没有发现所请求的URL.</BODY>\r\n"
AFX_IDS_HTTP_SERVER_ERROR "<BODY><H1>服务器错误</H1>服务器遇到内部错误或错误配置无法完成该请求.</BODY>\r\n"
AFX_IDS_HTTP_NOT_IMPLEMENTED "<BODY><H1>没有实现</H1>服务器无法执行该方法 <b>%s</b> 此时.</BODY>\r\n"
END
#endif //!_AFXDLL
#endif //!__AFXISAPI_RC__
@@ -0,0 +1,66 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 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 __AFXOLECL_RC__
#define __AFXOLECL_RC__
#ifndef __AFXRES_H__
#include <afxres.h>
#endif
#ifndef _INC_DLGS
#include <dlgs.h>
#endif
#ifdef APSTUDIO_INVOKED
// This will prevent the VC++ Resource Editor user from saving this file
1 TEXTINCLUDE DISCARDABLE
BEGIN
"< 不能更改标准 MFC 资源! >\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _AFXDLL
/////////////////////////////////////////////////////////////////////////////
// OLE Client Resources
/////////////////////////////////////////////////////////////////////////////
// OLE strings
STRINGTABLE DISCARDABLE
BEGIN
AFX_IDP_STATIC_OBJECT "无法激活静止的 AciveX 对象。"
AFX_IDP_FAILED_TO_CONNECT "连接失败。\n链接可能已经断了。"
AFX_IDP_SERVER_BUSY "无法处理命令,服务器程序正忙。"
AFX_IDP_BAD_VERB "执行服务器程序操作失败。"
AFX_IDP_FAILED_TO_LAUNCH "启动服务器应用程序失败。"
AFX_IDS_UPDATING_ITEMS "更新 ActiveX 对象"
AFX_IDP_FAILED_TO_CONVERT "转换 ActiveX 对象失败。"
AFX_IDP_ASK_TO_DISCARD "当正在退出 Windows 时,无法保存 ActiveX 对象!\n放弃对 %1 所做的所有的修改吗?"
AFX_IDP_FAILED_TO_CREATE "创建对象失败。请确认应用程序已在系统注册表中注册。"
AFX_IDS_METAFILE_FORMAT "图片(元文件)\n一幅图片"
AFX_IDS_DIB_FORMAT "设备独立位图\n一幅设备独立位图"
AFX_IDS_BITMAP_FORMAT "位图\n一幅位图"
AFX_IDS_LINKSOURCE_FORMAT "%s\n%s"
AFX_IDS_EMBED_FORMAT "%s\n%s"
AFX_IDS_RTF_FORMAT "强化文本(RTF)\n字体和段落格式化的文本"
AFX_IDS_TEXT_FORMAT "未格式化文本\n未经过任何格式化的文本"
AFX_IDS_INVALID_CURRENCY "无效的货币。"
AFX_IDS_INVALID_DATETIME "无效的日期时间。"
AFX_IDS_INVALID_DATETIMESPAN "无效的日期时间跨度。"
END
/////////////////////////////////////////////////////////////////////////////
#endif //!_AFXDLL
#endif //__AFXOLECL_RC__

Some files were not shown because too many files have changed in this diff Show More