Garmin Fleet Management Controller  2.19.0
CWndEventListener Class Reference

EventListener that dispatches a Windows message. More...

#include <CWndEventListener.h>

+ Inheritance diagram for CWndEventListener:

Public Member Functions

void onEvent (EventId aEventId, uint32 aEventData, void *aEventDataPtr, BOOL handleNow)
 Handles event callbacks by translating an EventId into a windows message. More...
 

Detailed Description

EventListener that dispatches a Windows message.

This implementation of EventListener should be inherited by any CWnd that needs to process an Event. The message map of the child class should contain ON_MESSAGE handlers for any events that need to be processed, for example: ON_MESSAGE( WM_EVENT( EVENT... ), On...() )

Definition at line 29 of file CWndEventListener.h.

Member Function Documentation

void CWndEventListener::onEvent ( EventId  aEventId,
uint32  aEventData,
void *  aEventDataPtr,
BOOL  handleNow 
)
virtual

Handles event callbacks by translating an EventId into a windows message.

Casts this to a CWnd then posts a Windows message to it. The use of dynamic_cast is used as an alternative to the "dreaded diamond" caused by C++ multiple inheritance.

Parameters
aEventIdThe event ID
aEventDataThe event data
aEventDataPtrPointer to more event data
Note
Interested parties receive these events as Windows messages, i.e., ON_MESSAGE( aEventId, CallbackFunction ). aEventData is the WPARAM, and aEventDataPtr is the LPARAM.

Implements EventListener.

Definition at line 29 of file CWndEventListener.cpp.

References EVENT_ID_CNT, and WM_EVENT.


The documentation for this class was generated from the following files: