Kadmos.com

  Home | Products | Download | Purchase | Support | Language

Google
Search site:

Products
DXFReader ActiveX Control
IXF ActiveX Control
Postel ActiveX Control
Tech Support
OnLine Support
Phone Support
Sample Code
Registered Users
FAQ
References
Kadmos
Contact Kadmos
Environment
Customer List
Newsletter
Download
ActiveX Controls
Updates
Purchase
Price List
International Resellers
Our Guarantee
Shipment Options
Payment Options
Shopping Cart
    Kadmos.com - Frequently Asked Questions

Frequently Asked Questions

Back to FAQ index

How do I access Hidden Properties in C++. I need to get the ANGDIR property, but it is not available as a part of the OCX.

The procedure listed on:

http://kadmos.com/activex/dxfreaderinstallation.html

doesn't create the wrapper code for Microsoft Visual C++ for hidden properties.

Here how you can do:

  1. Create the IDL file for DXFReader. You can create it easily using the "OLE View" tool coming with Visual Studio or simply click here.
  2. Inside this file you will find the declarations for also hidden properties, for example for ANGDIR you will find:

     [id(0x4003007e), propget, hidden, helpstring("1 = clockwise angles, 0 = counterclockwise."), helpcontext(0x00015f90)] HRESULT ANGDIR([out, retval] short* ANGDIR);

     [id(0x4003007e), propput, hidden, helpstring("1 = clockwise angles, 0 = counterclockwise."), helpcontext(0x00015f90)] HRESULT ANGDIR([in] short ANGDIR);


    Please note the ID values (showed in bold)
  3. modify the DXFReader class header file (xfreader.h) adding:

    short GetANGDIR(); void SetANGDIR(short nNewValue);
  4. modify the IDispatch wrapper class created by Microsoft Visual C++ (xfreader.cpp) adding:

    short CXFReader::GetANGDIR()
    {
    short result;
    InvokeHelper(0x4003007e, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
    return result;
    }

    void CXFReader::SetANGDIR(short nNewValue)
    {
    static BYTE parms[] = VTS_I2;
    InvokeHelper(0x4003007e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,nNewValue);
    }

    Note again the ID values in bold.
  5. Repeat for every hidden properties you need.

Copyright © 2010 Kadmos.com. All rights reserved. Privacy Policy