void CFWL_PushButton::OnKeyDown(CFWL_MessageKey* pMsg) { if (pMsg->m_dwKeyCode != FWL_VKEY_Return) return; CFWL_EventMouse wmMouse(this); wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; DispatchEvent(&wmMouse); CFWL_Event wmClick(CFWL_Event::Type::Click, this); DispatchEvent(&wmClick); }
void mouse(int button, int state, int x, int y) { wmMouse(button, state, x, y); }