[ digikv @ 06.09.2006. 19:39 ] @
Koristim Borland C++ 5.5 kompajler kojom funkcijom mogu pretvoriti double u TCHAR ? |
[ digikv @ 06.09.2006. 19:39 ] @
[ NrmMyth @ 06.09.2006. 20:05 ] @
Castaj double to int, pa onda u tchar.
Inace za sto ti tocno treba? [ digikv @ 06.09.2006. 20:10 ] @
napravi sam moj autocad :) sad trenutno pravim funkciju offset, kod unosa u komandnom windowsu daje se default vrednost to je double ali u komandnom prozoru mogu samo prikazti string
[ digikv @ 06.09.2006. 20:15 ] @
void _stdcall Func_OFFSET (unsigned long hDwg)
{ TCHAR szText[256]; TCHAR B[1]="B"; TCHAR b[1]="b"; int status,status1; double x1,y1,z1; m1: CadCmdPrompt( hDwg, "Through point/<Distance> ", "" ); // u ovom redu treba iza <Distance> da dodam string koji pradstavlja trenutnu vrednost distanceoffset status=0; status = CadCmdUserInput( hDwg ); if (status == CAD_CCS_STRING){ CadCmdGetInputStr( hDwg, szText ); distanceoffset = atof(szText); if (distanceoffset != 0) { CadCmdPrompt( hDwg, "Select entity:", "" ); hEnt = CadCmdUserGetEntity( hDwg ); if (hEnt){ CadSelectEntity( hDwg, hEnt, 1 ); CadUpdate( hDwg ); CadCmdPrompt( hDwg, "Both sides/<Side for parallel copy>:", "" ); status1 = CadCmdUserInput( hDwg ); if (status1==CAD_CCS_STRING){ TraceLog( "xxx", "CAD_CCS_STRING" ); CadCmdGetInputStr( hDwg, szText ); if( strcmp(szText,B) | strcmp(szText,b) ){ CadDrawOffset( hDwg, hEnt, distanceoffset, 1, x1, y1 ); }else{ CadDrawOffset( hDwg, hEnt, distanceoffset, 0, x1, y1 ); } }else{ if (status1==CAD_CCS_LBUTTON){ TraceLog( "xxx", "CAD_CCS_LBUTTON" ); CadCmdGetInputPoint( hDwg, &x1, &y1, &z1 ); CadDrawOffset( hDwg, hEnt, distanceoffset, 0, x1, y1 ); } } } } } } Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|