ActiveX control stays marked dirty after save 
Author Message
 ActiveX control stays marked dirty after save

I mark my ActiveX control as dirty when a property is
changed via a property page at design time. This is
working, since the container indicates that the file is
dirty after the changes were made.

The problem is that after the container saves the control,
the control is still marked as dirty.

Must I call SetDirty(FALSE) somewhere?

If so, where?

Thanks for your help.

Johan Zietsman



Sat, 05 Mar 2005 22:41:22 GMT  
 ActiveX control stays marked dirty after save
ATL implementation of IPersistStreamInit::Save ignores fClearDirty flag
for some reason. You will need to override the method, call inherited
implementation, and then SetDirty(false) if fClearDirty parameter is
true.

You should do the same with all persistence mechanisms you support, such
as IPersistPropertyBag and so on.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I mark my ActiveX control as dirty when a property is
> changed via a property page at design time. This is
> working, since the container indicates that the file is
> dirty after the changes were made.

> The problem is that after the container saves the control,
> the control is still marked as dirty.

> Must I call SetDirty(FALSE) somewhere?

> If so, where?

> Thanks for your help.

> Johan Zietsman



Sat, 05 Mar 2005 23:23:59 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. question mark on save file

2. Control webbrowser ActiveX control in composit ActiveX control

3. How to save an ActiveX Control in a MFC app

4. How to save an ActiveX Control?

5. My ActiveX Control properties don't save

6. ActiveX control inside another activex control

7. Need help with ActiveX control containing other activex controls

8. ATL ActiveX Control hosting code fails to initialize ActiveX Controls on Win9x

9. ActiveX control inside another ActiveX control

10. Need help with ActiveX control containing other activex controls

11. ActiveX control in an ActiveX control

12. Modify Activex Control Properties from other Activex Control.

 

 
Powered by phpBB® Forum Software