Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I have to improve an old c++ atl drawing control which has some public properties.
During his configuration on a winform c#, I made changes via the devstudio properties toolbox. Once I ran the c# application, I discovered the modified properties like his title,... were not the one I modified during design time.

I checked the code and from googling, I got the procedure which apparently is using a IPersistPropertiesBag to store these kind of properties.

The problem was once I saved the modified winform (certainly to persist the newly property value), It did not reach the IPersistPropertyBag::Save(...).

Could somebody provides me more information on the best way to proceed.
Which atl persistence interface is invoked by devstudio 2019 to store the modified settings into the resource file ?

Thank you very much in advance.
Enjoy the end year season.
Best regards.
MiQi

What I have tried:

The modification applied to persist these properies are based from the two following acticles:

ATL Persistence Implementations


14.3 Using Property Bags in C++ Code


What they explain seems logical but I am just wondering if from devstudio directly this principle might work.
Posted
Updated 20-Dec-19 23:36pm
v2

1 solution

These abstract classes are used as parent class for your implementation. So create a child class.

You shouldnt rely on the work of these base implementations because of security reason. Read the documentaion is boring, but it helps.
 
Share this answer
 
Comments
SuperMiQi 20-Dec-19 18:07pm    
Hello,
Thank you for your Reply.
I did my own implementation of IPersistPropertyBag and I could reach it via a query interface on the put xxx property. The issue is how to create an instance of IPropertyBag and how to be sure this will be store in a resource location in the container. If you have already experience with these interface, I would be really glad to read good related links about it. What I found was most of the time related to MFC implementation and easily using the dopropexchange layer. If you have good atl related links about my query it would really be a pleasure to jump into. Thanks in advance. Best end seasons greetings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900