Just curious if this is how it is supposed to behave, but from what I am seeing this is kind of a pre notification event as in it is letting you know that something WILL be changed as opposed to the fact that something HAS changed. Is this how it is supposed to be?
For example I added this event to the CStaticDialog class in the CfxCS62TestMfc project that I have as a sample as follows
By the way am I using the appropriate DISPID for ChangedByUser?
//declare event
ON_EVENT( CStaticDialog, IDC_CHART1, 16, OnChangedByUser, VTS_DISPATCH, VTS_DISPATCH )
void CStaticDialog::OnChangedByUser( LPDISPATCH sender, LPDISPATCH args )
{
if( m_chartPtr->Dirty){
VARIANT_BOOL test = m_chartPtr->Chart3D;
m_chartPtr->Dirty = VARIANT_FALSE;
}
}
When I click on the 3D/2D button in the toolbar I get into this function, but for instance if the Chart started out as 3D when I get into this method test evaluates to VARIANT_TRUE. The next time I click this button in the control which should change it back from 2D to 3D test evaluated to VARIANT_FALSE. This tells me that this is not really fired when something HAS changed, but rather that something will change. Is there a notification to know when something CHANGED. I have other dialogs with additional information that I would like to update when something has changed in the chartfx window and would rather not have to poll this object constantly to do it.
How do I know which DISPID to use for which event? It was not 100% clear from the samples I got from:
http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxCS62&Source=http://support.softwarefx.com/kb/190/1/011.htm
Thanks
-Mac