Click here to Skip to main content
15,895,799 members
Articles / Desktop Programming / MFC

Button with ToolTip and/or Bitmap Resource

Rate me:
Please Sign up or sign in to vote.
4.57/5 (8 votes)
14 Oct 20012 min read 173.9K   4.6K   54  
A simple way to have tooltip and a 4 state button using a bitmap resource
// ButtonSample.h : main header file for the BUTTONSAMPLE application
//

#if !defined(AFX_BUTTONSAMPLE_H__D47AFC9A_9D34_11D5_8F75_0048546F01E7__INCLUDED_)
#define AFX_BUTTONSAMPLE_H__D47AFC9A_9D34_11D5_8F75_0048546F01E7__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols

/////////////////////////////////////////////////////////////////////////////
// CButtonSampleApp:
// See ButtonSample.cpp for the implementation of this class
//

class CButtonSampleApp : public CWinApp
{
public:
	CButtonSampleApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CButtonSampleApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CButtonSampleApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

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

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


Written By
United States United States
Professor in physics at Universty of Marne-La-Vallee (Paris, France).
Ex-Consultant (in Telecom) for Cap Gemini America at Atherton (Silicon Valley, San Francisco, CA USA).
I like very much coding.

Comments and Discussions