--- mstools/mfc/include/afxwin.h 2018/08/09 18:21:01 1.1 +++ mstools/mfc/include/afxwin.h 2018/08/09 18:25:03 1.1.1.3 @@ -59,6 +59,16 @@ class CRect; ///////////////////////////////////////////////////////////////////////////// // Make sure 'afx.h' is included first +#ifdef STRICT +// The default for MFC is not STRICT, since C++ and MFC +// provide all of the same benefits (see TN012.TXT). If +// you wish to use STRICT typechecking, then you must rebuild +// the library after removing the following #undef. +#undef STRICT +#endif + +#define NO_STRICT 1 + #ifndef __AFX_H__ #ifndef _WINDOWS #define _WINDOWS @@ -124,17 +134,7 @@ class CRect; // MFC applications may be built with WINVER == 0x300 (Win 3.0 only) // or WINVER == 0x030A (Win 3.1/3.0) -#ifdef STRICT -// The default for MFC is not STRICT, since C++ and MFC -// provide all of the same benefits (see TN012.TXT). If -// you wish to use STRICT typechecking, then you must rebuild -// the library after removing the following #undef. -#undef STRICT -#endif - -extern "C" { #include "windows.h" -} #ifndef WINVER #error Please include the correct WINDOWS.H (from \C700\INCLUDE) @@ -153,7 +153,11 @@ extern "C" { #define EXPORT __export #endif #ifdef _WINDLL -#define AFX_EXPORT __loadds +#ifndef _NTWIN +#define AFX_EXPORT __loadds +#else +#define AFX_EXPORT APIENTRY +#endif #else #define AFX_EXPORT EXPORT #endif @@ -164,6 +168,7 @@ extern "C" { ///////////////////////////////////////////////////////////////////////////// // CSize - An extent, similar to Windows SIZE structure. +#ifndef _NTWIN #if (WINVER < 0x030a) typedef struct tagSIZE { @@ -173,7 +178,8 @@ typedef struct tagSIZE typedef SIZE* PSIZE; typedef SIZE NEAR* NPSIZE; typedef SIZE FAR* LPSIZE; -#endif /* WINVER < 0x030a */ +#endif /* WINVER < 0x030a */ +#endif class CSize : public tagSIZE { @@ -527,9 +533,7 @@ protected: public: // Device-Context Functions -#ifndef _NTWIN CPoint GetDCOrg() const; -#endif int SaveDC() const; BOOL RestoreDC(int nSavedDC); int GetDeviceCaps(int nIndex) const; @@ -703,10 +707,7 @@ public: int Escape(int nEscape, int nCount, LPCSTR lpInData, void FAR* lpOutData); // Escape helpers -#ifndef _NTWIN int StartDoc(LPCSTR pDocName); - // Windows 3.1 use StartDoc(LPDOCINFO lpDocInfo) -#endif int StartPage(); int EndPage(); int SetAbortProc(BOOL (FAR PASCAL EXPORT* lpfn)(HDC, int)); @@ -1340,7 +1341,13 @@ LONG FAR PASCAL AFX_EXPORT AfxWndProc(HW ///////////////////////////////////////////////////////////////////////////// // pointer to afx_msg member function +// #define AFX_MSG_CALL PASCAL + +#ifdef _NTWIN +#define AFX_MSG_CALL /* assumes THISCALL */ +#else #define AFX_MSG_CALL PASCAL +#endif typedef void (AFX_MSG_CALL CWnd::*AFX_PMSG)(void); struct CMessageEntry @@ -1668,6 +1675,7 @@ public: void SetModify(BOOL bModified = TRUE); void GetRect(LPRECT lpRect) const; DWORD GetSel() const; + void GetSel(int& nStartChar, int& nEndChar) const; HANDLE GetHandle() const; void SetHandle(HANDLE hBuffer); @@ -2007,7 +2015,7 @@ public: // Extra diagnostic tracing options #ifdef _WINDOWS -extern "C" extern int afxTraceFlags; +extern "C" { extern int afxTraceFlags; } // 1 => multi-app debugging // 2 => main message pump trace (includes DDE) // 4 => Windows message tracing