Classes | Variables
DeleteBuddyAlert: delete a alert for a given buddy

Classes

struct  RI_CDeleteBuddyAlert
 Data structure for the Request "DeleteBuddyAlert". More...
 

Variables

const UINT RI_MESSAGE_DELETEBUDDYALERT = RegisterWindowMessage(TEXT("RI_MESSAGE_DELETEBUDDYALERT"))
 

Detailed Description

Variable Documentation

const UINT RI_MESSAGE_DELETEBUDDYALERT = RegisterWindowMessage(TEXT("RI_MESSAGE_DELETEBUDDYALERT"))

Message ID for the Request "DeleteBuddyAlert":
RI_MESSAGE_DELETEBUDDYALERT

    <BR>
    <H3>Return Values for DeleteBuddyAlert:</H3>
    RI_NOERROR = DeleteBuddyAlert succeeded<BR><BR>
RI_NOTFOUND = DeleteBuddyAlert not succeeded, alert could be deletes<BR><BR>

    <H2>Example:</H2>
#define USE_LOADLIBRARY
#include "TNSRemoteInterfaceDll.h"
LPARAM GetUniqueID()
{
//generate unique ID
static LPARAM id = 0;
if (++id == 0) ++id; // do not use 0 !!!!!
return id;
}
inline LRESULT RI_MESSAGE( const UINT request, HWND h_client, LPARAM id )
{
//check if RI handle is valid
if ( !IsWindow( RI_GetTNS() ) )
//send the request
PostMessage( RI_GetTNS(), request, WPARAM(h_client), id );
return RI_NOERROR;
}
LRESULT CDlgMFC_DeleteBuddyAlert::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
if ( message == RI_MESSAGE_DELETEBUDDYALERT )
{
if ( (LRESULT)wParam == RI_NOERROR)
{
//delete buddy alert success. errorcode (0)
}
else if ( (LRESULT)wParam == RI_NOTFOUND)
{
//delete buddy alert not success. alert could not be deleted. errorcode (1)
}
else if ( (LRESULT)wParam == RI_NAVIGATIONNOTACTIVE)
//Navigator is not running or the configuration is not complete. errorcode(3)
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_DeleteBuddyAlert::foo()
{
LPARAM id = GetUniqueID();
if ( RI_MESSAGE( RI_MESSAGE_DELETEBUDDYALERT, GetSafeHwnd(), id ) == RI_NOERROR )
//message sending succeeded
else
//navigation software not running
}

© PTV Group 2020 Generated on Wed Apr 15 2020 12:47:53 for by doxygen 1.8.8