From b3d1614b1408f338ad2995b7610bf94cbb3cb2c7 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 6 Feb 2017 07:49:33 +0000 Subject: [PATCH] EgtInterface : - aggiunta EgtTextGetContent. --- API_GeoSnap.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/API_GeoSnap.cpp b/API_GeoSnap.cpp index 0e00edc..7024f35 100644 --- a/API_GeoSnap.cpp +++ b/API_GeoSnap.cpp @@ -16,6 +16,10 @@ #include "API.h" #include "/EgtDev/Include/EInAPI.h" #include "/EgtDev/Include/EXeExecutor.h" +#include "/EgtDev/Include/EgtStringConverter.h" +#include + +using namespace std ; //---------------------------------------------------------------------------- BOOL @@ -512,6 +516,20 @@ __stdcall EgtTextNormVersor( int nId, int nRefId, double vtNorm[3]) VEC_FROM_3D( vtNorm, vtTmp) return TRUE ; } + +//---------------------------------------------------------------------------- +BOOL +__stdcall EgtTextGetContent( int nId, wchar_t*& wsText) +{ + if ( &wsText == nullptr) + return FALSE ; + string sText ; + if ( ! ExeTextGetContent( nId, sText)) + return FALSE ; + wsText = _wcsdup( stringtoW( sText)) ; + return (( wsText == nullptr) ? FALSE : TRUE) ; +} + //------------------------------------------------------------------------------- BOOL __stdcall EgtPointToIdGlob( double ptP[3], int nId)