[saco] Implement CDXUTDialog::SendEvent(...)

This commit is contained in:
RD42 committed 2024-05-29 16:32:30 +08:00
1 parent 8fc6a8e473
commit fd4965bf98
2 files changed
+20

No files matched your search

+16
View File
@@ -203,6 +203,22 @@ void CDXUTDialog::Refresh()
}
//--------------------------------------------------------------------------------------
VOID CDXUTDialog::SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl )
{
// If no callback has been registered there's nowhere to send the event to
if( m_pCallbackEvent == NULL )
return;
// Discard events triggered programatically if these types of events haven't been
// enabled
if( !bTriggeredByUser && !m_bNonUserEvents )
return;
m_pCallbackEvent( nEvent, pControl->GetID(), pControl, m_pCallbackEventUserContext );
}
//--------------------------------------------------------------------------------------
// CDXUTControl class
//--------------------------------------------------------------------------------------
+4
View File
@@ -91,6 +91,10 @@ public:
CDXUTDialog();
~CDXUTDialog();
// Methods called by controls
void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
void RemoveAllControls();
// Sets the callback used to notify the app of control events