tags:

views:

83

answers:

2

I am porting a C++ COleControl that frequently makes calls to SetModifiedFlag(bool). What is the equivalent call in .NET? The MFC documentation implies that this is only necessary when persistent state has changed, and I am unsure what would be considered persistent state in .NET controls.

SetModifiedFlag();
A: 

It's unclear from your question what you are converting to exactly, but it sounds to me like your conversion might be a little too exact. I can't think of an adequate analog to MFC's CDocument object so it's likely that sticking to the CDocument functionality will lead you to a lot of dead-ends and kludged functionality. You're probably better off translating on a conceptual basis and deconstructing things like calls to SetModifiedFlag into their intent rather than viewing them on a one-for-one basis.

Jacob Proffitt
A: 

I don't think there's really an equivalent to that in .Net. If you're porting over a control that doesn't have any link through external properties/methods, then you wouldn't need something equivalent to that. If you do need external properties/methods, then you might need to search for information on C# and COM. I'm guessing you're porting an ActiveX Control from MFC to .Net?

Mike