Classes | Functions | Variables
ActualApplicationState: Get the actual state of the application

Classes

struct  RI_CActualApplicationState
 Data structure for the Request "ActualApplicationState". More...
 

Functions

LRESULT RI_ActualApplicationState_ReadData (LPARAM, RI_CActualApplicationState &)
 Read data from shared memory for "Actual Application State".
 

Variables

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

Detailed Description

Variable Documentation

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

Message ID for the Request "actual application state":
RI_MESSAGE_CURRENTSTATE

    <H3>Read Memory:</H3>
    RI_ActualApplicationState_ReadData(LPARAM id, RI_CActualApplicationState data );
    <BR>
    <H3>Return Values for ActualApplicationState:</H3>
    RI_NOERROR = Actual state of the application succeeded<BR><BR>

    <h2>Description:</h2>Returns the current application state as a string. The state represents the current dialog which is shown and can be one of the following strings:<br>
    "Intro About ", "MainMenu ", "StationList ", "StationListOptions ", "Tour ", "Navigation ", "Route ", "RouteList ", "DefineDestination ", "DefineDestinationTown ", "DefineDestinationStreet ", "DefineDestinationHouseNr ", "DefineDestinationMap ", "DefineDestinationFavourites ", "DefineDestinationPrevDest ", "TmcMsgs ", "GpsWait ", "GpsInfo ", "NavInfo ", "PreDestinationList ", "Settings ", "SettingsAvoidsect ", "SettingsBaud ", "SettingsBrightness ", "SettingsCopyright ", "SettingsDatalink ", "SettingsFavouritesAdminister ", "SettingsFavouritesDetails ", "SettingsFavouritesRename ", "SettingsGeneral ", "SettingsLanguage ", "SettingsMap ", "SettingsPOI ", "SettingsPort ", "SettingsProfile ", "SettingsProfileOverview ", "SettingsStreetPreference ", "SettingsTechnicalLKWData ", "SettingsSaveProfile ", "SettingsRouteoptimisation ", "SettingsSound ", "SettingsTMC ", "TmcListOptions ", "SettingsVehicle ", "SettingsTimeZone ", "SettingsInfo ", "TextBrowser ", "unkown ".<br>
<h3>Returns a single package</h3>
    <H2>Example:</H2>
#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_ActualApplicationState::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
if ( message == RI_MESSAGE_CURRENTSTATE )
{
if ( (LRESULT)wParam == RI_NOERROR )
{
LRESULT read_suc = RI_ActualApplicationState_ReadData( lParam, data );
//Actual state of the application succeeded. errorcode (0)
TRACE( TEXT("the actual state of the application is: %s"),data.m_Description );
}
else
//Actual state of the application not succeeded. errorcode (-1)
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_ActualApplicationState::foo()
{
LPARAM id = GetUniqueID();
if ( RI_MESSAGE( RI_MESSAGE_CURRENTSTATE, 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