Home · All Commands · First Steps · Tutorials · Demos · FAQ | ||
Remote Interface Documentation |
Classes | |
struct | RI_CClearStopOffPointFromPreviousDestinationList |
Data structure for the Request "ClearStopOffPointFromPreviousDestinationList". More... | |
Functions | |
LRESULT | RI_ClearStopOffPointFromPreviousDestinationList_ReadData (LPARAM, RI_CClearStopOffPointFromPreviousDestinationList &) |
Read data from shared memory for "Clear Stop Off Point From Previous DestinationList". | |
LRESULT | RI_ClearStopOffPointFromPreviousDestinationList_WriteData (LPARAM, RI_CClearStopOffPointFromPreviousDestinationList &) |
Write data to shared memory for "Clear Stop Off Point From Previous DestinationList". | |
Variables | |
const UINT | RI_MESSAGE_DELFROMDESTINATIONLIST = RegisterWindowMessage(TEXT("RI_MESSAGE_DELFROMDESTINATIONLIST")) |
const UINT RI_MESSAGE_DELFROMDESTINATIONLIST = RegisterWindowMessage(TEXT("RI_MESSAGE_DELFROMDESTINATIONLIST")) |
Message ID for the Request "Clear Stop Off Point From Previous DestinationList":
RI_MESSAGE_DELFROMDESTINATIONLIST
RI_ClearStopOffPointFromPreviousDestinationList_WriteData(LPARAM id, RI_CClearStopOffPointFromPreviousDestinationList data );
RI_ClearStopOffPointFromPreviousDestinationList_ReadData(LPARAM id, RI_CClearStopOffPointFromPreviousDestinationList data );
RI_NOERROR = The stop off point was successfully deleted
RI_NOTFOUND = The stop off point was not found
Deletes a stop-off-point (referenced by the id of the point in the list) from the previous destination list.
#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() ) ) return RI_NAVIGATIONNOTACTIVE; //send the request PostMessage( RI_GetTNS(), request, WPARAM(h_client), id ); return RI_NOERROR; } LRESULT CDlgMFC_ClearStopOffPointFromPreviousDestinationList::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam ) { //check messages for answer from RI if ( message == RI_MESSAGE_DELFROMDESTINATIONLIST ) { if ( (LRESULT)wParam == RI_NOERROR ) { RI_CClearStopOffPointFromPreviousDestinationList data; LRESULT read_suc = RI_ClearStopOffPointFromPreviousDestinationList_ReadData( lParam, data ); CString dummy; TRACE(TEXT("The stop off point with the unique ID %i"),data.m_StationID ); TRACE(TEXT("was successfully deleted. errorcode (0)\r\n") ); } else if ( (LRESULT)wParam == RI_NOTFOUND ) //Stop off Point was not removed, because the Station was not found. errorcode (5) } return CDialog::WindowProc( message, wParam, lParam ); } void CDlgMFC_ClearStopOffPointFromPreviousDestinationList::foo() { //*** copy data *** RI_CClearStopOffPointFromPreviousDestinationList data; //write UniqueID from Station data.m_StationID = 256; //*** write data in shared memory *** LPARAM id = GetUniqueID(); LRESULT sharing_ret = RI_ClearStopOffPointFromPreviousDestinationList_WriteData( id, data ); if ( sharing_ret != RI_NOERROR ) return; if ( RI_MESSAGE( RI_MESSAGE_DELFROMDESTINATIONLIST, GetSafeHwnd(), id ) == RI_NOERROR ) //message sending succeeded else //navigation software not running }
© PTV AG 2011 | Generated on Fri Oct 14 2011 10:17:32 for RI by 1.7.1 |