MapX is compared to the OCX import class of VC and C ++ Builder.

xiaoxiao2021-03-06  73

The following is a comparison of the OCX import class of VC and CB, how cumbersome can be seen by CB. It seems that MAPX with CB is a wrong choice.

Declaration Return Value: Tautoargs <0> _Args, and VC with Double Result;

Agent method: olepropertyget (_dispid, _args); and VC use getProperty (0x5, vt_r8, (void *) & result);

Returns Return_Args.getRetvariant (); and VC uses Return RESULT;

C Buildervc OCX_H content excerpts Interface CMapxRectangle: Public TDISPWrapper {.... double / * [vt_r8: 0] * / __fastcall get_height () {_tdispid _dispid (/ * height * / dispid (5)); TAutoArgs <0> _args; OlePropertyGet (_dispid, _args); return _args.GetRetVariant ();} ...} LIB_H excerpt: template void __fastcallCMapXRectangleDispT :: set_Height (double / * [VT_R8: 0] * / value) {_TDispid _dispid (* this, Oletext ("height"), Dispid (5)); tautoargs <1> _Args; _ARGS [1] = value; olepropertyput (_dispid, _args);} Double CcmapxRectangle: : GetHeight () {Double Result; getProperty (0x5, vt_r8, (void *) & result); Return Result;}

转载请注明原文地址:https://www.9cbs.com/read-92233.html

New Post(0)