【发布时间】:2014-03-20 23:39:13
【问题描述】:
我有一个父窗口,上面有一个子窗口,如何处理从子窗口到父窗口的鼠标事件。
这是我的代码:
//parent class
IMPLEMENT_DYNAMIC_CLASS(MWParent, wxPanel)
BEGIN_EVENT_TABLE(MWParent, wxPanel)
EVT_LEFT_DCLICK(MWParent::OnMouseLeftDClick)
EVT_RIGHT_DOWN(MWParent::OnMouseRightclick)
END_EVENT_TABLE()
MWParent::MWParent()
{
}
MWParent::~MWParent()
{
}
MWParent::MWParent( wxWindow *win , long id ):wxPanel( win , id ){
MWChild *obj = new MWChild(this);
}
//child class
IMPLEMENT_DYNAMIC_CLASS(MWChild, wxPanel)
BEGIN_EVENT_TABLE(MWChild, wxPanel)
END_EVENT_TABLE()
MWChild::MWChild()
{
}
MWChild::~MWChild()
{
}
MWChild::MWChild( wxWindow *win , long id ):wxPanel( win , id ){
}
【问题讨论】:
标签: c++ visual-c++ wxwidgets