Classes | Variables
DeleteBuddyTracking: delete a buddy tracking icon

Classes

struct  RI_CDeleteBuddyTracking
 Data structure for the Request "DeleteBuddyTracking". More...
 

Variables

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

Detailed Description

Variable Documentation

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

Message ID for the Request "DeleteBuddyTracking":
RI_MESSAGE_DELETEBUDDYTRACKING

Write Memory:

RI_DeleteBuddyTracking_WriteData(LPARAM id, RI_CDeleteBuddyTracking data);

Return Values for DeleteBuddyTracking:

RI_NOERROR = Delete buddy succeeded.
RI_NOTAV = Could not delete buddy, because buddyId is not available.

<h2>Description:</h2>Delete the buddy tracking icon.<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_DeleteBuddyTracking::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
{
if ( (LRESULT)wParam == RI_NOERROR )
{
//delete buddy tracking succeeded. errorcode (0)
}
else if ( (LRESULT)wParam == RI_NOTAV)
{
//could not delete buddy tracking, because buddyId is not available
}
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_DeleteBuddyTracking::foo()
{
//define struct
data.m_BuddyID = 1;
//write data in shared memory
LPARAM id = GetUniqueID();
LRESULT sharing_ret = RI_DeleteBuddyTracking_WriteData( id, data );
if ( sharing_ret != RI_NOERROR )
return;
if ( RI_MESSAGE( RI_MESSAGE_DELETEBUDDYTRACKING, 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