CMessageList Class ReferenceProvides callback mechanisms.
More...
#include <MessageList.h>
Inheritance diagram for CMessageList:
[legend]Collaboration diagram for CMessageList:
[legend]List of all members.
|
Public Member Functions |
|
| CMessageList () |
| | Default constructor.
|
|
virtual | ~CMessageList () |
| | Destructor.
|
| GUID * | CreateKey (GUID *pKey, DWORD dwUser1, DWORD dwUser2, const GUID *pguid) |
| | Creates a unique key using the input parameters.
|
| void | SetMessageTarget (HWND hWnd, UINT uWMMessageID, BOOL bPost, const GUID *pguid=NULL) |
| | Set the Message ID and window handle that will receive callback messages.
|
| void | RemoveMessageTarget (HWND hWnd, UINT uWMMessageID, const GUID *pguid=NULL) |
| | Removes the specified Windows message target.
|
|
DWORD | MessageTargets () |
| | Returns the number of registered Windows message targets.
|
|
DWORD | CallbackFunctions () |
| | Returns the number of registered callback functions.
|
|
void | ClearAllMessageTargets () |
| | Clears all the message targets.
|
| BOOL | SendWMMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL) |
| | Send a Windows message and/or do the callback.
|
| BOOL | PostWMMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL) |
| | Posts a Windows message and/or do the callback.
|
| BOOL | MWMMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL) |
| | Sends or posts a Windows message and/or do the callback.
|
| virtual BOOL | SetCallbackFunction (CMESSAGE_CALLBACK_FUNCTION pFunction, LPVOID pData=NULL, const GUID *pguid=NULL) |
| | Sets the address of the function that will receive callback messages.
|
| virtual BOOL | SetCallbackFunction (CMESSAGELIST_CALLBACK_FUNCTION pFunction, LPVOID pData=NULL, const GUID *pguid=NULL) |
| | Sets the address of the function that will receive callback messages.
|
| BOOL | DoCallback (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL) |
| | Performs the function callback.
|
| void | RemoveCallbackFunction (CMESSAGE_CALLBACK_FUNCTION pFunction, LPVOID pData, const GUID *pguid=NULL) |
| | Removes the specified callback target.
|
| void | RemoveCallbackFunction (CMESSAGELIST_CALLBACK_FUNCTION pFunction, LPVOID pData, const GUID *pguid=NULL) |
| | Removes the specified callback target.
|
| BOOL | MMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL, BOOL bFunction=TRUE, BOOL bWMessage=TRUE) |
| | Sends or posts a Windows message and/or do the callback.
|
| BOOL | _MSendMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL, BOOL bFunction=TRUE, BOOL bWMessage=TRUE) |
| | Sends a Windows message and/or do the callback.
|
| BOOL | _MPostMessage (WPARAM wParam, LPARAM lParam, const GUID *pguid=NULL, BOOL bFunction=TRUE, BOOL bWMessage=TRUE) |
| | Posts a Windows message and/or do the callback.
|
Classes |
| struct | CMsgTarget |
| | Contains information about a single Windows messaging callback target. More...
|
Detailed Description
Provides callback mechanisms.
This class makes it easy to provide callbacks through either Windows messaging or callback functions. The callback mechanism is transparent to the user.
This class supports an unlimited number of Windows messageing or function callback hooks. This class also allows the use of GUIDs as callback filters.
Member Function Documentation
| BOOL CMessageList::_MPostMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL, |
|
|
BOOL |
bFunction = TRUE, |
|
|
BOOL |
bWMessage = TRUE |
|
) |
[inline] |
|
|
|
Posts a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
| [in] | bFunction | - Non-zero to use callback function |
| [in] | bWMessage | - Non-zero to use Windows messaging |
- Returns:
- Non-zero if a callback is made
- See also:
|
| BOOL CMessageList::_MSendMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL, |
|
|
BOOL |
bFunction = TRUE, |
|
|
BOOL |
bWMessage = TRUE |
|
) |
[inline] |
|
|
|
Sends a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
| [in] | bFunction | - Non-zero to use callback function |
| [in] | bWMessage | - Non-zero to use Windows messaging |
- Returns:
- Non-zero if a callback is made
- See also:
|
| GUID* CMessageList::CreateKey |
( |
GUID * |
pKey, |
|
|
DWORD |
dwUser1, |
|
|
DWORD |
dwUser2, |
|
|
const GUID * |
pguid |
|
) |
[inline] |
|
|
|
Creates a unique key using the input parameters.
- Parameters:
-
| [out] | pKey | - Receives key |
| [in] | dwUser1 | - Param 1 |
| [in] | dwUser2 | - Param 2 |
| [in] | pguid | - GUID param |
- Returns:
- Pointer to the buffer in pKey
- See also:
|
| BOOL CMessageList::DoCallback |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Performs the function callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
Callbacks are only made to targets with matching filter GUIDs.
- Returns:
- Non-zero if success
- See also:
|
| BOOL CMessageList::MMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL, |
|
|
BOOL |
bFunction = TRUE, |
|
|
BOOL |
bWMessage = TRUE |
|
) |
[inline] |
|
|
|
Sends or posts a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
| [in] | bFunction | - Non-zero to use callback function |
| [in] | bWMessage | - Non-zero to use Windows messaging |
- Returns:
- Non-zero if a callback is made
- See also:
|
| BOOL CMessageList::MWMMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Sends or posts a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
Message is only sent to registered targets with matching filter GUIDs.
- Returns:
- Non-zero if a callback is made
- See also:
|
| BOOL CMessageList::PostWMMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Posts a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
Message is only sent to registered targets with matching filter GUIDs.
- Returns:
- Non-zero if a callback is made
- See also:
|
| void CMessageList::RemoveCallbackFunction |
( |
CMESSAGELIST_CALLBACK_FUNCTION |
pFunction, |
|
|
LPVOID |
pData, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Removes the specified callback target.
- Parameters:
-
| [in] | pFunction | - Callback function address |
| [in] | pData | - User data, usually class pointer |
| [in] | pguid | - Filter GUID |
- Returns:
- Non-zeo if success
- See also:
|
| void CMessageList::RemoveCallbackFunction |
( |
CMESSAGE_CALLBACK_FUNCTION |
pFunction, |
|
|
LPVOID |
pData, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Removes the specified callback target.
- Parameters:
-
| [in] | pFunction | - Callback function address |
| [in] | pData | - User data, usually class pointer |
| [in] | pguid | - Filter GUID |
- Returns:
- Non-zeo if success
- See also:
|
| void CMessageList::RemoveMessageTarget |
( |
HWND |
hWnd, |
|
|
UINT |
uWMMessageID, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Removes the specified Windows message target.
- Parameters:
-
| [in] | hWnd | - Window handle |
| [in] | uWMMessageID | - Message ID |
| [in] | pguid | - Pointer to a filter GUID |
|
| BOOL CMessageList::SendWMMessage |
( |
WPARAM |
wParam, |
|
|
LPARAM |
lParam, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Send a Windows message and/or do the callback.
- Parameters:
-
| [in] | wParam | - WPARAM passed on to target |
| [in] | lParam | - LPARAM passed on to target |
| [in] | pguid | - Filter GUID |
Message is only sent to registered targets with matching filter GUIDs.
- Returns:
- Non-zero if a callback is made
- See also:
|
| virtual BOOL CMessageList::SetCallbackFunction |
( |
CMESSAGELIST_CALLBACK_FUNCTION |
pFunction, |
|
|
LPVOID |
pData = NULL, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline, virtual] |
|
|
|
Sets the address of the function that will receive callback messages.
- Parameters:
-
| [in] | pFunction | - Callback function address |
| [in] | pData | - User data, usually class pointer |
| [in] | pguid | - Filter GUID |
- Returns:
- Non-zeo if success
- See also:
|
| virtual BOOL CMessageList::SetCallbackFunction |
( |
CMESSAGE_CALLBACK_FUNCTION |
pFunction, |
|
|
LPVOID |
pData = NULL, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline, virtual] |
|
|
|
Sets the address of the function that will receive callback messages.
- Parameters:
-
| [in] | pFunction | - Callback function address |
| [in] | pData | - User data, usually class pointer |
| [in] | pguid | - Filter GUID |
- Returns:
- Non-zeo if success
- See also:
|
| void CMessageList::SetMessageTarget |
( |
HWND |
hWnd, |
|
|
UINT |
uWMMessageID, |
|
|
BOOL |
bPost, |
|
|
const GUID * |
pguid = NULL |
|
) |
[inline] |
|
|
|
Set the Message ID and window handle that will receive callback messages.
- Parameters:
-
| [in] | hWnd | - The window that will receive messages |
| [in] | uWMMessageID | - The Message ID that will be sent to the window when characters are ready. |
| [in] | bPost | - Non-zero to post message to window zero to send message. |
| [in] | pguid | - Pointer to a filter GUID |
|
The documentation for this class was generated from the following file:
|