Public feed #527611

Unnamed

public text v1 · immutable
Raw Edit
·published 2007-06-01 11:29 UTC
rendered paste body

class CustomBtn : public CDialog{
public:
	void* id;
protected:
	afx_msg void OnClicked();
	DECLARE_MESSAGE_MAP()
};

class AFX_EXT_CLASS  button
{
public:
	button(CWnd* pParent = NULL);   // standard constructor
	virtual ~button();
	CustomBtn btn;
};

//cpp file

button::button(CWnd* pParent)
{

}

button::~button()
{
}

BEGIN_MESSAGE_MAP(CustomBtn, CDialog)
	ON_BN_CLICKED(id, &CustomBtn::OnClicked)
END_MESSAGE_MAP()

void afx_msg CustomBtn::OnClicked(){
	MessageBox(L"clicked");
}