📄 afximpl.000
字号:
/////////////////////////////////////////////////////////////////////////////
// AFX_CRITICAL_SECTION
#undef AFX_DATA
#define AFX_DATA AFX_CORE_DATA
#ifdef _MAC
// WLM makes critical sections in the operating system
// a no-op. This class stubs to nothing in _MAC builds
// so that no extra useless code is referenced by MFC.
#pragma warning(disable: 4097)
class CCriticalSection
{
public:
CCriticalSection() { };
~CCriticalSection() { };
BOOL Lock() { return TRUE; };
BOOL Unlock() { return TRUE; };
};
#endif // _MAC
// these globals are protected by the same critical section
#define CRIT_DYNLINKLIST 0
#define CRIT_RUNTIMECLASSLIST 0
#define CRIT_OBJECTFACTORYLIST 0
#define CRIT_LOCKSHARED 0
// these globals are not protected by independent critical sections
#define CRIT_REGCLASSLIST 1
#define CRIT_WAITCURSOR 2
#define CRIT_DROPSOURCE 3
#define CRIT_DROPTARGET 4
#define CRIT_RECTTRACKER 5
#define CRIT_EDITVIEW 6
#define CRIT_WINMSGCACHE 7
#define CRIT_HALFTONEBRUSH 8
#define CRIT_SPLITTERWND 9
#define CRIT_MINIFRAMEWND 10
#define CRIT_CTLLOCKLIST 11
#define CRIT_DYNDLLLOAD 12
#define CRIT_TYPELIBCACHE 13
#define CRIT_STOCKMASK 14
#define CRIT_ODBC 15
#define CRIT_PROCESSLOCAL 16
#define CRIT_MAX 17 // Note: above plus one!
#ifdef _MT
void AFXAPI AfxLockGlobals(int nLockType);
void AFXAPI AfxUnlockGlobals(int nLockType);
BOOL AFXAPI AfxCriticalInit();
void AFXAPI AfxCriticalTerm();
#else
#define AfxLockGlobals(nLockType)
#define AfxUnlockGlobals(nLockType)
#define AfxCriticalInit() (TRUE)
#define AfxCriticalTerm()
#endif
/////////////////////////////////////////////////////////////////////////////
// Portability abstractions
#define _AfxSetDlgCtrlID(hWnd, nID) SetWindowLong(hWnd, GWL_ID, nID)
#define _AfxGetDlgCtrlID(hWnd) ((UINT)(WORD)::GetDlgCtrlID(hWnd))
// misc helpers
BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
BOOL AFXAPI AfxComparePath(LPCTSTR lpszPath1, LPCTSTR lpszPath2);
UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
UINT AFXAPI AfxGetFileName(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
void AFX_CDECL AfxTimeToFileTime(const CTime& time, LPFILETIME pFileTime);
void AFXAPI AfxGetRoot(LPCTSTR lpszPath, CString& strRoot);
#ifndef _AFX_NO_OLE_SUPPORT
class AFX_COM
{
public:
AFX_COM() {m_hInst = NULL;}
~AFX_COM();
HINSTANCE m_hInst;
HRESULT CreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
REFIID riid, LPVOID* ppv);
HRESULT GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);
};
CString AFXAPI AfxStringFromCLSID(REFCLSID rclsid);
BOOL AFXAPI AfxGetInProcServer(LPCTSTR lpszCLSID, CString& str);
#endif
#ifndef _MAC
BOOL AFXAPI AfxResolveShortcut(CWnd* pWnd, LPCTSTR pszShortcutFile,
LPTSTR pszPath, int cchPath);
#endif
#ifdef _MAC
#define AfxGetFileName AfxGetFileTitle
#endif
#define NULL_TLS ((DWORD)-1)
/////////////////////////////////////////////////////////////////////////////
// Message map and message dispatch
const AFX_MSGMAP_ENTRY* AFXAPI
AfxFindMessageEntry(const AFX_MSGMAP_ENTRY* lpEntry,
UINT nMsg, UINT nCode, UINT nID);
union MessageMapFunctions
{
AFX_PMSG pfn; // generic member function pointer
// specific type safe variants for WM_COMMAND and WM_NOTIFY messages
void (AFX_MSG_CALL CCmdTarget::*pfn_COMMAND)();
BOOL (AFX_MSG_CALL CCmdTarget::*pfn_bCOMMAND)();
void (AFX_MSG_CALL CCmdTarget::*pfn_COMMAND_RANGE)(UINT);
BOOL (AFX_MSG_CALL CCmdTarget::*pfn_COMMAND_EX)(UINT);
void (AFX_MSG_CALL CCmdTarget::*pfn_UPDATE_COMMAND_UI)(CCmdUI*);
void (AFX_MSG_CALL CCmdTarget::*pfn_UPDATE_COMMAND_UI_RANGE)(CCmdUI*, UINT);
void (AFX_MSG_CALL CCmdTarget::*pfn_OTHER)(void*);
BOOL (AFX_MSG_CALL CCmdTarget::*pfn_OTHER_EX)(void*);
void (AFX_MSG_CALL CCmdTarget::*pfn_NOTIFY)(NMHDR*, LRESULT*);
BOOL (AFX_MSG_CALL CCmdTarget::*pfn_bNOTIFY)(NMHDR*, LRESULT*);
void (AFX_MSG_CALL CCmdTarget::*pfn_NOTIFY_RANGE)(UINT, NMHDR*, LRESULT*);
BOOL (AFX_MSG_CALL CCmdTarget::*pfn_NOTIFY_EX)(UINT, NMHDR*, LRESULT*);
// type safe variant for thread messages
void (AFX_MSG_CALL CWinThread::*pfn_THREAD)(WPARAM, LPARAM);
// specific type safe variants for WM-style messages
BOOL (AFX_MSG_CALL CWnd::*pfn_bD)(CDC*);
BOOL (AFX_MSG_CALL CWnd::*pfn_bb)(BOOL);
BOOL (AFX_MSG_CALL CWnd::*pfn_bWww)(CWnd*, UINT, UINT);
BOOL (AFX_MSG_CALL CWnd::*pfn_bHELPINFO)(HELPINFO*);
BOOL (AFX_MSG_CALL CWnd::*pfn_bWCDS)(CWnd*, COPYDATASTRUCT*);
HBRUSH (AFX_MSG_CALL CWnd::*pfn_hDWw)(CDC*, CWnd*, UINT);
HBRUSH (AFX_MSG_CALL CWnd::*pfn_hDw)(CDC*, UINT);
int (AFX_MSG_CALL CWnd::*pfn_iwWw)(UINT, CWnd*, UINT);
int (AFX_MSG_CALL CWnd::*pfn_iww)(UINT, UINT);
int (AFX_MSG_CALL CWnd::*pfn_iWww)(CWnd*, UINT, UINT);
int (AFX_MSG_CALL CWnd::*pfn_is)(LPTSTR);
LRESULT (AFX_MSG_CALL CWnd::*pfn_lwl)(WPARAM, LPARAM);
LRESULT (AFX_MSG_CALL CWnd::*pfn_lwwM)(UINT, UINT, CMenu*);
void (AFX_MSG_CALL CWnd::*pfn_vv)(void);
void (AFX_MSG_CALL CWnd::*pfn_vw)(UINT);
void (AFX_MSG_CALL CWnd::*pfn_vww)(UINT, UINT);
void (AFX_MSG_CALL CWnd::*pfn_vvii)(int, int);
void (AFX_MSG_CALL CWnd::*pfn_vwww)(UINT, UINT, UINT);
void (AFX_MSG_CALL CWnd::*pfn_vwii)(UINT, int, int);
void (AFX_MSG_CALL CWnd::*pfn_vwl)(WPARAM, LPARAM);
void (AFX_MSG_CALL CWnd::*pfn_vbWW)(BOOL, CWnd*, CWnd*);
void (AFX_MSG_CALL CWnd::*pfn_vD)(CDC*);
void (AFX_MSG_CALL CWnd::*pfn_vM)(CMenu*);
void (AFX_MSG_CALL CWnd::*pfn_vMwb)(CMenu*, UINT, BOOL);
void (AFX_MSG_CALL CWnd::*pfn_vW)(CWnd*);
void (AFX_MSG_CALL CWnd::*pfn_vWww)(CWnd*, UINT, UINT);
void (AFX_MSG_CALL CWnd::*pfn_vWp)(CWnd*, CPoint);
void (AFX_MSG_CALL CWnd::*pfn_vWh)(CWnd*, HANDLE);
void (AFX_MSG_CALL CWnd::*pfn_vwW)(UINT, CWnd*);
void (AFX_MSG_CALL CWnd::*pfn_vwWb)(UINT, CWnd*, BOOL);
void (AFX_MSG_CALL CWnd::*pfn_vwwW)(UINT, UINT, CWnd*);
void (AFX_MSG_CALL CWnd::*pfn_vwwx)(UINT, UINT);
void (AFX_MSG_CALL CWnd::*pfn_vs)(LPTSTR);
void (AFX_MSG_CALL CWnd::*pfn_vOWNER)(int, LPTSTR); // force return TRUE
int (AFX_MSG_CALL CWnd::*pfn_iis)(int, LPTSTR);
UINT (AFX_MSG_CALL CWnd::*pfn_wp)(CPoint);
UINT (AFX_MSG_CALL CWnd::*pfn_wv)(void);
void (AFX_MSG_CALL CWnd::*pfn_vPOS)(WINDOWPOS*);
void (AFX_MSG_CALL CWnd::*pfn_vCALC)(BOOL, NCCALCSIZE_PARAMS*);
void (AFX_MSG_CALL CWnd::*pfn_vwp)(UINT, CPoint);
void (AFX_MSG_CALL CWnd::*pfn_vwwh)(UINT, UINT, HANDLE);
BOOL (AFX_MSG_CALL CWnd::*pfn_bwsp)(UINT, short, CPoint);
void (AFX_MSG_CALL CWnd::*pfn_vws)(UINT, LPCTSTR);
};
/////////////////////////////////////////////////////////////////////////////
// Debugging/Tracing helpers
#ifdef _DEBUG
void AFXAPI _AfxTraceMsg(LPCTSTR lpszPrefix, const MSG* pMsg);
BOOL AFXAPI _AfxCheckDialogTemplate(LPCTSTR lpszResource,
BOOL bInvisibleChild);
#endif
/////////////////////////////////////////////////////////////////////////////
// Macintosh-specific declarations
#ifdef _MAC
#include <macname1.h>
#include <Types.h>
#include <QuickDraw.h>
#include <AppleEvents.h>
#include <macname2.h>
// Win32 uses macros with parameters for this, which breaks C++ code.
#ifdef GetNextWindow
#undef GetNextWindow
#endif
extern AEEventHandlerUPP _afxPfnOpenApp;
extern AEEventHandlerUPP _afxPfnOpenDoc;
extern AEEventHandlerUPP _afxPfnPrintDoc;
extern AEEventHandlerUPP _afxPfnQuit;
extern AEEventHandlerUPP _afxPfnOleAuto;
OSErr PASCAL _AfxOpenAppHandler(AppleEvent* pae, AppleEvent* paeReply, long lRefcon);
OSErr PASCAL _AfxOpenDocHandler(AppleEvent* pae, AppleEvent* paeReply, long lRefcon);
OSErr PASCAL _AfxPrintDocHandler(AppleEvent* pae, AppleEvent* paeReply, long lRefcon);
OSErr PASCAL _AfxQuitHandler(AppleEvent* pae, AppleEvent* paeReply, long lRefcon);
OSErr PASCAL _AfxOleAutoHandler(AppleEvent* pae, AppleEvent* paeReply, long lRefcon);
void AFXAPI _AfxStripDialogCaption(HINSTANCE hInst, LPCTSTR lpszResource);
GDHandle AFXAPI _AfxFindDevice(int x, int y);
BOOL AFXAPI AfxCheckMonochrome(const RECT* pRect);
HFONT AFXAPI _AfxGetHelpFont();
struct _AFXWORD
{
BYTE WordBits[sizeof(WORD)];
};
struct _AFXDWORD
{
BYTE DwordBits[sizeof(DWORD)];
};
struct _AFXFLOAT
{
BYTE FloatBits[sizeof(float)];
};
struct _AFXDOUBLE
{
BYTE DoubleBits[sizeof(double)];
};
inline void _AfxByteSwap(WORD w, BYTE* pb)
{
_AFXWORD wAfx;
*(WORD*)&wAfx = w;
ASSERT(sizeof(WORD) == 2);
*pb++ = wAfx.WordBits[1];
*pb = wAfx.WordBits[0];
}
inline void _AfxByteSwap(DWORD dw, BYTE* pb)
{
_AFXDWORD dwAfx;
*(DWORD*)&dwAfx = dw;
ASSERT(sizeof(DWORD) == 4);
*pb++ = dwAfx.DwordBits[3];
*pb++ = dwAfx.DwordBits[2];
*pb++ = dwAfx.DwordBits[1];
*pb = dwAfx.DwordBits[0];
}
inline void _AfxByteSwap(float f, BYTE* pb)
{
_AFXFLOAT fAfx;
*(float*)&fAfx = f;
ASSERT(sizeof(float) == 4);
*pb++ = fAfx.FloatBits[3];
*pb++ = fAfx.FloatBits[2];
*pb++ = fAfx.FloatBits[1];
*pb = fAfx.FloatBits[0];
}
inline void _AfxByteSwap(double d, BYTE* pb)
{
_AFXDOUBLE dAfx;
*(double*)&dAfx = d;
ASSERT(sizeof(double) == 8);
*pb++ = dAfx.DoubleBits[7];
*pb++ = dAfx.DoubleBits[6];
*pb++ = dAfx.DoubleBits[5];
*pb++ = dAfx.DoubleBits[4];
*pb++ = dAfx.DoubleBits[3];
*pb++ = dAfx.DoubleBits[2];
*pb++ = dAfx.DoubleBits[1];
*pb = dAfx.DoubleBits[0];
}
#endif //_MAC
#undef AFX_DATA
#define AFX_DATA
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -