Classes | Functions | Variables
AddStopOffPoint2PreviousDestinationList: Add a stop off point to the previous destinationlist

Classes

struct  RI_CAddStopOffPoint2PreviousDestinationList
 Data structure for the Request "AddStopOffPoint2PreviousDestinationList". More...
 

Functions

LRESULT RI_AddStopOffPoint2PreviousDestinationList_WriteData (LPARAM, RI_CAddStopOffPoint2PreviousDestinationList &)
 Write data to shared memory for "Add Stop Off Point 2 Previous DestinationList".
 

Variables

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

Detailed Description

Variable Documentation

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

Message ID for the Request "add stop off ponit to previous destination list":
RI_MESSAGE_ADDSTOPOFFPOINT2PDL

Write Memory:

RI_AddStopOffPoint2PreviousDestinationList_WriteData(LPARAM id, RI_CAddStopOffPoint2PreviousDestinationList data );

Return Values for AddStopOffPoint2PreviousDestinationList:

RI_NOERROR = Add Stop of Point to previous destination list succeeded
RI_NODESC = Add Stop of Point to previous destination list not succeeded, because description failed
RI_NOTADDED = Add Stop of Point to previous destination list not succeeded, because AddStation failed

Description:

Adds a stop-off-point to the previous destination 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_AddStopOffPoint2PreviousDestinationList::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
{
if ( (LRESULT)wParam == RI_NOERROR )
//Add Stop of Point to PreviousDestination List succeeded. errorcode (0)
else if ( (LRESULT)wParam == RI_NOTADDED )
{
//Add Stop of Point to PreviousDestination List not succeeded, because AddStation failed. errorcode (11)
}
else if ( (LRESULT)wParam == RI_NODESC )
{
//Add Stop of Point to PreviousDestination List not succeeded, because description failed. errorcode (12)
}
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_AddStopOffPoint2PreviousDestinationList::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_AddStopOffPoint2PreviousDestinationList_WriteData( id, data );
if ( sharing_ret != RI_NOERROR )
return;
if ( RI_MESSAGE( RI_MESSAGE_ADDSTOPOFFPOINT2PDL, 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