Click here to Skip to main content
12,699,531 members (34,419 online)
Click here to Skip to main content


278 bookmarked

Undocumented Visual C++

, 17 Sep 2000
Spelunking in the Badlands of MSDEV
// ---------------
// You may use, compile or redistribute this source as part of your application 
// for free. You may not redistribute it as a part of a software development 
// library without the agreement of the author. If the sources are 
// distributed along with the application, you should leave the original 
// copyright notes in the source code without any changes.
// This code can be used WITHOUT ANY WARRANTIES on your own risk.
// Nick Hodapp

#if !defined(AFX_DLGCLASSES_H__6D10F9C3_C431_4AB4_A950_4A4F157617CA__INCLUDED_)
#define AFX_DLGCLASSES_H__6D10F9C3_C431_4AB4_A950_4A4F157617CA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "resource.h"

#include "ClassView.h"
#include "GridCtrl_src\GridCtrl.h"
#include "TreeColumn_src\TreeColumn.h"

// CDlgClasses dialog

class CClassView;

class CDlgClasses : public CDialog

	CStatic	m_staticCount;
	CEdit	m_editCode;
	int		m_iMode;
	CString	m_strItemCount;
	CString	m_strCode;

	virtual void DoDataExchange(CDataExchange* pDX);
	virtual void PostNcDestroy();

	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnModeChange();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnSelChanged( UINT id, NMHDR * pNotifyStruct, LRESULT * result );
	virtual void OnCancel();



	class CUnprotectedDocTemplate : public CDocTemplate

		void InsertClasses(CDlgClasses* pThis)
			pThis->InsertClass(pThis, GetRuntimeClass());
			pThis->InsertClass(pThis, m_pDocClass);
			pThis->InsertClass(pThis, m_pFrameClass);
			pThis->InsertClass(pThis, m_pViewClass);
			pThis->InsertClass(pThis, m_pOleFrameClass);
			pThis->InsertClass(pThis, m_pOleViewClass);

	typedef struct tagClass
		CString				m_strClass;

		CString				m_strParent;

		CRuntimeClass*		m_prcInfo;

		CString				m_strCode;
		DWORD					m_dwUnique;

		bool					m_bAnalyzed;

		tagClass(CString strClass, CString strParent, CRuntimeClass* prcInfo)
		:	m_strClass(strClass),
			m_prcInfo = prcInfo;

	} SClass;
	typedef std::map<CString, SClass> M_Class;
	M_Class					m_mapClassInfo;

	M_String 				m_mapClassHierarchy;

	CClassView				m_classView;

	CGridCtrl				m_grid;
	CTreeColumn				m_gridTreeCol;

	typedef std::vector<unsigned char> V_Char;
	V_Char					m_vecLevels;

	CFont						m_courier;

	friend class CUnprotectedDocTemplate;


	void						Struct(DWORD dwUnique, CRuntimeClass* prc, DWORD dwOffset, const char* cpszType, bool bPointer, long lTypeSize, DWORD& dwUnknownCt);

	void						StructBegin(SClass& cls);

	void						StructMember(SClass& cls, const char* cpszType, bool bPointer, long lCount = 1);

	void						StructEnd(SClass& cls);

	bool						GetRuntimeInfo(void* pvObj, CRuntimeClass** pprc);

	void						AnalyzeObject(CObject* pObj);

	void						InsertClassRow(CRuntimeClass* prc, unsigned char ucLevel);

	void						InsertClass(CDlgClasses* pThis, CRuntimeClass* pClass, CObject* pObj = NULL);

	static BOOL CALLBACK EnumClasses(HWND hwnd, LPARAM lParam);

	void						Refresh();

	void						RecalcLayout();

								CDlgClasses(CWnd* pParent = NULL);   // standard constructor

// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGCLASSES_H__6D10F9C3_C431_4AB4_A950_4A4F157617CA__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Nick Hodapp
Web Developer
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 18 Sep 2000
Article Copyright 2000 by Nick Hodapp
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid