我想问问MFC的源代码都是公开的吗
如果我想看CObject类的构造函数的源代码 能看到吗
我说是真真的源代码
不是那些所谓的H头声明

解决方案 »

  1.   

    SRC目录下不是还有些CPP文件的吗
      

  2.   

    “\Microsoft Visual Studio\VC98\MFC\SRC”下可看到部分东西,不过可没有CObject哟
      

  3.   

    连CString都只能找到部分成员函数的实现
      

  4.   

    //afx.hclass AFX_NOVTABLE CObject
    {
    public:// Object model (types, destruction, allocation)
    virtual CRuntimeClass* GetRuntimeClass() const;
    virtual ~CObject() = 0;  // virtual destructors are necessary // Diagnostic allocations
    void* PASCAL operator new(size_t nSize);
    void* PASCAL operator new(size_t, void* p);
    void PASCAL operator delete(void* p);
    #if _MSC_VER >= 1200
    void PASCAL operator delete(void* p, void* pPlace);
    #endif#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
    // for file name/line number tracking using DEBUG_NEW
    void* PASCAL operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
    #if _MSC_VER >= 1200
    void PASCAL operator delete(void *p, LPCSTR lpszFileName, int nLine);
    #endif
    #endif // Disable the copy constructor and assignment by default so you will get
    //   compiler errors instead of unexpected behaviour if you pass objects
    //   by value or assign objects.
    protected:
    CObject();
    private:
    CObject(const CObject& objectSrc);              // no implementation
    void operator=(const CObject& objectSrc);       // no implementation// Attributes
    public:
    BOOL IsSerializable() const;
    BOOL IsKindOf(const CRuntimeClass* pClass) const;// Overridables
    virtual void Serialize(CArchive& ar);#if defined(_DEBUG) || defined(_AFXDLL)
    // Diagnostic Support
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
    #endif// Implementation
    public:
    static const CRuntimeClass classCObject;
    #ifdef _AFXDLL
    static CRuntimeClass* PASCAL GetThisClass();
    #endif
    };
    //afx.inl#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