Click here to Skip to main content
15,850,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a derived class for CStatic:

class CStaticMine : public CStatic
{
	DECLARE_DYNAMIC(CStaticMine)

public:
	CStaticMine();
	virtual ~CStaticMine();
	void OnLButtonDown(UINT nFlags, CPoint point);
	DECLARE_MESSAGE_MAP()
protected:
	
};


#include "stdafx.h"
#include "StaticMine.h"


// CStaticMine

IMPLEMENT_DYNAMIC(CStaticMine, CStatic)

CStaticMine::CStaticMine()
{

}

CStaticMine::~CStaticMine()
{
}


BEGIN_MESSAGE_MAP(CStaticMine, CStatic)
	ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()


void CStaticMine::OnLButtonDown(UINT nFlags, CPoint point)
{
	
	CStatic::OnLButtonDown(nFlags, point);
}


but when I click wirh mouse on static text if I put a breakpoint on CStatic::OnLButtonDown it doesn't pass on it

What I have tried:

I tried code that I've written
Posted
Updated 28-Sep-22 3:27am
v2
Comments
Rick York 28-Sep-22 11:32am    
For a full-featured CStatic-derived control, have a look at this : https://www.codeproject.com/Articles/215/Extended-Use-of-CStatic-Class-CLabel-1-6

1 solution

I solved, with CStatic SNOTIFY must be true
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900