Jump to content
Software FX Community

open Property Dialog programmatically


hminky

Recommended Posts

Dear, More questions. 

1.

Can I open property dialog programmatically?

Which objects has Property Dialog?

Users are a little confusing to view property dialog what they want.

so, I want to collect all items which have property dialog.

such as, X Axis, Y Axis, Legend Box, Titles, Series, etc

then users can change more easily to change settings.

2.

I want to change MinorGrid, MinorGridlines, MinorStor, MinorTickMark.

Is there Property dialog for MinorXXX?

Link to comment
Share on other sites

  • 2 weeks later...

Dear,I finally found out "ShowPropertiesDialog"but It was difficult to use correctly,for example, to show AxisX property dialog,I tried following code ( using MSVC++ 2005 )

1. using _Ptr //not workingm_chartPtr->ShowPropertiesDialog( m_chartPtr->AxisX->_Ptr, 0);

2. using _variant_t // looks working but Release() error occurs at program terminates._variant_t axisX;axisX.vt = VT_DISPATCH;axisX.pdispVal = (IDispatch*)m_chartPtr->AxisX;m_chartPtr->ShowPropertiesDialog(axisX, 2);

3. using VARIANT // working good, but using a raw_ShowPropertiesDialogVARIANT axisX;axisX.vt = VT_DISPATCH;axisX.pdispVal = (IDispatch*)m_chartPtr->AxisX; // !!do not use m_chartPtr->AxisX->_Ptrm_chartPtr->raw_ShowPropertiesDialog(axisX, 2);

4. using _variant_t and VARIANT together // working good but complicated_variant_t axisX;axisX.vt = VT_DISPATCH;axisX.pdispVal = (IDispatch*)m_chartPtr->AxisX;_variant_t varX;varX.Attach(axisX);m_chartPtr->ShowPropertiesDialog(varX, 2);varX.Detach();

question 1.do you have any comments or guide for using VARIANT or _variant_t?Is there a good way to convert between VARIANT, _variant_t, and _xxxPtr (ex, _AxisPtr)

question 2.Is there a good way to use Method 2 without errors?

question 3.What is the meaning of _Ptr in m_chartPtr->AxisX->_Ptr?When can I use _Ptr?

Best Regards

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...