Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A simple linking question Pin
Mike Dimmick16-Jul-03 22:36
Mike Dimmick16-Jul-03 22:36 
GeneralRe: A simple linking question Pin
Themis16-Jul-03 23:08
Themis16-Jul-03 23:08 
GeneralRe: A simple linking question Pin
Mike Dimmick16-Jul-03 23:20
Mike Dimmick16-Jul-03 23:20 
GeneralRe: A simple linking question Pin
Themis17-Jul-03 1:42
Themis17-Jul-03 1:42 
GeneralCButton MouseDown Pin
shinay16-Jul-03 20:37
shinay16-Jul-03 20:37 
GeneralRe: CButton MouseDown Pin
Fredrik Skog16-Jul-03 21:00
Fredrik Skog16-Jul-03 21:00 
GeneralRe: CButton MouseDown Pin
sdfdsfa17-Jul-03 5:52
sdfdsfa17-Jul-03 5:52 
GeneralRe: CButton MouseDown Pin
Fredrik Skog17-Jul-03 20:43
Fredrik Skog17-Jul-03 20:43 
You are not giving me a lot of information to go on.
Anyway, if you add CYourButton in the class view and then use the Class Wizard to add a message handler for WM_LBUTTONDOWN (in CYourButton), your derived button class should look something like this:

.h:
class CYourButton : public CButton
{
// Construction
public:
	CYourButton();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CYourButton)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CYourButton();

	// Generated message map functions
protected:
	//{{AFX_MSG(CYourButton)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

.cpp:

/////////////////////////////////////////////////////////////////////////////
// CYourButton

CYourButton::CYourButton()
{
}

CYourButton::~CYourButton()
{
}

BEGIN_MESSAGE_MAP(CYourButton, CButton)
	//{{AFX_MSG_MAP(CYourButton)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CYourButton message handlers

void CYourButton::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	TRACE("> Left mouse button down\n\r");	// This line has been manually added.

	CButton::OnLButtonDown(nFlags, point);
}


Cheers,
Fredrik

"Felix qui potuit rerum cognoscere causas."
GeneralRe: CButton MouseDown Pin
sdfdsfa18-Jul-03 5:58
sdfdsfa18-Jul-03 5:58 
QuestionHow to input Greek Pin
winncle16-Jul-03 20:29
winncle16-Jul-03 20:29 
GeneralProcess: Create and Destroy Pin
Imtiaz Murtaza16-Jul-03 20:28
Imtiaz Murtaza16-Jul-03 20:28 
GeneralRe: Process: Create and Destroy Pin
Ryan Binns16-Jul-03 21:21
Ryan Binns16-Jul-03 21:21 
GeneralRe: Process: Create and Destroy Pin
Mike Dimmick16-Jul-03 22:44
Mike Dimmick16-Jul-03 22:44 
GeneralRe: Process: Create and Destroy Pin
Ryan Binns16-Jul-03 22:58
Ryan Binns16-Jul-03 22:58 
Generalsize of the capture image Pin
Chen Jiadong16-Jul-03 19:20
Chen Jiadong16-Jul-03 19:20 
GeneralRe: size of the capture image Pin
Andrew Walker17-Jul-03 2:37
Andrew Walker17-Jul-03 2:37 
Generalwave/in problem with TAPI Pin
ewasta16-Jul-03 19:16
ewasta16-Jul-03 19:16 
GeneralMouse Hooking problem!!!!! Pin
xxhimanshu16-Jul-03 18:28
xxhimanshu16-Jul-03 18:28 
GeneralRe: Mouse Hooking problem!!!!! Pin
PJ Arends17-Jul-03 7:01
professionalPJ Arends17-Jul-03 7:01 
GeneralRe: Mouse Hooking problem!!!!! Pin
xxhimanshu18-Jul-03 18:53
xxhimanshu18-Jul-03 18:53 
Generalusing ADO Pin
Angel Kid16-Jul-03 16:42
Angel Kid16-Jul-03 16:42 
GeneralRe: using ADO Pin
Toni7816-Jul-03 18:58
Toni7816-Jul-03 18:58 
GeneralDetect Internet Connection Pin
Abhi@Work16-Jul-03 15:48
Abhi@Work16-Jul-03 15:48 
GeneralRe: Detect Internet Connection Pin
Toni7816-Jul-03 16:00
Toni7816-Jul-03 16:00 
GeneralRe: Detect Internet Connection Pin
Abhi@Work16-Jul-03 17:12
Abhi@Work16-Jul-03 17:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.