home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / vecad / api / VecApi.cpp < prev    next >
C/C++ Source or Header  |  2000-10-13  |  61KB  |  1,604 lines

  1. /********************************************************************
  2. * VeCAD version 5.1
  3. * Copyright (C) 1999-2000 by Oleg Kolbaskin.
  4. * All rights reserved.
  5. *
  6. * This file must be included in C++ project 
  7. * that used library Vecad.dll
  8. * This file makes dynamic linking with VeCAD functions.
  9. *
  10. * Visual C++ applications can not include this file,
  11. * but use Vecad.lib file instead
  12. ********************************************************************/
  13. #include <windows.h>
  14. #include "vecapi.h"
  15.  
  16. //*******************************************************************
  17. // define type "pointer to function"
  18. //*******************************************************************
  19. typedef BOOL (VC_API *tfRegistration  )(int RegCode);
  20. typedef HWND (VC_API *tfWndCreate     )(HWND hParent, int Style, int X, int Y, int W, int H, DWGPROC pfDwgProc);
  21. typedef BOOL (VC_API *tfWndResize     )(HWND hVecWnd, int X, int Y, int W, int H);
  22. typedef BOOL (VC_API *tfWndSetTitle   )(HWND hVecWnd, LPCTSTR pTitle);
  23. typedef BOOL (VC_API *tfWndSetMaxRect )(HWND hVecWnd, const RECT* pRect);
  24. typedef BOOL (VC_API *tfWndSetCursor  )(HWND hVecWnd, HCURSOR hCursor);
  25. typedef HWND (VC_API *tfToolBarCreate )(HWND hwParent, int Id, int X, int Y, int W, int H, int* pW, int* pH);
  26. typedef BOOL (VC_API *tfToolBarButton )(int Id);
  27. typedef HWND (VC_API *tfStatBarCreate )(HWND hwParent, int* pH);
  28. typedef BOOL (VC_API *tfStatBarResize )();
  29. typedef BOOL (VC_API *tfStatBarSetText)(int iPart, LPCTSTR szText);
  30. typedef BOOL (VC_API *tfIndicCreate   )(HWND Parent, LPCTSTR szTitle);
  31. typedef BOOL (VC_API *tfIndicDestroy  )();
  32. typedef BOOL (VC_API *tfIndicSetRange )(int nFrom,int nTo);
  33. typedef BOOL (VC_API *tfIndicSetPos   )(int iPos);
  34. typedef BOOL (VC_API *tfIndicSetText  )(LPCTSTR szText);
  35. typedef BOOL (VC_API *tfIndicStep     )();
  36. typedef int  (VC_API *tfDocCreate     )(HWND hwVec, DWGPROC pfDwgProc);
  37. typedef BOOL (VC_API *tfDocDelete     )(int iDwg);
  38. typedef int  (VC_API *tfDocSetActive  )(int iDwg);
  39. typedef int  (VC_API *tfDocGetActive  )();
  40. typedef BOOL (VC_API *tfDocCopy       )(int iDwgSrc,int iDwgDest,int Mode);
  41. typedef int  (VC_API *tfPageAdd       )(LPCTSTR szName, int Size, int Orient, int W, int H);
  42. typedef BOOL (VC_API *tfPageDelete    )(int Index);
  43. typedef int  (VC_API *tfPageActive    )(int Mode, int Index);
  44. typedef int  (VC_API *tfPageCount     )();
  45. typedef int  (VC_API *tfPageIndex     )(LPCTSTR szName, int ID);
  46. typedef int  (VC_API *tfLayerAdd      )(LPCTSTR szName, double LineWidth, COLORREF LineColor, COLORREF FillColor);
  47. typedef BOOL (VC_API *tfLayerDelete   )(int Index);
  48. typedef int  (VC_API *tfLayerActive   )(int Index);
  49. typedef int  (VC_API *tfLayerCount    )();
  50. typedef int  (VC_API *tfLayerIndex    )(LPCTSTR szName, int ID);
  51. typedef int  (VC_API *tfStLineAdd     )(LPCTSTR szName, LPCTSTR szDesc);
  52. typedef BOOL (VC_API *tfStLineDelete  )(int Index);
  53. typedef int  (VC_API *tfStLineActive  )(int Index);
  54. typedef int  (VC_API *tfStLineCount   )();
  55. typedef int  (VC_API *tfStLineIndex   )(LPCTSTR szName, int ID);
  56. typedef int  (VC_API *tfStTextAdd     )(LPCTSTR szName, LPCTSTR szFont, double Width, double Oblique, int Prec, BOOL Filled, BOOL Bold);
  57. typedef BOOL (VC_API *tfStTextDelete  )(int Index);
  58. typedef int  (VC_API *tfStTextActive  )(int Index);
  59. typedef int  (VC_API *tfStTextCount   )();
  60. typedef int  (VC_API *tfStTextIndex   )(LPCTSTR szName, int ID);
  61. typedef BOOL (VC_API *tfStTextReload  )();
  62. typedef int  (VC_API *tfStHatchAdd    )(LPCTSTR szName, LPCTSTR szDesc);
  63. typedef BOOL (VC_API *tfStHatchDelete )(int Index);
  64. typedef int  (VC_API *tfStHatchActive )(int Index);
  65. typedef int  (VC_API *tfStHatchCount  )();
  66. typedef int  (VC_API *tfStHatchIndex  )(LPCTSTR szName, int ID);
  67. typedef int  (VC_API *tfStDimAdd      )(LPCTSTR szName);
  68. typedef BOOL (VC_API *tfStDimDelete   )(int Index);
  69. typedef int  (VC_API *tfStDimActive   )(int Index);
  70. typedef int  (VC_API *tfStDimCount    )();
  71. typedef int  (VC_API *tfStDimIndex    )(LPCTSTR szName, int ID);
  72. typedef int  (VC_API *tfStPointAdd    )(LPCTSTR szName);
  73. typedef BOOL (VC_API *tfStPointDelete )(int Index);
  74. typedef int  (VC_API *tfStPointActive )(int Index);
  75. typedef int  (VC_API *tfStPointCount  )();
  76. typedef int  (VC_API *tfStPointIndex  )(LPCTSTR szName, int ID);
  77. typedef int  (VC_API *tfGrPointAdd    )(LPCTSTR szName);
  78. typedef BOOL (VC_API *tfGrPointDelete )(int Index);
  79. typedef int  (VC_API *tfGrPointActive )(int Index);
  80. typedef int  (VC_API *tfGrPointCount  )();
  81. typedef int  (VC_API *tfGrPointIndex  )(LPCTSTR szName, int ID);
  82. typedef int  (VC_API *tfViewSave      )(LPCTSTR szName);
  83. typedef BOOL (VC_API *tfViewDelete    )(int Index);
  84. typedef int  (VC_API *tfViewRestore   )(int Index);
  85. typedef int  (VC_API *tfViewCount     )();
  86. typedef int  (VC_API *tfViewIndex     )(LPCTSTR szName, int ID);
  87. typedef int  (VC_API *tfPrnRectAdd    )(double X, double Y, double W, double H, double Angle);
  88. typedef BOOL (VC_API *tfPrnRectDelete )(int Index);
  89. typedef int  (VC_API *tfPrnRectCount  )();
  90. typedef BOOL (VC_API *tfPrnRectPrint  )(int Index, HDC hPrintDC, double ScaleX, double ScaleY, double OriginX, double OriginY);
  91. typedef BOOL (VC_API *tfBlockBegin    )();
  92. typedef int  (VC_API *tfBlockAdd      )(LPCTSTR szName, double x, double y);
  93. typedef int  (VC_API *tfBlockAddF     )(LPCTSTR szFileName, LPCTSTR szBlockName);
  94. typedef BOOL (VC_API *tfBlockDelete   )(int Index);
  95. typedef int  (VC_API *tfBlockActive   )(int Index);
  96. typedef int  (VC_API *tfBlockCount    )();
  97. typedef int  (VC_API *tfBlockIndex    )(LPCTSTR szName, int ID);
  98. typedef int  (VC_API *tfAddPoint      )(double X, double Y);
  99. typedef int  (VC_API *tfAddLine       )(double X1, double Y1, double X2, double Y2);
  100. typedef int  (VC_API *tfAddCircle     )(double X, double Y, double Rad);
  101. typedef int  (VC_API *tfAddCircle3P   )(double X1, double Y1, double X2, double Y2, double X3, double Y3);
  102. typedef int  (VC_API *tfAddArc        )(double X, double Y, double Rad, double Ang1, double Ang2);
  103. typedef int  (VC_API *tfAddArc3P      )(double X1, double Y1, double X2, double Y2, double X3, double Y3);
  104. typedef int  (VC_API *tfAddEllipse    )(double X, double Y, double Rh, double Rv, double Angle);
  105. typedef BOOL (VC_API *tfSetTextParam  )(int Mode, double Var);
  106. typedef BOOL (VC_API *tfSetTextParams )(int Align, double Height, double Angle, double ScaleW, double Oblique, double HInter, double VInter);
  107. typedef int  (VC_API *tfAddText       )(double X, double Y, LPCTSTR szStr);
  108. typedef BOOL (VC_API *tfPolylineBegin )();
  109. typedef BOOL (VC_API *tfVertex        )(double X, double Y);
  110. typedef BOOL (VC_API *tfVertexR       )(double X, double Y, double Radius);
  111. typedef BOOL (VC_API *tfVertexF       )(double X, double Y, BOOL bOnCurve);
  112. typedef BOOL (VC_API *tfVertexB       )(double X, double Y, double Bulge);
  113. typedef int  (VC_API *tfAddPolyline   )(int SmoothType, BOOL bClosed);
  114. typedef int  (VC_API *tfAddBlockIns   )(int Index, double X, double Y, double Angle, double Xscale, double Yscale);
  115. typedef int  (VC_API *tfAddHatch      )(int Index, double Scale, double Angle);
  116. typedef int  (VC_API *tfAddRaster     )(LPCTSTR FileName, double X, double Y, double ResH, double ResV);
  117. typedef int  (VC_API *tfAddRect       )(double X, double Y, double W, double H, double Ang, double Rad);
  118. typedef int  (VC_API *tfAddDimHor     )(double X1, double Y1, double X2, double Y2, double Y);
  119. typedef int  (VC_API *tfAddDimVer     )(double X1, double Y1, double X2, double Y2, double X);
  120. typedef int  (VC_API *tfAddDimPar     )(double X1, double Y1, double X2, double Y2, double Off);
  121. typedef int  (VC_API *tfAddDimAng     )(double Xcen, double Ycen, double X1, double Y1, double X2, double Y2, double Off);
  122. typedef int  (VC_API *tfAddDimRad     )(double Xcen, double Ycen, double Xrad, double Yrad, double Off);
  123. typedef int  (VC_API *tfAddDimDiam    )(double Xcen, double Ycen, double Xrad, double Yrad);
  124. typedef int  (VC_API *tfAddDimOrd     )(double X, double Y, double Xtxt, double Ytxt, BOOL bYord);
  125. typedef int  (VC_API *tfFileNew       )(HWND hwVec, DWGPROC pfDwgProc, LPCTSTR szTemplate);
  126. typedef int  (VC_API *tfFileOpen      )(HWND hwVec, DWGPROC pfDwgProc, LPCTSTR szFileName);
  127. typedef BOOL (VC_API *tfFileLoad      )(int Mode, LPCTSTR szFileName);
  128. typedef BOOL (VC_API *tfFileSave      )(int Mode, LPCTSTR szFileName);
  129. typedef BOOL (VC_API *tfFileLoadMem   )(void* pMem);
  130. typedef int  (VC_API *tfFileSaveMem   )(void* pMem, int MaxSize);
  131. typedef int  (VC_API *tfGetEntity     )(int Mode, int Prm1, int Prm2);
  132. typedef BOOL (VC_API *tfSelect        )(BOOL bSelect, int Index);
  133. typedef int  (VC_API *tfSelectByPoint )(BOOL bSelect, double X, double Y);
  134. typedef int  (VC_API *tfSelectByRect  )(BOOL bSelect, double Left, double Bottom, double Right, double Top, BOOL Cross);
  135. typedef int  (VC_API *tfSelectByPolygon)(BOOL bSelect, const VLPOINT* Ver, int nver, BOOL bCross);
  136. typedef BOOL (VC_API *tfCbCut        )();
  137. typedef BOOL (VC_API *tfCbCopy       )();
  138. typedef BOOL (VC_API *tfCbPaste      )(double X, double Y);
  139. typedef int  (VC_API *tfCopy         )(int iObj, double dx, double dy);
  140. typedef BOOL (VC_API *tfMove         )(int iObj, double dx, double dy);
  141. typedef BOOL (VC_API *tfRotate       )(int iObj, double X, double Y, double Angle);
  142. typedef BOOL (VC_API *tfScale        )(int iObj, double X, double Y, double Scale);
  143. typedef BOOL (VC_API *tfMirror       )(int iObj, double X1, double Y1, double X2, double Y2);
  144. typedef BOOL (VC_API *tfErase        )(int iObj);
  145. typedef BOOL (VC_API *tfExplode      )(int iObj);
  146. typedef BOOL (VC_API *tfUndo         )();
  147. typedef BOOL (VC_API *tfRedo         )();
  148. typedef BOOL (VC_API *tfPolyVerInsert)(int iEnt, int iVer);
  149. typedef BOOL (VC_API *tfPolyVerDelete)(int iEnt, int iVer);
  150. typedef BOOL (VC_API *tfPolyVerGet   )(int iEnt, int iVer, double* pX, double* pY, double* pPrm);
  151. typedef BOOL (VC_API *tfPolyVerSet   )(int iEnt, int iVer, double X, double Y, double Prm);
  152. typedef BOOL (VC_API *tfGripGet      )(int iObj, int iGrip, double* pX, double* pY);
  153. typedef BOOL (VC_API *tfGripSet      )(int iObj, int iGrip, double X, double Y);
  154. typedef BOOL (VC_API *tfGripMove     )(int iObj, int iGrip, double dx, double dy);
  155. typedef int  (VC_API *tfPropGet       )(int PropID, int iObj, void* pData);
  156. typedef int  (VC_API *tfPropGetInt    )(int PropID, int iObj);
  157. typedef double (VC_API *tfPropGetDbl  )(int PropID, int iObj);
  158. typedef int  (VC_API *tfPropPut       )(int PropID, int iObj, const void* pData);
  159. typedef int  (VC_API *tfPropPutInt    )(int PropID, int iObj, int Value);
  160. typedef int  (VC_API *tfPropPutDbl    )(int PropID, int iObj, double Value);
  161. typedef BOOL (VC_API *tfZoom          )(double Scale);
  162. typedef BOOL (VC_API *tfZoomRect      )(double Left, double Bottom, double Right, double Top);
  163. typedef BOOL (VC_API *tfZoomPan       )(double dx, double dy);
  164. typedef BOOL (VC_API *tfCoordWinToDwg )(int Xwin, int Ywin, double* Xdwg, double* Ydwg);
  165. typedef BOOL (VC_API *tfCoordDwgToWin )(double Xdwg, double Ydwg, int* pXwin, int* pYwin);
  166. typedef BOOL (VC_API *tfLenWinToDwg   )(int Lwin, double* pLdwg);
  167. typedef BOOL (VC_API *tfLenDwgToWin   )(double Ldwg, int* pLwin);
  168. typedef BOOL (VC_API *tfSetDrawPen    )(double Width, COLORREF Color);
  169. typedef BOOL (VC_API *tfDrawPoint     )(double X, double Y, int Type, int Size);
  170. typedef BOOL (VC_API *tfDrawLine      )(double X1, double Y1, double X2, double Y2);
  171. typedef BOOL (VC_API *tfDrawPolyline  )(const VLPOINT* Ver, int n_ver, BOOL bClosed);
  172. typedef BOOL (VC_API *tfDrawPolygon   )(const VLPOINT* Ver, int n_ver, BOOL bFill, BOOL bBorder, COLORREF FillColor);
  173. typedef BOOL (VC_API *tfDrawCircle    )(double X, double Y, double Rad);
  174. typedef BOOL (VC_API *tfDrawArc       )(double X, double Y, double Rad, double Angle1, double Angle2);
  175. typedef BOOL (VC_API *tfDrawEllipse   )(double X, double Y, double Rh, double Rv, double Angle);
  176. typedef BOOL (VC_API *tfDrawBitmap    )(HBITMAP hbm, int W, int H, double X, double Y, double ResX, double ResY);
  177.  
  178. typedef BOOL (VC_API *tfDrawText      )(double X, double Y, LPCTSTR szText);
  179. typedef BOOL (VC_API *tfDrawEntity    )(int Index, double Xbase, double Ybase, double Xins, double Yins, double Angle, double ScaleX, double ScaleY);
  180. typedef BOOL (VC_API *tfExecute       )(int IdCmd);   // VL_CM_...
  181. typedef BOOL (VC_API *tfSetAccKey     )(int IdCmd, int VirtKey, int Flags);
  182. typedef BOOL (VC_API *tfClear         )(BOOL bSetDefLayout);
  183. typedef BOOL (VC_API *tfSetFocus      )();
  184. typedef BOOL (VC_API *tfUpdate        )();
  185. typedef BOOL (VC_API *tfRedraw        )();
  186. typedef BOOL (VC_API *tfReset         )();
  187. typedef BOOL (VC_API *tfPrint         )(HDC hPrintDC, double Left, double Bottom, double Right, double Top, double ScaleX, double ScaleY, double OriginX, double OriginY);
  188. typedef BOOL (VC_API *tfDoRaster      )(LPCTSTR szFileName, double Left, double Bottom, double Right, double Top, double Res);
  189.  
  190. typedef BOOL (VC_API *tfGetWinSize    )(HWND hWnd, int* pW, int* pH);
  191. typedef BOOL (VC_API *tfSetTimer      )(int ID, int Elapse);
  192. typedef BOOL (VC_API *tfKillTimer     )(int ID);
  193.  
  194.  
  195. //*******************************************************************
  196. // alloc pointers to functions
  197. //*******************************************************************
  198. tfRegistration   pfRegistration  ;
  199. tfWndCreate      pfWndCreate     ;
  200. tfWndResize      pfWndResize     ;
  201. tfWndSetTitle    pfWndSetTitle   ;
  202. tfWndSetMaxRect  pfWndSetMaxRect ;
  203. tfWndSetCursor   pfWndSetCursor  ;
  204. tfToolBarCreate  pfToolBarCreate ;
  205. tfToolBarButton  pfToolBarButton ;
  206. tfStatBarCreate  pfStatBarCreate ;
  207. tfStatBarResize  pfStatBarResize ;
  208. tfStatBarSetText pfStatBarSetText;
  209. tfIndicCreate    pfIndicCreate   ;
  210. tfIndicDestroy   pfIndicDestroy  ;
  211. tfIndicSetRange  pfIndicSetRange ;
  212. tfIndicSetPos    pfIndicSetPos   ;
  213. tfIndicSetText   pfIndicSetText  ;
  214. tfIndicStep      pfIndicStep     ;
  215. tfDocCreate      pfDocCreate     ;
  216. tfDocDelete      pfDocDelete     ;
  217. tfDocSetActive   pfDocSetActive  ;
  218. tfDocGetActive   pfDocGetActive  ;
  219. tfDocCopy        pfDocCopy       ;
  220. tfPageAdd        pfPageAdd       ;
  221. tfPageDelete     pfPageDelete    ;
  222. tfPageActive     pfPageActive    ;
  223. tfPageCount      pfPageCount     ;
  224. tfPageIndex      pfPageIndex     ;
  225. tfLayerAdd       pfLayerAdd      ;
  226. tfLayerDelete    pfLayerDelete   ;
  227. tfLayerActive    pfLayerActive   ;
  228. tfLayerCount     pfLayerCount    ;
  229. tfLayerIndex     pfLayerIndex    ;
  230. tfStLineAdd      pfStLineAdd     ;
  231. tfStLineDelete   pfStLineDelete  ;
  232. tfStLineActive   pfStLineActive  ;
  233. tfStLineCount    pfStLineCount   ;
  234. tfStLineIndex    pfStLineIndex   ;
  235. tfStTextAdd      pfStTextAdd     ;
  236. tfStTextDelete   pfStTextDelete  ;
  237. tfStTextActive   pfStTextActive  ;
  238. tfStTextCount    pfStTextCount   ;
  239. tfStTextIndex    pfStTextIndex   ;
  240. tfStTextReload   pfStTextReload  ;
  241. tfStHatchAdd     pfStHatchAdd    ;
  242. tfStHatchDelete  pfStHatchDelete ;
  243. tfStHatchActive  pfStHatchActive ;
  244. tfStHatchCount   pfStHatchCount  ;
  245. tfStHatchIndex   pfStHatchIndex  ;
  246. tfStDimAdd       pfStDimAdd      ;
  247. tfStDimDelete    pfStDimDelete   ;
  248. tfStDimActive    pfStDimActive   ;
  249. tfStDimCount     pfStDimCount    ;
  250. tfStDimIndex     pfStDimIndex    ;
  251. tfStPointAdd     pfStPointAdd    ;
  252. tfStPointDelete  pfStPointDelete ;
  253. tfStPointActive  pfStPointActive ;
  254. tfStPointCount   pfStPointCount  ;
  255. tfStPointIndex   pfStPointIndex  ;
  256. tfGrPointAdd     pfGrPointAdd    ;
  257. tfGrPointDelete  pfGrPointDelete ;
  258. tfGrPointActive  pfGrPointActive ;
  259. tfGrPointCount   pfGrPointCount  ;
  260. tfGrPointIndex   pfGrPointIndex  ;
  261. tfViewSave       pfViewSave      ;
  262. tfViewDelete     pfViewDelete    ;
  263. tfViewRestore    pfViewRestore   ;
  264. tfViewCount      pfViewCount     ;
  265. tfViewIndex      pfViewIndex     ;
  266. tfPrnRectAdd     pfPrnRectAdd    ;
  267. tfPrnRectDelete  pfPrnRectDelete ;
  268. tfPrnRectCount   pfPrnRectCount  ;
  269. tfPrnRectPrint   pfPrnRectPrint  ;
  270. tfBlockBegin     pfBlockBegin    ;
  271. tfBlockAdd       pfBlockAdd      ;
  272. tfBlockAddF      pfBlockAddF     ;
  273. tfBlockDelete    pfBlockDelete   ;
  274. tfBlockActive    pfBlockActive   ;
  275. tfBlockCount     pfBlockCount    ;
  276. tfBlockIndex     pfBlockIndex    ;
  277. tfAddPoint       pfAddPoint      ;
  278. tfAddLine        pfAddLine       ;
  279. tfAddCircle      pfAddCircle     ;
  280. tfAddCircle3P    pfAddCircle3P   ;
  281. tfAddArc         pfAddArc        ;
  282. tfAddArc3P       pfAddArc3P      ;
  283. tfAddEllipse     pfAddEllipse    ;
  284. tfSetTextParam   pfSetTextParam  ;
  285. tfSetTextParams  pfSetTextParams ;
  286. tfAddText        pfAddText       ;
  287. tfPolylineBegin  pfPolylineBegin ;
  288. tfVertex         pfVertex        ;
  289. tfVertexR        pfVertexR       ;
  290. tfVertexF        pfVertexF       ;
  291. tfVertexB        pfVertexB       ;
  292. tfAddPolyline    pfAddPolyline   ;
  293. tfAddBlockIns    pfAddBlockIns   ;
  294. tfAddHatch       pfAddHatch      ;
  295. tfAddRaster      pfAddRaster     ;
  296. tfAddRect        pfAddRect       ;
  297. tfAddDimHor      pfAddDimHor     ;
  298. tfAddDimVer      pfAddDimVer     ;
  299. tfAddDimPar      pfAddDimPar     ;
  300. tfAddDimAng      pfAddDimAng     ;
  301. tfAddDimRad      pfAddDimRad     ;
  302. tfAddDimDiam     pfAddDimDiam    ;
  303. tfAddDimOrd      pfAddDimOrd     ;
  304. tfFileNew        pfFileNew       ;
  305. tfFileOpen       pfFileOpen      ;
  306. tfFileLoad       pfFileLoad      ;
  307. tfFileSave       pfFileSave      ;
  308. tfFileLoadMem    pfFileLoadMem   ;
  309. tfFileSaveMem    pfFileSaveMem   ;
  310. tfGetEntity      pfGetEntity     ;
  311. tfSelect         pfSelect        ;
  312. tfSelectByPoint  pfSelectByPoint ;
  313. tfSelectByRect   pfSelectByRect  ;
  314. tfSelectByPolygon pfSelectByPolygon;
  315. tfCbCut          pfCbCut     ;
  316. tfCbCopy         pfCbCopy    ;
  317. tfCbPaste        pfCbPaste   ;
  318. tfCopy           pfCopy      ;
  319. tfMove           pfMove      ;
  320. tfRotate         pfRotate    ;
  321. tfScale          pfScale     ;
  322. tfMirror         pfMirror    ;
  323. tfErase          pfErase     ;
  324. tfExplode        pfExplode   ;
  325. tfUndo           pfUndo      ;
  326. tfRedo           pfRedo      ;
  327. tfPolyVerInsert  pfPolyVerInsert;
  328. tfPolyVerDelete  pfPolyVerDelete;
  329. tfPolyVerGet     pfPolyVerGet   ;
  330. tfPolyVerSet     pfPolyVerSet   ;
  331. tfGripGet        pfGripGet      ;
  332. tfGripSet        pfGripSet      ;
  333. tfGripMove       pfGripMove     ;
  334. tfPropGet        pfPropGet       ;
  335. tfPropGetInt     pfPropGetInt    ;
  336. tfPropGetDbl     pfPropGetDbl    ;
  337. tfPropPut        pfPropPut       ;
  338. tfPropPutInt     pfPropPutInt    ;
  339. tfPropPutDbl     pfPropPutDbl    ;
  340. tfZoom           pfZoom          ;
  341. tfZoomRect       pfZoomRect      ;
  342. tfZoomPan        pfZoomPan       ;
  343. tfCoordWinToDwg  pfCoordWinToDwg ;
  344. tfCoordDwgToWin  pfCoordDwgToWin ;
  345. tfLenWinToDwg    pfLenWinToDwg   ;
  346. tfLenDwgToWin    pfLenDwgToWin   ;
  347. tfSetDrawPen     pfSetDrawPen    ;
  348. tfDrawPoint      pfDrawPoint     ;
  349. tfDrawLine       pfDrawLine      ;
  350. tfDrawPolyline   pfDrawPolyline  ;
  351. tfDrawPolygon    pfDrawPolygon   ;
  352. tfDrawCircle     pfDrawCircle    ;
  353. tfDrawArc        pfDrawArc       ;
  354. tfDrawEllipse    pfDrawEllipse   ;
  355. tfDrawText       pfDrawText      ;
  356. tfDrawBitmap     pfDrawBitmap;
  357. tfDrawEntity     pfDrawEntity    ;
  358. tfExecute        pfExecute       ;
  359. tfSetAccKey      pfSetAccKey     ;
  360. tfClear          pfClear         ;
  361. tfSetFocus       pfSetFocus      ;
  362. tfUpdate         pfUpdate        ;
  363. tfRedraw         pfRedraw        ;
  364. tfReset          pfReset         ;
  365. tfPrint          pfPrint         ;
  366. tfDoRaster       pfDoRaster;
  367. tfGetWinSize     pfGetWinSize;
  368. tfSetTimer       pfSetTimer;     
  369. tfKillTimer      pfKillTimer;
  370.  
  371.  
  372. static HINSTANCE ghVecLibInst=0;    // handle to library instance
  373.  
  374. //*******************************************************************
  375. //  Get addresses of vecad.dll functions
  376. //  This function must be called before call any VeCAD function
  377. //*******************************************************************
  378. BOOL vlStartup ()
  379. {
  380.   ghVecLibInst = LoadLibrary( "vecad51.dll" );
  381.   if (ghVecLibInst==NULL){
  382.     return FALSE;
  383.   }
  384.   pfRegistration = (tfRegistration) GetProcAddress( ghVecLibInst, "vlRegistration" );
  385.   pfWndCreate = (tfWndCreate) GetProcAddress( ghVecLibInst, "vlWndCreate" );
  386.   pfWndResize = (tfWndResize) GetProcAddress( ghVecLibInst, "vlWndResize" );
  387.   pfWndSetTitle = (tfWndSetTitle) GetProcAddress( ghVecLibInst, "vlWndSetTitle" );
  388.   pfWndSetMaxRect = (tfWndSetMaxRect) GetProcAddress( ghVecLibInst, "vlWndSetMaxRect" );
  389.   pfWndSetCursor = (tfWndSetCursor) GetProcAddress( ghVecLibInst, "vlWndSetCursor" );
  390.   pfToolBarCreate = (tfToolBarCreate) GetProcAddress( ghVecLibInst, "vlToolBarCreate" );
  391.   pfToolBarButton = (tfToolBarButton) GetProcAddress( ghVecLibInst, "vlToolBarButton" );
  392.   pfStatBarCreate = (tfStatBarCreate) GetProcAddress( ghVecLibInst, "vlStatBarCreate" );
  393.   pfStatBarResize = (tfStatBarResize) GetProcAddress( ghVecLibInst, "vlStatBarResize" );
  394.   pfStatBarSetText = (tfStatBarSetText) GetProcAddress( ghVecLibInst, "vlStatBarSetText" );
  395.   pfIndicCreate = (tfIndicCreate) GetProcAddress( ghVecLibInst, "vlIndicCreate" );
  396.   pfIndicDestroy = (tfIndicDestroy) GetProcAddress( ghVecLibInst, "vlIndicDestroy" );
  397.   pfIndicSetRange = (tfIndicSetRange) GetProcAddress( ghVecLibInst, "vlIndicSetRange" );
  398.   pfIndicSetPos = (tfIndicSetPos) GetProcAddress( ghVecLibInst, "vlIndicSetPos" );
  399.   pfIndicSetText = (tfIndicSetText) GetProcAddress( ghVecLibInst, "vlIndicSetText" );
  400.   pfIndicStep = (tfIndicStep) GetProcAddress( ghVecLibInst, "vlIndicStep" );
  401.   pfDocCreate = (tfDocCreate) GetProcAddress( ghVecLibInst, "vlDocCreate" );
  402.   pfDocDelete = (tfDocDelete) GetProcAddress( ghVecLibInst, "vlDocDelete" );
  403.   pfDocSetActive = (tfDocSetActive) GetProcAddress( ghVecLibInst, "vlDocSetActive" );
  404.   pfDocGetActive = (tfDocGetActive) GetProcAddress( ghVecLibInst, "vlDocGetActive" );
  405.   pfDocCopy = (tfDocCopy) GetProcAddress( ghVecLibInst, "vlDocCopy" );
  406.   pfPageAdd = (tfPageAdd) GetProcAddress( ghVecLibInst, "vlPageAdd" );
  407.   pfPageDelete = (tfPageDelete) GetProcAddress( ghVecLibInst, "vlPageDelete" );
  408.   pfPageActive = (tfPageActive) GetProcAddress( ghVecLibInst, "vlPageActive" );
  409.   pfPageCount = (tfPageCount) GetProcAddress( ghVecLibInst, "vlPageCount" );
  410.   pfPageIndex = (tfPageIndex) GetProcAddress( ghVecLibInst, "vlPageIndex" );
  411.   pfLayerAdd = (tfLayerAdd) GetProcAddress( ghVecLibInst, "vlLayerAdd" );
  412.   pfLayerDelete = (tfLayerDelete) GetProcAddress( ghVecLibInst, "vlLayerDelete" );
  413.   pfLayerActive = (tfLayerActive) GetProcAddress( ghVecLibInst, "vlLayerActive" );
  414.   pfLayerCount = (tfLayerCount) GetProcAddress( ghVecLibInst, "vlLayerCount" );
  415.   pfLayerIndex = (tfLayerIndex) GetProcAddress( ghVecLibInst, "vlLayerIndex" );
  416.   pfStLineAdd = (tfStLineAdd) GetProcAddress( ghVecLibInst, "vlStLineAdd" );
  417.   pfStLineDelete = (tfStLineDelete) GetProcAddress( ghVecLibInst, "vlStLineDelete" );
  418.   pfStLineActive = (tfStLineActive) GetProcAddress( ghVecLibInst, "vlStLineActive" );
  419.   pfStLineCount = (tfStLineCount) GetProcAddress( ghVecLibInst, "vlStLineCount" );
  420.   pfStLineIndex = (tfStLineIndex) GetProcAddress( ghVecLibInst, "vlStLineIndex" );
  421.   pfStTextAdd = (tfStTextAdd) GetProcAddress( ghVecLibInst, "vlStTextAdd" );
  422.   pfStTextDelete = (tfStTextDelete) GetProcAddress( ghVecLibInst, "vlStTextDelete" );
  423.   pfStTextActive = (tfStTextActive) GetProcAddress( ghVecLibInst, "vlStTextActive" );
  424.   pfStTextCount = (tfStTextCount) GetProcAddress( ghVecLibInst, "vlStTextCount" );
  425.   pfStTextIndex = (tfStTextIndex) GetProcAddress( ghVecLibInst, "vlStTextIndex" );
  426.   pfStTextReload = (tfStTextReload) GetProcAddress( ghVecLibInst, "vlStTextReload" );
  427.   pfStHatchAdd = (tfStHatchAdd) GetProcAddress( ghVecLibInst, "vlStHatchAdd" );
  428.   pfStHatchDelete = (tfStHatchDelete) GetProcAddress( ghVecLibInst, "vlStHatchDelete" );
  429.   pfStHatchActive = (tfStHatchActive) GetProcAddress( ghVecLibInst, "vlStHatchActive" );
  430.   pfStHatchCount = (tfStHatchCount) GetProcAddress( ghVecLibInst, "vlStHatchCount" );
  431.   pfStHatchIndex = (tfStHatchIndex) GetProcAddress( ghVecLibInst, "vlStHatchIndex" );
  432.   pfStDimAdd = (tfStDimAdd) GetProcAddress( ghVecLibInst, "vlStDimAdd" );
  433.   pfStDimDelete = (tfStDimDelete) GetProcAddress( ghVecLibInst, "vlStDimDelete" );
  434.   pfStDimActive = (tfStDimActive) GetProcAddress( ghVecLibInst, "vlStDimActive" );
  435.   pfStDimCount = (tfStDimCount) GetProcAddress( ghVecLibInst, "vlStDimCount" );
  436.   pfStDimIndex = (tfStDimIndex) GetProcAddress( ghVecLibInst, "vlStDimIndex" );
  437.   pfStPointAdd = (tfStPointAdd) GetProcAddress( ghVecLibInst, "vlStPointAdd" );
  438.   pfStPointDelete = (tfStPointDelete) GetProcAddress( ghVecLibInst, "vlStPointDelete" );
  439.   pfStPointActive = (tfStPointActive) GetProcAddress( ghVecLibInst, "vlStPointActive" );
  440.   pfStPointCount = (tfStPointCount) GetProcAddress( ghVecLibInst, "vlStPointCount" );
  441.   pfStPointIndex = (tfStPointIndex) GetProcAddress( ghVecLibInst, "vlStPointIndex" );
  442.   pfGrPointAdd = (tfGrPointAdd) GetProcAddress( ghVecLibInst, "vlGrPointAdd" );
  443.   pfGrPointDelete = (tfGrPointDelete) GetProcAddress( ghVecLibInst, "vlGrPointDelete" );
  444.   pfGrPointActive = (tfGrPointActive) GetProcAddress( ghVecLibInst, "vlGrPointActive" );
  445.   pfGrPointCount = (tfGrPointCount) GetProcAddress( ghVecLibInst, "vlGrPointCount" );
  446.   pfGrPointIndex = (tfGrPointIndex) GetProcAddress( ghVecLibInst, "vlGrPointIndex" );
  447.   pfViewSave = (tfViewSave) GetProcAddress( ghVecLibInst, "vlViewSave" );
  448.   pfViewDelete = (tfViewDelete) GetProcAddress( ghVecLibInst, "vlViewDelete" );
  449.   pfViewRestore = (tfViewRestore) GetProcAddress( ghVecLibInst, "vlViewRestore" );
  450.   pfViewCount = (tfViewCount) GetProcAddress( ghVecLibInst, "vlViewCount" );
  451.   pfViewIndex = (tfViewIndex) GetProcAddress( ghVecLibInst, "vlViewIndex" );
  452.   pfPrnRectAdd = (tfPrnRectAdd) GetProcAddress( ghVecLibInst, "vlPrnRectAdd" );
  453.   pfPrnRectDelete = (tfPrnRectDelete) GetProcAddress( ghVecLibInst, "vlPrnRectDelete" );
  454.   pfPrnRectCount = (tfPrnRectCount) GetProcAddress( ghVecLibInst, "vlPrnRectCount" );
  455.   pfPrnRectPrint = (tfPrnRectPrint) GetProcAddress( ghVecLibInst, "vlPrnRectPrint" );
  456.   pfBlockBegin = (tfBlockBegin) GetProcAddress( ghVecLibInst, "vlBlockBegin" );
  457.   pfBlockAdd = (tfBlockAdd) GetProcAddress( ghVecLibInst, "vlBlockAdd" );
  458.   pfBlockAddF = (tfBlockAddF) GetProcAddress( ghVecLibInst, "vlBlockAddF" );
  459.   pfBlockDelete = (tfBlockDelete) GetProcAddress( ghVecLibInst, "vlBlockDelete" );
  460.   pfBlockActive = (tfBlockActive) GetProcAddress( ghVecLibInst, "vlBlockActive" );
  461.   pfBlockCount = (tfBlockCount) GetProcAddress( ghVecLibInst, "vlBlockCount" );
  462.   pfBlockIndex = (tfBlockIndex) GetProcAddress( ghVecLibInst, "vlBlockIndex" );
  463.   pfAddPoint = (tfAddPoint) GetProcAddress( ghVecLibInst, "vlAddPoint" );
  464.   pfAddLine = (tfAddLine) GetProcAddress( ghVecLibInst, "vlAddLine" );
  465.   pfAddCircle = (tfAddCircle) GetProcAddress( ghVecLibInst, "vlAddCircle" );
  466.   pfAddCircle3P = (tfAddCircle3P) GetProcAddress( ghVecLibInst, "vlAddCircle3P" );
  467.   pfAddArc = (tfAddArc) GetProcAddress( ghVecLibInst, "vlAddArc" );
  468.   pfAddArc3P = (tfAddArc3P) GetProcAddress( ghVecLibInst, "vlAddArc3P" );
  469.   pfAddEllipse = (tfAddEllipse) GetProcAddress( ghVecLibInst, "vlAddEllipse" );
  470.   pfSetTextParam = (tfSetTextParam) GetProcAddress( ghVecLibInst, "vlSetTextParam" );
  471.   pfSetTextParams = (tfSetTextParams) GetProcAddress( ghVecLibInst, "vlSetTextParams" );
  472.   pfAddText = (tfAddText) GetProcAddress( ghVecLibInst, "vlAddText" );
  473.   pfPolylineBegin = (tfPolylineBegin) GetProcAddress( ghVecLibInst, "vlPolylineBegin" );
  474.   pfVertex = (tfVertex) GetProcAddress( ghVecLibInst, "vlVertex" );
  475.   pfVertexR = (tfVertexR) GetProcAddress( ghVecLibInst, "vlVertexR" );
  476.   pfVertexF = (tfVertexF) GetProcAddress( ghVecLibInst, "vlVertexF" );
  477.   pfVertexB = (tfVertexB) GetProcAddress( ghVecLibInst, "vlVertexB" );
  478.   pfAddPolyline = (tfAddPolyline) GetProcAddress( ghVecLibInst, "vlAddPolyline" );
  479.   pfAddBlockIns = (tfAddBlockIns) GetProcAddress( ghVecLibInst, "vlAddBlockIns" );
  480.   pfAddHatch = (tfAddHatch) GetProcAddress( ghVecLibInst, "vlAddHatch" );
  481.   pfAddRaster = (tfAddRaster) GetProcAddress( ghVecLibInst, "vlAddRaster" );
  482.   pfAddRect = (tfAddRect) GetProcAddress( ghVecLibInst, "vlAddRect" );
  483.   pfAddDimHor = (tfAddDimHor) GetProcAddress( ghVecLibInst, "vlAddDimHor" );
  484.   pfAddDimVer = (tfAddDimVer) GetProcAddress( ghVecLibInst, "vlAddDimVer" );
  485.   pfAddDimPar = (tfAddDimPar) GetProcAddress( ghVecLibInst, "vlAddDimPar" );
  486.   pfAddDimAng = (tfAddDimAng) GetProcAddress( ghVecLibInst, "vlAddDimAng" );
  487.   pfAddDimRad = (tfAddDimRad) GetProcAddress( ghVecLibInst, "vlAddDimRad" );
  488.   pfAddDimDiam = (tfAddDimDiam) GetProcAddress( ghVecLibInst, "vlAddDimDiam" );
  489.   pfAddDimOrd = (tfAddDimOrd) GetProcAddress( ghVecLibInst, "vlAddDimOrd" );
  490.   pfFileNew = (tfFileNew) GetProcAddress( ghVecLibInst, "vlFileNew" );
  491.   pfFileOpen = (tfFileOpen) GetProcAddress( ghVecLibInst, "vlFileOpen" );
  492.   pfFileLoad = (tfFileLoad) GetProcAddress( ghVecLibInst, "vlFileLoad" );
  493.   pfFileSave = (tfFileSave) GetProcAddress( ghVecLibInst, "vlFileSave" );
  494.   pfFileLoadMem = (tfFileLoadMem) GetProcAddress( ghVecLibInst, "vlFileLoadMem" );
  495.   pfFileSaveMem = (tfFileSaveMem) GetProcAddress( ghVecLibInst, "vlFileSaveMem" );
  496.   pfGetEntity = (tfGetEntity) GetProcAddress( ghVecLibInst, "vlGetEntity" );
  497.   pfSelect = (tfSelect) GetProcAddress( ghVecLibInst, "vlSelect" );
  498.   pfSelectByPoint = (tfSelectByPoint) GetProcAddress( ghVecLibInst, "vlSelectByPoint" );
  499.   pfSelectByRect = (tfSelectByRect) GetProcAddress( ghVecLibInst, "vlSelectByRect" );
  500.   pfSelectByPolygon = (tfSelectByPolygon) GetProcAddress( ghVecLibInst, "vlSelectByPolygon" );
  501.   pfCbCut = (tfCbCut) GetProcAddress( ghVecLibInst, "vlCbCut" );
  502.   pfCbCopy = (tfCbCopy) GetProcAddress( ghVecLibInst, "vlCbCopy" );
  503.   pfCbPaste = (tfCbPaste) GetProcAddress( ghVecLibInst, "vlCbPaste" );
  504.   pfCopy = (tfCopy) GetProcAddress( ghVecLibInst, "vlCopy" );
  505.   pfMove = (tfMove) GetProcAddress( ghVecLibInst, "vlMove" );
  506.   pfRotate = (tfRotate) GetProcAddress( ghVecLibInst, "vlRotate" );
  507.   pfScale = (tfScale) GetProcAddress( ghVecLibInst, "vlScale" );
  508.   pfMirror = (tfMirror) GetProcAddress( ghVecLibInst, "vlMirror" );
  509.   pfErase = (tfErase) GetProcAddress( ghVecLibInst, "vlErase" );
  510.   pfExplode = (tfExplode) GetProcAddress( ghVecLibInst, "vlExplode" );
  511.   pfUndo = (tfUndo) GetProcAddress( ghVecLibInst, "vlUndo" );
  512.   pfRedo = (tfRedo) GetProcAddress( ghVecLibInst, "vlRedo" );
  513.   pfPolyVerInsert = (tfPolyVerInsert) GetProcAddress( ghVecLibInst, "vlPolyVerInsert" );
  514.   pfPolyVerDelete = (tfPolyVerDelete) GetProcAddress( ghVecLibInst, "vlPolyVerDelete" );
  515.   pfPolyVerGet = (tfPolyVerGet) GetProcAddress( ghVecLibInst, "vlPolyVerGet" );
  516.   pfPolyVerSet = (tfPolyVerSet) GetProcAddress( ghVecLibInst, "vlPolyVerSet" );
  517.   pfGripGet = (tfGripGet) GetProcAddress( ghVecLibInst, "vlGripGet" );
  518.   pfGripSet = (tfGripSet) GetProcAddress( ghVecLibInst, "vlGripSet" );
  519.   pfGripMove = (tfGripMove) GetProcAddress( ghVecLibInst, "vlGripMove" );
  520.   pfPropGet = (tfPropGet) GetProcAddress( ghVecLibInst, "vlPropGet" );
  521.   pfPropGetInt = (tfPropGetInt) GetProcAddress( ghVecLibInst, "vlPropGetInt" );
  522.   pfPropGetDbl = (tfPropGetDbl) GetProcAddress( ghVecLibInst, "vlPropGetDbl" );
  523.   pfPropPut = (tfPropPut) GetProcAddress( ghVecLibInst, "vlPropPut" );
  524.   pfPropPutInt = (tfPropPutInt) GetProcAddress( ghVecLibInst, "vlPropPutInt" );
  525.   pfPropPutDbl = (tfPropPutDbl) GetProcAddress( ghVecLibInst, "vlPropPutDbl" );
  526.   pfZoom = (tfZoom) GetProcAddress( ghVecLibInst, "vlZoom" );
  527.   pfZoomRect = (tfZoomRect) GetProcAddress( ghVecLibInst, "vlZoomRect" );
  528.   pfZoomPan = (tfZoomPan) GetProcAddress( ghVecLibInst, "vlZoomPan" );
  529.   pfCoordWinToDwg = (tfCoordWinToDwg) GetProcAddress( ghVecLibInst, "vlCoordWinToDwg" );
  530.   pfCoordDwgToWin = (tfCoordDwgToWin) GetProcAddress( ghVecLibInst, "vlCoordDwgToWin" );
  531.   pfLenWinToDwg = (tfLenWinToDwg) GetProcAddress( ghVecLibInst, "vlLenWinToDwg" );
  532.   pfLenDwgToWin = (tfLenDwgToWin) GetProcAddress( ghVecLibInst, "vlLenDwgToWin" );
  533.   pfSetDrawPen = (tfSetDrawPen) GetProcAddress( ghVecLibInst, "vlSetDrawPen" );
  534.   pfDrawPoint = (tfDrawPoint) GetProcAddress( ghVecLibInst, "vlDrawPoint" );
  535.   pfDrawLine = (tfDrawLine) GetProcAddress( ghVecLibInst, "vlDrawLine" );
  536.   pfDrawPolyline = (tfDrawPolyline) GetProcAddress( ghVecLibInst, "vlDrawPolyline" );
  537.   pfDrawPolygon = (tfDrawPolygon) GetProcAddress( ghVecLibInst, "vlDrawPolygon" );
  538.   pfDrawCircle = (tfDrawCircle) GetProcAddress( ghVecLibInst, "vlDrawCircle" );
  539.   pfDrawArc = (tfDrawArc) GetProcAddress( ghVecLibInst, "vlDrawArc" );
  540.   pfDrawEllipse = (tfDrawEllipse) GetProcAddress( ghVecLibInst, "vlDrawEllipse" );
  541.   pfDrawText = (tfDrawText) GetProcAddress( ghVecLibInst, "vlDrawText" );
  542.   pfDrawBitmap = (tfDrawBitmap ) GetProcAddress( ghVecLibInst, "vlDrawBitmap" );
  543.   pfDrawEntity = (tfDrawEntity) GetProcAddress( ghVecLibInst, "vlDrawEntity" );
  544.   pfExecute = (tfExecute) GetProcAddress( ghVecLibInst, "vlExecute" );
  545.   pfSetAccKey = (tfSetAccKey) GetProcAddress( ghVecLibInst, "vlSetAccKey" );
  546.   pfClear = (tfClear) GetProcAddress( ghVecLibInst, "vlClear" );
  547.   pfSetFocus = (tfSetFocus) GetProcAddress( ghVecLibInst, "vlSetFocus" );
  548.   pfUpdate = (tfUpdate) GetProcAddress( ghVecLibInst, "vlUpdate" );
  549.   pfRedraw = (tfRedraw) GetProcAddress( ghVecLibInst, "vlRedraw" );
  550.   pfReset = (tfReset) GetProcAddress( ghVecLibInst, "vlReset" );
  551.   pfPrint = (tfPrint) GetProcAddress( ghVecLibInst, "vlPrint" );
  552.   pfDoRaster = (tfDoRaster) GetProcAddress( ghVecLibInst, "vlDoRaster" );
  553.   pfGetWinSize = (tfGetWinSize) GetProcAddress( ghVecLibInst, "vlGetWinSize" );
  554.   pfSetTimer = (tfSetTimer) GetProcAddress( ghVecLibInst, "vlSetTimer" );
  555.   pfKillTimer = (tfKillTimer) GetProcAddress( ghVecLibInst, "vlKillTimer" );
  556.   return TRUE;
  557. }
  558.  
  559.  
  560. //*******************************************************************
  561. //  Free the library vecad.dll
  562. //  Must be called before quit from application
  563. //*******************************************************************
  564. VOID vlCleanup ()
  565. {
  566.   FreeLibrary( ghVecLibInst );
  567. }
  568.  
  569.  
  570. //*******************************************************************
  571. // Realization of VeCAD functions
  572. //*******************************************************************
  573.  
  574. BOOL VC_API vlRegistration (int code)
  575. {
  576.   return (*pfRegistration) (code);
  577. }
  578.  
  579. //-----------------------------------------------
  580. HWND VC_API vlWndCreate (HWND hParent, int Style, int X, int Y, int W, int H, DWGPROC pfDwgProc)
  581. {
  582.   return (*pfWndCreate)( hParent, Style, X, Y, W, H, pfDwgProc );
  583. }
  584.  
  585. //-----------------------------------------------
  586. BOOL VC_API vlWndResize (HWND hVecWnd, int X, int Y, int W, int H)
  587. {
  588.   return (*pfWndResize)( hVecWnd, X, Y, W, H );
  589. }
  590.  
  591. //-----------------------------------------------
  592. BOOL VC_API vlWndSetTitle (HWND hVecWnd, LPCTSTR pTitle)
  593. {
  594.   return (*pfWndSetTitle)( hVecWnd, pTitle );
  595. }
  596.  
  597. //-----------------------------------------------
  598. BOOL VC_API vlWndSetMaxRect (HWND hVecWnd, const RECT* pRect)
  599. {
  600.   return (*pfWndSetMaxRect)( hVecWnd, pRect );
  601. }
  602.  
  603. //-----------------------------------------------
  604. BOOL VC_API vlWndSetCursor (HWND hVecWnd, HCURSOR hCursor)
  605. {
  606.   return (*pfWndSetCursor)( hVecWnd, hCursor );
  607. }
  608.  
  609. //-----------------------------------------------
  610. HWND VC_API vlToolBarCreate (HWND hwParent, int Id, int X, int Y, int W, int H, int* pW, int* pH)
  611. {
  612.   return (*pfToolBarCreate)( hwParent, Id, X, Y, W, H, pW, pH );
  613. }
  614.  
  615. //-----------------------------------------------
  616. BOOL VC_API vlToolBarButton (int Id)
  617. {
  618.   return (*pfToolBarButton)( Id );
  619. }
  620.  
  621. //-----------------------------------------------
  622. HWND VC_API vlStatBarCreate (HWND hwParent, int* pH)
  623. {
  624.   return (*pfStatBarCreate)( hwParent, pH );
  625. }
  626.  
  627. //-----------------------------------------------
  628. BOOL VC_API vlStatBarResize ()
  629. {
  630.   return (*pfStatBarResize)();
  631. }
  632.  
  633. //-----------------------------------------------
  634. BOOL VC_API vlStatBarSetText (int iPart, LPCTSTR szText)
  635. {
  636.   return (*pfStatBarSetText)( iPart, szText );
  637. }
  638.  
  639. //-----------------------------------------------
  640. BOOL VC_API vlIndicCreate (HWND Parent, LPCTSTR szTitle)
  641. {
  642.   return (*pfIndicCreate)( Parent, szTitle );
  643. }
  644.  
  645. //-----------------------------------------------
  646. BOOL VC_API vlIndicDestroy ()
  647. {
  648.   return (*pfIndicDestroy)();
  649. }
  650.  
  651. //-----------------------------------------------
  652. BOOL VC_API vlIndicSetRange (int nFrom,int nTo)
  653. {
  654.   return (*pfIndicSetRange)( nFrom, nTo );
  655. }
  656.  
  657. //-----------------------------------------------
  658. BOOL VC_API vlIndicSetPos (int iPos)
  659. {
  660.   return (*pfIndicSetPos)( iPos );
  661. }
  662.  
  663. //-----------------------------------------------
  664. BOOL VC_API vlIndicSetText (LPCTSTR szText)
  665. {
  666.   return (*pfIndicSetText)( szText );
  667. }
  668.  
  669. //-----------------------------------------------
  670. BOOL VC_API vlIndicStep ()
  671. {
  672.   return (*pfIndicStep)();
  673. }
  674.  
  675. //-----------------------------------------------
  676. int VC_API vlDocCreate (HWND hwVec, DWGPROC pfDwgProc)
  677. {
  678.   return (*pfDocCreate)( hwVec, pfDwgProc );
  679. }
  680.  
  681. //-----------------------------------------------
  682. BOOL VC_API vlDocDelete (int iDwg)
  683. {
  684.   return (*pfDocDelete)( iDwg );
  685. }
  686.  
  687. //-----------------------------------------------
  688. int VC_API vlDocSetActive (int iDwg)
  689. {
  690.   return (*pfDocSetActive )( iDwg );
  691. }
  692.  
  693. //-----------------------------------------------
  694. int VC_API vlDocGetActive ()
  695. {
  696.   return (*pfDocGetActive )();
  697. }
  698.  
  699. //-----------------------------------------------
  700. BOOL VC_API vlDocCopy (int iDwgSrc,int iDwgDest,int Mode)
  701. {
  702.   return (*pfDocCopy)( iDwgSrc, iDwgDest, Mode );
  703. }
  704.  
  705. //-----------------------------------------------
  706. int VC_API vlPageAdd (LPCTSTR szName, int Size, int Orient, int W, int H)
  707. {
  708.   return (*pfPageAdd)( szName, Size, Orient, W, H );
  709. }
  710.  
  711. //-----------------------------------------------
  712. BOOL VC_API vlPageDelete (int Index)
  713. {
  714.   return (*pfPageDelete)( Index );
  715. }
  716.  
  717. //-----------------------------------------------
  718. int VC_API vlPageActive (int Mode, int Index)
  719. {
  720.   return (*pfPageActive)( Mode, Index );
  721. }
  722.  
  723. //-----------------------------------------------
  724. int VC_API vlPageCount ()
  725. {
  726.   return (*pfPageCount)();
  727. }
  728.  
  729. //-----------------------------------------------
  730. int VC_API vlPageIndex (LPCTSTR szName, int ID)
  731. {
  732.   return (*pfPageIndex)( szName, ID );
  733. }
  734.  
  735. //-----------------------------------------------
  736. int VC_API vlLayerAdd (LPCTSTR szName, double LineWidth, COLORREF LineColor, COLORREF FillColor)
  737. {
  738.   return (*pfLayerAdd)( szName, LineWidth, LineColor, FillColor );
  739. }
  740.  
  741. //-----------------------------------------------
  742. BOOL VC_API vlLayerDelete (int Index)
  743. {
  744.   return (*pfLayerDelete)( Index );
  745. }
  746.  
  747. //-----------------------------------------------
  748. int VC_API vlLayerActive (int Index)
  749. {
  750.   return (*pfLayerActive)( Index );
  751. }
  752.  
  753. //-----------------------------------------------
  754. int VC_API vlLayerCount ()
  755. {
  756.   return (*pfLayerCount)();
  757. }
  758.  
  759. //-----------------------------------------------
  760. int VC_API vlLayerIndex (LPCTSTR szName, int ID)
  761. {
  762.   return (*pfLayerIndex)( szName, ID );
  763. }
  764.  
  765. //-----------------------------------------------
  766. int VC_API vlStLineAdd (LPCTSTR szName, LPCTSTR szDesc)
  767. {
  768.   return (*pfStLineAdd)( szName, szDesc );
  769. }
  770.  
  771. //-----------------------------------------------
  772. BOOL VC_API vlStLineDelete (int Index)
  773. {
  774.   return (*pfStLineDelete)( Index );
  775. }
  776.  
  777. //-----------------------------------------------
  778. int VC_API vlStLineActive (int Index)
  779. {
  780.   return (*pfStLineActive)( Index );
  781. }
  782.  
  783. //-----------------------------------------------
  784. int VC_API vlStLineCount ()
  785. {
  786.   return (*pfStLineCount)();
  787. }
  788.  
  789. //-----------------------------------------------
  790. int VC_API vlStLineIndex (LPCTSTR szName, int ID)
  791. {
  792.   return (*pfStLineIndex)( szName, ID );
  793. }
  794.  
  795. //-----------------------------------------------
  796. int VC_API vlStTextAdd (LPCTSTR szName, LPCTSTR szFont, double Width, double Oblique, int Prec, BOOL Filled, BOOL Bold)
  797. {
  798.   return (*pfStTextAdd)( szName, szFont, Width, Oblique, Prec, Filled, Bold );
  799. }
  800.  
  801. //-----------------------------------------------
  802. BOOL VC_API vlStTextDelete (int Index)
  803. {
  804.   return (*pfStTextDelete)( Index );
  805. }
  806.  
  807. //-----------------------------------------------
  808. int VC_API vlStTextActive (int Index)
  809. {
  810.   return (*pfStTextActive)( Index );
  811. }
  812.  
  813. //-----------------------------------------------
  814. int VC_API vlStTextCount ()
  815. {
  816.   return (*pfStTextCount)();
  817. }
  818.  
  819. //-----------------------------------------------
  820. int VC_API vlStTextIndex (LPCTSTR szName, int ID)
  821. {
  822.   return (*pfStTextIndex)( szName, ID );
  823. }
  824.  
  825. //-----------------------------------------------
  826. BOOL VC_API vlStTextReload ()
  827. {
  828.   return (*pfStTextReload)();
  829. }
  830.  
  831. //-----------------------------------------------
  832. int VC_API vlStHatchAdd (LPCTSTR szName, LPCTSTR szDesc)
  833. {
  834.   return (*pfStHatchAdd)( szName, szDesc );
  835. }
  836.  
  837. //-----------------------------------------------
  838. BOOL VC_API vlStHatchDelete (int Index)
  839. {
  840.   return (*pfStHatchDelete)( Index );
  841. }
  842.  
  843. //-----------------------------------------------
  844. int VC_API vlStHatchActive (int Index)
  845. {
  846.   return (*pfStHatchActive)( Index );
  847. }
  848.  
  849. //-----------------------------------------------
  850. int VC_API vlStHatchCount ()
  851. {
  852.   return (*pfStHatchCount)();
  853. }
  854.  
  855. //-----------------------------------------------
  856. int VC_API vlStHatchIndex (LPCTSTR szName, int ID)
  857. {
  858.   return (*pfStHatchIndex)( szName, ID );
  859. }
  860.  
  861. //-----------------------------------------------
  862. int VC_API vlStDimAdd (LPCTSTR szName)
  863. {
  864.   return (*pfStDimAdd)( szName );
  865. }
  866.  
  867. //-----------------------------------------------
  868. BOOL VC_API vlStDimDelete (int Index)
  869. {
  870.   return (*pfStDimDelete)( Index );
  871. }
  872.  
  873. //-----------------------------------------------
  874. int VC_API vlStDimActive (int Index)
  875. {
  876.   return (*pfStDimActive)( Index );
  877. }
  878.  
  879. //-----------------------------------------------
  880. int VC_API vlStDimCount ()
  881. {
  882.   return (*pfStDimCount)();
  883. }
  884.  
  885. //-----------------------------------------------
  886. int VC_API vlStDimIndex (LPCTSTR szName, int ID)
  887. {
  888.   return (*pfStDimIndex)( szName, ID );
  889. }
  890.  
  891. //-----------------------------------------------
  892. int VC_API vlStPointAdd (LPCTSTR szName)
  893. {
  894.   return (*pfStPointAdd)( szName );
  895. }
  896.  
  897. //-----------------------------------------------
  898. BOOL VC_API vlStPointDelete (int Index)
  899. {
  900.   return (*pfStPointDelete)( Index );
  901. }
  902.  
  903. //-----------------------------------------------
  904. int VC_API vlStPointActive (int Index)
  905. {
  906.   return (*pfStPointActive)( Index );
  907. }
  908.  
  909. //-----------------------------------------------
  910. int VC_API vlStPointCount ()
  911. {
  912.   return (*pfStPointCount)();
  913. }
  914.  
  915. //-----------------------------------------------
  916. int VC_API vlStPointIndex (LPCTSTR szName, int ID)
  917. {
  918.   return (*pfStPointIndex)( szName, ID );
  919. }
  920.  
  921. //-----------------------------------------------
  922. int VC_API vlGrPointAdd (LPCTSTR szName)
  923. {
  924.   return (*pfGrPointAdd)( szName );
  925. }
  926.  
  927. //-----------------------------------------------
  928. BOOL VC_API vlGrPointDelete (int Index)
  929. {
  930.   return (*pfGrPointDelete)( Index );
  931. }
  932.  
  933. //-----------------------------------------------
  934. int VC_API vlGrPointActive (int Index)
  935. {
  936.   return (*pfGrPointActive)( Index );
  937. }
  938.  
  939. //-----------------------------------------------
  940. int VC_API vlGrPointCount ()
  941. {
  942.   return (*pfGrPointCount)();
  943. }
  944.  
  945. //-----------------------------------------------
  946. int VC_API vlGrPointIndex (LPCTSTR szName, int ID)
  947. {
  948.   return (*pfGrPointIndex)( szName, ID );
  949. }
  950.  
  951. //-----------------------------------------------
  952. int VC_API vlViewSave (LPCTSTR szName)
  953. {
  954.   return (*pfViewSave)( szName );
  955. }
  956.  
  957. //-----------------------------------------------
  958. BOOL VC_API vlViewDelete (int Index)
  959. {
  960.   return (*pfViewDelete)( Index );
  961. }
  962.  
  963. //-----------------------------------------------
  964. int VC_API vlViewRestore (int Index)
  965. {
  966.   return (*pfViewRestore)( Index );
  967. }
  968.  
  969. //-----------------------------------------------
  970. int VC_API vlViewCount ()
  971. {
  972.   return (*pfViewCount)();
  973. }
  974.  
  975. //-----------------------------------------------
  976. int VC_API vlViewIndex (LPCTSTR szName, int ID)
  977. {
  978.   return (*pfViewIndex)( szName, ID );
  979. }
  980.  
  981. //-----------------------------------------------
  982. int VC_API vlPrnRectAdd (double X, double Y, double W, double H, double Angle)
  983. {
  984.   return (*pfPrnRectAdd)( X, Y, W, H, Angle );
  985. }
  986.  
  987. //-----------------------------------------------
  988. BOOL VC_API vlPrnRectDelete (int Index)
  989. {
  990.   return (*pfPrnRectDelete)( Index );
  991. }
  992.  
  993. //-----------------------------------------------
  994. int VC_API vlPrnRectCount ()
  995. {
  996.   return (*pfPrnRectCount)();
  997. }
  998.  
  999. //-----------------------------------------------
  1000. BOOL VC_API vlPrnRectPrint (int Index, HDC hPrintDC, double ScaleX, double ScaleY, double OriginX, double OriginY)
  1001. {
  1002.   return (*pfPrnRectPrint)( Index, hPrintDC, ScaleX, ScaleY, OriginX, OriginY );
  1003. }
  1004.  
  1005. //-----------------------------------------------
  1006. BOOL VC_API vlBlockBegin ()
  1007. {
  1008.   return (*pfBlockBegin)();
  1009. }
  1010.  
  1011. //-----------------------------------------------
  1012. int VC_API vlBlockAdd (LPCTSTR szName, double x, double y)
  1013. {
  1014.   return (*pfBlockAdd)( szName, x, y );
  1015. }
  1016.  
  1017. //-----------------------------------------------
  1018. int VC_API vlBlockAddF (LPCTSTR szFileName, LPCTSTR szBlockName)
  1019. {
  1020.   return (*pfBlockAddF)( szFileName, szBlockName );
  1021. }
  1022.  
  1023. //-----------------------------------------------
  1024. BOOL VC_API vlBlockDelete (int Index)
  1025. {
  1026.   return (*pfBlockDelete)( Index );
  1027. }
  1028.  
  1029. //-----------------------------------------------
  1030. int VC_API vlBlockActive (int Index)
  1031. {
  1032.   return (*pfBlockActive)( Index );
  1033. }
  1034.  
  1035. //-----------------------------------------------
  1036. int VC_API vlBlockCount ()
  1037. {
  1038.   return (*pfBlockCount)();
  1039. }
  1040.  
  1041. //-----------------------------------------------
  1042. int VC_API vlBlockIndex (LPCTSTR szName, int ID)
  1043. {
  1044.   return (*pfBlockIndex)( szName, ID );
  1045. }
  1046.  
  1047. //-----------------------------------------------
  1048. int VC_API vlAddPoint (double X, double Y)
  1049. {
  1050.   return (*pfAddPoint)( X, Y );
  1051. }
  1052.  
  1053. //-----------------------------------------------
  1054. int VC_API vlAddLine (double X1, double Y1, double X2, double Y2)
  1055. {
  1056.   return (*pfAddLine)( X1, Y1, X2, Y2 );
  1057. }
  1058.  
  1059. //-----------------------------------------------
  1060. int VC_API vlAddCircle (double X, double Y, double Rad)
  1061. {
  1062.   return (*pfAddCircle)( X, Y, Rad );
  1063. }
  1064.  
  1065. //-----------------------------------------------
  1066. int VC_API vlAddCircle3P (double X1, double Y1, double X2, double Y2, double X3, double Y3)
  1067. {
  1068.   return (*pfAddCircle3P)( X1, Y1, X2, Y2, X3, Y3 );
  1069. }
  1070.  
  1071. //-----------------------------------------------
  1072. int VC_API vlAddArc (double X, double Y, double Rad, double Ang1, double Ang2)
  1073. {
  1074.   return (*pfAddArc)( X, Y, Rad, Ang1, Ang2 );
  1075. }
  1076.  
  1077. //-----------------------------------------------
  1078. int VC_API vlAddArc3P (double X1, double Y1, double X2, double Y2, double X3, double Y3)
  1079. {
  1080.   return (*pfAddArc3P)( X1, Y1, X2, Y2, X3, Y3 );
  1081. }
  1082.  
  1083. //-----------------------------------------------
  1084. int VC_API vlAddEllipse (double X, double Y, double Rh, double Rv, double Angle)
  1085. {
  1086.   return (*pfAddEllipse)( X, Y, Rh, Rv, Angle );
  1087. }
  1088.  
  1089. //-----------------------------------------------
  1090. BOOL VC_API vlSetTextParam (int Mode, double Var)
  1091. {
  1092.   return (*pfSetTextParam)( Mode, Var );
  1093. }
  1094.  
  1095. //-----------------------------------------------
  1096. BOOL VC_API vlSetTextParams (int Align, double Height, double Angle, double ScaleW, double Oblique, double HInter, double VInter)
  1097. {
  1098.   return (*pfSetTextParams)( Align, Height, Angle, ScaleW, Oblique, HInter, VInter);
  1099. }
  1100.  
  1101. //-----------------------------------------------
  1102. int VC_API vlAddText (double X, double Y, LPCTSTR szStr)
  1103. {
  1104.   return (*pfAddText)( X, Y, szStr );
  1105. }
  1106.  
  1107. //-----------------------------------------------
  1108. BOOL VC_API vlPolylineBegin ()
  1109. {
  1110.   return (*pfPolylineBegin)();
  1111. }
  1112.  
  1113. //-----------------------------------------------
  1114. BOOL VC_API vlVertex (double X, double Y)
  1115. {
  1116.   return (*pfVertex)( X, Y );
  1117. }
  1118.  
  1119. //-----------------------------------------------
  1120. BOOL VC_API vlVertexR (double X, double Y, double Radius)
  1121. {
  1122.   return (*pfVertexR)( X, Y, Radius );
  1123. }
  1124.  
  1125. //-----------------------------------------------
  1126. BOOL VC_API vlVertexF (double X, double Y, BOOL bOnCurve)
  1127. {
  1128.   return (*pfVertexF)( X, Y, bOnCurve );
  1129. }
  1130.  
  1131. //-----------------------------------------------
  1132. BOOL VC_API vlVertexB (double X, double Y, double Bulge)
  1133. {
  1134.   return (*pfVertexB)( X, Y, Bulge);
  1135. }
  1136.  
  1137. //-----------------------------------------------
  1138. int VC_API vlAddPolyline (int SmoothType, BOOL bClosed)
  1139. {
  1140.   return (*pfAddPolyline)( SmoothType, bClosed);
  1141. }
  1142.  
  1143. //-----------------------------------------------
  1144. int VC_API vlAddBlockIns (int Index, double X, double Y, double Angle, double Xscale, double Yscale)
  1145. {
  1146.   return (*pfAddBlockIns)( Index, X, Y, Angle, Xscale, Yscale );
  1147. }
  1148.  
  1149. //-----------------------------------------------
  1150. int VC_API vlAddHatch (int Index, double Scale, double Angle)
  1151. {
  1152.   return (*pfAddHatch)( Index, Scale, Angle);
  1153. }
  1154.  
  1155. //-----------------------------------------------
  1156. int VC_API vlAddRaster (LPCTSTR FileName, double X, double Y, double ResH, double ResV)
  1157. {
  1158.   return (*pfAddRaster)( FileName, X, Y, ResH, ResV );
  1159. }
  1160.  
  1161. //-----------------------------------------------
  1162. int VC_API vlAddRect (double X, double Y, double W, double H, double Ang, double Rad)
  1163. {
  1164.   return (*pfAddRect)( X, Y, W, H, Ang, Rad);
  1165. }
  1166.  
  1167. //-----------------------------------------------
  1168. int VC_API vlAddDimHor (double X1, double Y1, double X2, double Y2, double Y)
  1169. {
  1170.   return (*pfAddDimHor)( X1, Y1, X2, Y2, Y);
  1171. }
  1172.  
  1173. //-----------------------------------------------
  1174. int VC_API vlAddDimVer (double X1, double Y1, double X2, double Y2, double X)
  1175. {
  1176.   return (*pfAddDimVer)( X1, Y1, X2, Y2, X);
  1177. }
  1178.  
  1179. //-----------------------------------------------
  1180. int VC_API vlAddDimPar (double X1, double Y1, double X2, double Y2, double Off)
  1181. {
  1182.   return (*pfAddDimPar)( X1, Y1, X2, Y2, Off);
  1183. }
  1184.  
  1185. //-----------------------------------------------
  1186. int VC_API vlAddDimAng (double Xcen, double Ycen, double X1, double Y1, double X2, double Y2, double Off)
  1187. {
  1188.   return (*pfAddDimAng)( Xcen, Ycen, X1, Y1, X2, Y2, Off);
  1189. }
  1190.  
  1191. //-----------------------------------------------
  1192. int VC_API vlAddDimRad (double Xcen, double Ycen, double Xrad, double Yrad, double Off)
  1193. {
  1194.   return (*pfAddDimRad)( Xcen, Ycen, Xrad, Yrad, Off);
  1195. }
  1196.  
  1197. //-----------------------------------------------
  1198. int VC_API vlAddDimDiam (double Xcen, double Ycen, double Xrad, double Yrad)
  1199. {
  1200.   return (*pfAddDimDiam)( Xcen, Ycen, Xrad, Yrad);
  1201. }
  1202.  
  1203. //-----------------------------------------------
  1204. int VC_API vlAddDimOrd (double X, double Y, double Xtxt, double Ytxt, BOOL bYord)
  1205. {
  1206.   return (*pfAddDimOrd)( X, Y, Xtxt, Ytxt, bYord);
  1207. }
  1208.  
  1209. //-----------------------------------------------
  1210. int VC_API vlFileNew (HWND hwVec, DWGPROC pfDwgProc, LPCTSTR szTemplate)
  1211. {
  1212.   return (*pfFileNew)( hwVec, pfDwgProc, szTemplate);
  1213. }
  1214.  
  1215. //-----------------------------------------------
  1216. int VC_API vlFileOpen (HWND hwVec, DWGPROC pfDwgProc, LPCTSTR szFileName)
  1217. {
  1218.   return (*pfFileOpen)( hwVec, pfDwgProc, szFileName);
  1219. }
  1220.  
  1221. //-----------------------------------------------
  1222. BOOL VC_API vlFileLoad (int Mode, LPCTSTR szFileName)
  1223. {
  1224.   return (*pfFileLoad)( Mode, szFileName);
  1225. }
  1226.  
  1227. //-----------------------------------------------
  1228. BOOL VC_API vlFileSave (int Mode, LPCTSTR szFileName)
  1229. {
  1230.   return (*pfFileSave)( Mode, szFileName);
  1231. }
  1232.  
  1233. //-----------------------------------------------
  1234. BOOL VC_API vlFileLoadMem (void* pMem)
  1235. {
  1236.   return (*pfFileLoadMem)( pMem );
  1237. }
  1238.  
  1239. //-----------------------------------------------
  1240. int VC_API vlFileSaveMem (void* pMem, int MaxSize)
  1241. {
  1242.   return (*pfFileSaveMem)( pMem, MaxSize);
  1243. }
  1244.  
  1245. //-----------------------------------------------
  1246. int VC_API vlGetEntity (int Mode, int Prm1, int Prm2)
  1247. {
  1248.   return (*pfGetEntity)( Mode, Prm1, Prm2);
  1249. }
  1250.  
  1251. //-----------------------------------------------
  1252. BOOL VC_API vlSelect (BOOL bSelect, int Index)
  1253. {
  1254.   return (*pfSelect)( bSelect, Index);
  1255. }
  1256.  
  1257. //-----------------------------------------------
  1258. int VC_API vlSelectByPoint (BOOL bSelect, double X, double Y)
  1259. {
  1260.   return (*pfSelectByPoint)( bSelect, X, Y );
  1261. }
  1262.  
  1263. //-----------------------------------------------
  1264. int VC_API vlSelectByRect (BOOL bSelect, double Left, double Bottom, double Right, double Top, BOOL Cross)
  1265. {
  1266.   return (*pfSelectByRect)( bSelect, Left, Bottom, Right, Top, Cross);
  1267. }
  1268.  
  1269. //-----------------------------------------------
  1270. int VC_API vlSelectByPolygon (BOOL bSelect, const VLPOINT* Ver, int nver, BOOL bCross)
  1271. {
  1272.   return (*pfSelectByPolygon)( bSelect, Ver, nver, bCross );
  1273. }
  1274.  
  1275. //-----------------------------------------------
  1276. BOOL VC_API vlCbCut ()
  1277. {
  1278.   return (*pfCbCut)();
  1279. }
  1280.  
  1281. //-----------------------------------------------
  1282. BOOL VC_API vlCbCopy ()
  1283. {
  1284.   return (*pfCbCopy)();
  1285. }
  1286.  
  1287. //-----------------------------------------------
  1288. BOOL VC_API vlCbPaste (double X, double Y)
  1289. {
  1290.   return (*pfCbPaste)( X, Y);
  1291. }
  1292.  
  1293. //-----------------------------------------------
  1294. int VC_API vlCopy (int iObj, double dx, double dy)
  1295. {
  1296.   return (*pfCopy)( iObj, dx, dy);
  1297. }
  1298.  
  1299. //-----------------------------------------------
  1300. BOOL VC_API vlMove (int iObj, double dx, double dy)
  1301. {
  1302.   return (*pfMove)( iObj, dx, dy);
  1303. }
  1304.  
  1305. //-----------------------------------------------
  1306. BOOL VC_API vlRotate (int iObj, double X, double Y, double Angle)
  1307. {
  1308.   return (*pfRotate)( iObj, X, Y, Angle);
  1309. }
  1310.  
  1311. //-----------------------------------------------
  1312. BOOL VC_API vlScale (int iObj, double X, double Y, double Scale)
  1313. {
  1314.   return (*pfScale)( iObj, X, Y, Scale);
  1315. }
  1316.  
  1317. //-----------------------------------------------
  1318. BOOL VC_API vlMirror (int iObj, double X1, double Y1, double X2, double Y2)
  1319. {
  1320.   return (*pfMirror)( iObj, X1, Y1, X2, Y2);
  1321. }
  1322.  
  1323. //-----------------------------------------------
  1324. BOOL VC_API vlErase (int iObj)
  1325. {
  1326.   return (*pfErase)( iObj );
  1327. }
  1328.  
  1329. //-----------------------------------------------
  1330. BOOL VC_API vlExplode (int iObj)
  1331. {
  1332.   return (*pfExplode)( iObj );
  1333. }
  1334.  
  1335. //-----------------------------------------------
  1336. BOOL VC_API vlUndo ()
  1337. {
  1338.   return (*pfUndo)();
  1339. }
  1340.  
  1341. //-----------------------------------------------
  1342. BOOL VC_API vlRedo ()
  1343. {
  1344.   return (*pfRedo)();
  1345. }
  1346.  
  1347. //-----------------------------------------------
  1348. BOOL VC_API vlPolyVerInsert (int iEnt, int iVer)
  1349. {
  1350.   return (*pfPolyVerInsert)( iEnt, iVer );
  1351. }
  1352.  
  1353. //-----------------------------------------------
  1354. BOOL VC_API vlPolyVerDelete (int iEnt, int iVer)
  1355. {
  1356.   return (*pfPolyVerDelete)( iEnt, iVer );
  1357. }
  1358.  
  1359. //-----------------------------------------------
  1360. BOOL VC_API vlPolyVerGet (int iEnt, int iVer, double* pX, double* pY, double* pPrm)
  1361. {
  1362.   return (*pfPolyVerGet)( iEnt, iVer, pX, pY, pPrm );
  1363. }
  1364.  
  1365. //-----------------------------------------------
  1366. BOOL VC_API vlPolyVerSet (int iEnt, int iVer, double X, double Y, double Prm)
  1367. {
  1368.   return (*pfPolyVerSet)( iEnt, iVer, X, Y, Prm );
  1369. }
  1370.  
  1371. //-----------------------------------------------
  1372. BOOL VC_API vlGripGet (int iObj, int iGrip, double* pX, double* pY)
  1373. {
  1374.   return (*pfGripGet)( iObj, iGrip, pX, pY );
  1375. }
  1376.  
  1377. //-----------------------------------------------
  1378. BOOL VC_API vlGripSet (int iObj, int iGrip, double X, double Y)
  1379. {
  1380.   return (*pfGripSet)( iObj, iGrip, X, Y );
  1381. }
  1382.  
  1383. //-----------------------------------------------
  1384. BOOL VC_API vlGripMove (int iObj, int iGrip, double dx, double dy)
  1385. {
  1386.   return (*pfGripMove)( iObj, iGrip, dx, dy );
  1387. }
  1388.  
  1389. //-----------------------------------------------
  1390. int VC_API vlPropGet (int PropID, int iObj, void* pData)
  1391. {
  1392.   return (*pfPropGet)( PropID, iObj, pData );
  1393. }
  1394.  
  1395. //-----------------------------------------------
  1396. int VC_API vlPropGetInt (int PropID, int iObj)
  1397. {
  1398.   return (*pfPropGetInt)( PropID, iObj );
  1399. }
  1400.  
  1401. //-----------------------------------------------
  1402. double VC_API vlPropGetDbl (int PropID, int iObj)
  1403. {
  1404.   return (*pfPropGetDbl)( PropID, iObj );
  1405. }
  1406.  
  1407. //-----------------------------------------------
  1408. int VC_API vlPropPut (int PropID, int iObj, const void* pData)
  1409. {
  1410.   return (*pfPropPut)( PropID, iObj, pData );
  1411. }
  1412.  
  1413. //-----------------------------------------------
  1414. int VC_API vlPropPutInt (int PropID, int iObj, int Value)
  1415. {
  1416.   return (*pfPropPutInt)( PropID, iObj, Value );
  1417. }
  1418.  
  1419. //-----------------------------------------------
  1420. int VC_API vlPropPutDbl (int PropID, int iObj, double Value)
  1421. {
  1422.   return (*pfPropPutDbl)( PropID, iObj, Value );
  1423. }
  1424.  
  1425. //-----------------------------------------------
  1426. BOOL VC_API vlZoom (double Scale)
  1427. {
  1428.   return (*pfZoom)( Scale );
  1429. }
  1430.  
  1431. //-----------------------------------------------
  1432. BOOL VC_API vlZoomRect (double Left, double Bottom, double Right, double Top)
  1433. {
  1434.   return (*pfZoomRect)( Left, Bottom, Right, Top );
  1435. }
  1436.  
  1437. //-----------------------------------------------
  1438. BOOL VC_API vlZoomPan (double dx, double dy)
  1439. {
  1440.   return (*pfZoomPan)( dx, dy );
  1441. }
  1442.  
  1443. //-----------------------------------------------
  1444. BOOL VC_API vlCoordWinToDwg (int Xwin, int Ywin, double* pXdwg, double* pYdwg)
  1445. {
  1446.   return (*pfCoordWinToDwg)( Xwin, Ywin, pXdwg, pYdwg );
  1447. }
  1448.  
  1449. //-----------------------------------------------
  1450. BOOL VC_API vlCoordDwgToWin (double Xdwg, double Ydwg, int* pXwin, int* pYwin)
  1451. {
  1452.   return (*pfCoordDwgToWin)( Xdwg, Ydwg, pXwin, pYwin );
  1453. }
  1454.  
  1455. //-----------------------------------------------
  1456. BOOL VC_API vlLenWinToDwg (int Lwin, double* pLdwg)
  1457. {
  1458.   return (*pfLenWinToDwg)( Lwin, pLdwg );
  1459. }
  1460.  
  1461. //-----------------------------------------------
  1462. BOOL VC_API vlLenDwgToWin (double Ldwg, int* pLwin)
  1463. {
  1464.   return (*pfLenDwgToWin)( Ldwg, pLwin );
  1465. }
  1466.  
  1467. //-----------------------------------------------
  1468. BOOL VC_API vlSetDrawPen (double Width, COLORREF Color)
  1469. {
  1470.   return (*pfSetDrawPen)(Width, Color);
  1471. }
  1472.  
  1473. //-----------------------------------------------
  1474. BOOL VC_API vlDrawPoint (double X, double Y, int Type, int Size)
  1475. {
  1476.   return (*pfDrawPoint)( X, Y, Type, Size);
  1477. }
  1478.  
  1479. //-----------------------------------------------
  1480. BOOL VC_API vlDrawLine (double X1, double Y1, double X2, double Y2)
  1481. {
  1482.   return (*pfDrawLine)( X1, Y1, X2, Y2 );
  1483. }
  1484.  
  1485. //-----------------------------------------------
  1486. BOOL VC_API vlDrawPolyline (const VLPOINT* Ver, int n_ver, BOOL bClosed)
  1487. {
  1488.   return (*pfDrawPolyline)( Ver, n_ver, bClosed );
  1489. }
  1490.  
  1491. //-----------------------------------------------
  1492. BOOL VC_API vlDrawPolygon (const VLPOINT* Ver, int n_ver, BOOL bFill, BOOL bBorder, COLORREF FillColor)
  1493. {
  1494.   return (*pfDrawPolygon)( Ver, n_ver, bFill, bBorder, FillColor);
  1495. }
  1496.  
  1497. //-----------------------------------------------
  1498. BOOL VC_API vlDrawCircle (double X, double Y, double Rad)
  1499. {
  1500.   return (*pfDrawCircle)( X, Y, Rad );
  1501. }
  1502.  
  1503. //-----------------------------------------------
  1504. BOOL VC_API vlDrawArc (double X, double Y, double Rad, double Angle1, double Angle2)
  1505. {
  1506.   return (*pfDrawArc)( X, Y, Rad, Angle1, Angle2 );
  1507. }
  1508.  
  1509. //-----------------------------------------------
  1510. BOOL VC_API vlDrawEllipse (double X, double Y, double Rh, double Rv, double Angle)
  1511. {
  1512.   return (*pfDrawEllipse)( X, Y, Rh, Rv, Angle );
  1513. }
  1514.  
  1515. //-----------------------------------------------
  1516. BOOL VC_API vlDrawText (double X, double Y, LPCTSTR szText)
  1517. {
  1518.   return (*pfDrawText)( X, Y, szText );
  1519. }
  1520.  
  1521. //-----------------------------------------------
  1522. BOOL VC_API vlDrawBitmap (HBITMAP hbm, int W, int H, double X, double Y, double ResX, double ResY)
  1523. {
  1524.   return (*pfDrawBitmap)(hbm,W,H,X,Y,ResX,ResY);
  1525. }
  1526.  
  1527. //-----------------------------------------------
  1528. BOOL VC_API vlDrawEntity (int Index, double Xbase, double Ybase, double Xins, double Yins, double Angle, double ScaleX, double ScaleY)
  1529. {
  1530.   return (*pfDrawEntity)( Index, Xbase, Ybase, Xins, Yins, Angle, ScaleX, ScaleY );
  1531. }
  1532.  
  1533. //-----------------------------------------------
  1534. BOOL VC_API vlExecute (int IdCmd)
  1535. {
  1536.   return (*pfExecute)( IdCmd );
  1537. }
  1538.  
  1539. //-----------------------------------------------
  1540. BOOL VC_API vlSetAccKey (int IdCmd, int VirtKey, int Flags)
  1541. {
  1542.   return (*pfSetAccKey)( IdCmd, VirtKey, Flags );
  1543. }
  1544.  
  1545. //-----------------------------------------------
  1546. BOOL VC_API vlClear (BOOL bSetDefLayout)
  1547. {
  1548.   return (*pfClear)( bSetDefLayout );
  1549. }
  1550.  
  1551. //-----------------------------------------------
  1552. BOOL VC_API vlSetFocus ()
  1553. {
  1554.   return (*pfSetFocus)();
  1555. }
  1556.  
  1557. //-----------------------------------------------
  1558. BOOL VC_API vlUpdate ()
  1559. {
  1560.   return (*pfUpdate)();
  1561. }
  1562.  
  1563. //-----------------------------------------------
  1564. BOOL VC_API vlRedraw ()
  1565. {
  1566.   return (*pfRedraw)();
  1567. }
  1568.  
  1569. //-----------------------------------------------
  1570. BOOL VC_API vlReset ()
  1571. {
  1572.   return (*pfReset)();
  1573. }
  1574.  
  1575. //-----------------------------------------------
  1576. BOOL VC_API vlPrint (HDC hPrintDC, double Left, double Bottom, double Right, double Top, double ScaleX, double ScaleY, double OriginX, double OriginY)
  1577. {
  1578.   return (*pfPrint)( hPrintDC, Left, Bottom, Right, Top, ScaleX, ScaleY, OriginX, OriginY );
  1579. }
  1580.  
  1581. //-----------------------------------------------
  1582. BOOL VC_API vlDoRaster (LPCTSTR szFileName, double Left, double Bottom, double Right, double Top, double Res)
  1583. {
  1584.   return (*pfDoRaster)(szFileName,Left,Bottom,Right,Top,Res);
  1585. }
  1586.  
  1587. //-----------------------------------------------
  1588. BOOL VC_API vlGetWinSize (HWND hWnd, int* pW, int* pH)
  1589. {
  1590.   return (*pfGetWinSize)( hWnd, pW, pH);
  1591. }
  1592.  
  1593. //-----------------------------------------------
  1594. BOOL VC_API vlSetTimer (int ID, int Elapse)
  1595. {
  1596.   return (*pfSetTimer)( ID, Elapse );
  1597. }
  1598.  
  1599. //-----------------------------------------------
  1600. BOOL VC_API vlKillTimer (int ID)
  1601. {
  1602.   return (*pfKillTimer)( ID );
  1603. }
  1604.