Jump to content
Software FX Community
a_n_d_y

Have to avoid change of axis-properties

Recommended Posts

a_n_d_y    0

Hi all,

our host-app crashes when we are going to change Decimals-property in Axis-properties dialog(when axis-format combo is set manually to "None").

To prevent this crash I'm catching InternalCommand-message and if we are pressing on Apply-button of that dialog I can avoid of processing this message by setting Handled-property to TRUE;

After reading of documentation I assumed that there's a way to access  to properties-dialog via sender-param, but I can't find any examples about using that param. Could you give to my any example?

here is the client-code:

BEGIN_EVENTSINK_MAP(CReportForm, CMyView)
  ON_EVENT(CReportForm, IDC_CHART, CHARTFX_EVENT_INTERNAL/*14*/, OnAxisSettingsChanged, VTS_DISPATCH VTS_DISPATCH)
END_EVENTSINK_MAP()

 void CReportForm::OnAxisSettingsChanged( LPDISPATCH sender, LPDISPATCH args )
{
  Cfx62::_CommandUIEventArgsPtr pCommandUiEventArgs = args;
  if (NULL == pCommandUiEventArgs)
  return;

  int i=0;
  if (pCommandUiEventArgs->GetID() == Cfx62::CommandID_AxesOptionsDlg)
  {
  m_bEnteringToAxisOptions = true;
  return;
  }

  if(m_bEnteringToAxisOptions && pCommandUiEventArgs->GetID() == Cfx62::CommandID_Apply)
  {
  // here I have to retrieve in some way
  pCommandUiEventArgs->Handled = TRUE;
  m_bEnteringToAxisOptions = false;
  }
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×