Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Style Inspector

, 12 Dec 2004
Free tool (with source code) to inspect style.
si.zip
si_src.zip
StyleInspector
Debug
Release
res
icon1.ico
idr_main.ico
ie.bmp
StyleInspector.ico
StyleInspector.clw
StyleInspector.dep
StyleInspector.dsp
StyleInspector.dsw
StyleInspector.mak
// Author:		Dr. Puiu
// Creation:	2004

// StyleInspectorDlg.h : header file
//

#if !defined(AFX_STYLEINSPECTORDLG_H__8B8D66F1_8D59_41B6_B77D_AB1AC46E1060__INCLUDED_)
#define AFX_STYLEINSPECTORDLG_H__8B8D66F1_8D59_41B6_B77D_AB1AC46E1060__INCLUDED_

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

#include "MyInfoDlg.h"
#include <afxtempl.h>

/////////////////////////////////////////////////////////////////////////////
// CStyleInspectorDlg dialog
class CMyHTMLElement
{
public:
	CMyHTMLElement() {}
	~CMyHTMLElement() {}
	long		lLeft;
	long		lTop;
	long		lWidth;
	long		lHeight;
	CString		strLink;
	COLORREF	ulColor;
};

class CStyleInspectorDlg : public CDialog
{
// Construction
public:
	void GetConnectedToShellWindows();
	CStyleInspectorDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CStyleInspectorDlg)
	enum { IDD = IDD_STYLEINSPECTOR_DIALOG };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStyleInspectorDlg)
	public:
	virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

public:
	int FindClassNameInString(CString &strContainer, CString &strToLookFor);
	bool m_bOriginIsSet;
	CList <CString, CString> m_listElements;
	bool m_bPageIsLoadedAndSelected;
	COLORREF m_colorBkGnd;
	CBrush m_brushBkGnd;
	CRgn m_rgnWnd;
	long m_lOriginTop;
	long m_lOriginLeft;
	CMyInfoDlg m_dlgInfo;
	void FindStyleClasses(IHTMLDocument2 *lpHtmlDocument);
	void UpdateListOfWindows();
	DECLARE_DISPATCH_MAP()
	void IsRegistered(long lCookie);
	void IsRevoked(long lCookie);

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CStyleInspectorDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButtonRefresh();
	afx_msg void OnMove(int x, int y);
	afx_msg void OnButtonSetDocOrigin();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_STYLEINSPECTORDLG_H__8B8D66F1_8D59_41B6_B77D_AB1AC46E1060__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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Mircea Puiu
Software Developer (Senior)
Europe Europe
More than 22 years of software development experience.
SCRUM Master nowadays

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 13 Dec 2004
Article Copyright 2004 by Mircea Puiu
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid