Click here to Skip to main content
11,482,402 members (72,928 online)
Click here to Skip to main content
Add your own
alternative version

Internet Explorer AdBlock

, 17 Jan 2008 GPL3 38.4K 1.8K 41
Internet Explorer AdBlock Add-on
IE AdBlockPS
IE AdBlockps.def
IE AdBlock
IE AdBlock.def
IE AdBlock.rgs
#ifndef XCONTROL_H
#define XCONTROL_H

#include "uxtheme.h"

// CXControl

class CXControl
// Construction
	CXControl(CWnd *pParent);
	virtual ~CXControl();

// Attributes
	void EnableTheming(BOOL bEnable) 
		m_bEnableTheming = bEnable; 
		if (m_bEnableTheming)
			TRACE(_T("Theming will be enabled only on XP and only ")
				  _T("if the app is themed with a manifest file.\n"));
	BOOL Enable(BOOL bEnable) 
		BOOL bOldState = m_bEnabled;
		m_bEnabled = bEnable;
		return bOldState; 
	BOOL GetMouseOver() { return m_bMouseOver; }
	BOOL GetPressed() { return m_bPressed; }
	void GetRect(CRect& rect) { rect.CopyRect(m_rect); }
	BOOL IsThemed(HTHEME hTheme);
	void SetMouseOver(BOOL bMouseOver) { m_bMouseOver = bMouseOver; }
	void SetPressed(BOOL bPressed) { m_bPressed = bPressed; }

// Operations

// Implementation
	CWnd *			m_pParent;
	BOOL			m_bMouseOver;
	BOOL			m_bEnableTheming;
	BOOL			m_bPressed;
	BOOL			m_bEnabled;				// TRUE = button is enabled
	CRect			m_rect;


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

#endif //XCONTROL_H

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, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Geert van Horrik
Software Developer CatenaLogic
Netherlands Netherlands
I am Geert van Horrik, and I have studied Computer Science in the Netherlands.

I love to write software using .NET (especially the combination of WPF and C#). I am also the lead developer of Catel, an open-source application development framework for WPF, Silverlight, WP7 and WinRT with the focus on MVVM.

I have my own company since January 1st 2007, called CatenaLogic. This company develops commercial and non-commercial software.

To download (or buy) applications I have written, visit my website:
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 17 Jan 2008
Article Copyright 2008 by Geert van Horrik
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid