Classes | Variables
SetOffroadNavigationText: relies on information in a text control, and this shows in the navigation on when the application is in offroad mode.

Classes

struct  RI_CSetOffroadNavigationText
 Data structure for the Request "SetOffroadNavigationText". More...
 

Variables

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

Detailed Description

Variable Documentation

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

Message ID for the Request "SetOffroadNavigationText":
RI_MESSAGE_SETOFFROADNAVIGATIONTEXT

Write Memory:

RI_SetOffroadNavigationText_WriteData(LPARAM id, RI_CSetOffroadNavigationText data);

Return Values for SetOffroadNavigationText:

RI_NOERROR = Set offroad navigation text succeeded
RI_NODESC = No text found
RI_NOTADDED = Offroad Navigation text is deactiveted

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_SetOffroadNavigationText::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
{
if ( (LRESULT)wParam == RI_NOERROR )
{
//SetOffroadNavigationText succeeded. errorcode (0)
}
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_SetOffroadNavigationText::foo()
{
LPARAM id = GetUniqueID();
//define struct
wcscpy(data.m_InfoText, "jetzt links halten.");
data.m_ShowText = true;
//write data in shared memory
LRESULT sharing_ret = RI_SetOffroadNavigationText_WriteData( id, data );
if ( sharing_ret != RI_NOERROR ) return;
if ( RI_MESSAGE( RI_MESSAGE_SETOFFROADNAVIGATIONTEXT, 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