Classes | Functions | Variables
AddStopOffPoint2FavoriteList: Add a stop off point to the favoritelist

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"))
 

Detailed Description

Variable Documentation

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

Message ID for the Request "add stop off ponit to favoritelist":
RI_MESSAGE_ADDSTOPOFFPOINTFAVORITE

Write Memory:

RI_AddStopOffPoint2FavoriteList_WriteData(LPARAM id, RI_CAddStopOffPoint2FavoriteList data );

Return Values for AddStopOffPoint2FavoriteList:

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

Description:

Adds a stop-off-point to the favourite list.

Example:

#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_AddStopOffPoint2FavoriteList::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
{
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 ***
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 Group 2020 Generated on Wed Apr 15 2020 12:47:52 for by doxygen 1.8.8