Home · All Commands · First Steps · Tutorials · Demos · FAQ | ||
Remote Interface Documentation |
Classes | |
struct | RI_CAddStopOffPoint2FavoriteList |
Data structure for the Request "AddStopOffPoint2FavoriteList". More... | |
Functions | |
LRESULT | RI_AddStopOffPoint2FavoriteList_WriteData (LPARAM, RI_CAddStopOffPoint2FavoriteList &) |
Write data to shared memory for "Add Stop Off Point 2 Favorite List". | |
Variables | |
const UINT | RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE = RegisterWindowMessage(TEXT("RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE")) |
const UINT RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE = RegisterWindowMessage(TEXT("RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE")) |
Message ID for the Request "add stop off ponit to favoritelist":
RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE
RI_AddStopOffPoint2FavoriteList_WriteData(LPARAM id, RI_CAddStopOffPoint2FavoriteList data );
RI_NOERROR = Add Stop of Point to FavoriteList succeeded
RI_NODESC = Add Stop of Point to FavoriteList not succeeded, because description failed
RI_NOTADDED = Add Stop of Point to FavoriteList not succeeded, because AddStation failed
Adds a stop-off-point to the favourite 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_AddStopOffPoint2FavoriteList::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam ) { //check messages for answer from RI if ( message == RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE ) { if ( (LRESULT)wParam == RI_NOERROR ) //Add Stop of Point to FavoriteList succeeded. errorcode (0) else if ( (LRESULT)wParam == RI_NOTADDED ) { //Add Stop of Point to FavoriteList not succeeded, because AddStation failed. errorcode (11) } else if ( (LRESULT)wParam == RI_NODESC ) { //Add Stop of Point to FavoriteList not succeeded, because description failed. errorcode (12) } } return CDialog::WindowProc( message, wParam, lParam ); } void CDlgMFC_AddStopOffPoint2FavoriteList::foo() { //*** copy data *** RI_CAddStopOffPoint2FavoriteList data; data.m_mercator_x = 937170; data.m_mercator_y = 6270165; wcscpy(data.m_Caption, L"PTV AG Karlsruhe"); wcscpy(data.m_Description, L"PTV AG Karlsruhe"); //*** write data in shared memory *** LPARAM id = GetUniqueID(); LRESULT sharing_ret = RI_AddStopOffPoint2FavoriteList_WriteData( id, data ); if ( sharing_ret != RI_NOERROR ) return; if ( RI_MESSAGE( RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE, 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 |