Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Guys I have a question with regards to PropertyPages and PropertySheets with MFC and VS 2017.

I'm currently merging a project from VS 2008 to VS 2017. This is written in C++ and MFC and was originally written for 32 bit. In VS 2017 the goal is to merge it on to a 64 bit platform.

Anyway one of the controls uses the CPropertyPage and CPropertySheet classes. In VS 2008 this works very well. However in VS 2017 (I'm running 15.9.14) I'm having a terrible time of it. In the property page classes, the property pages stack classes are getting corrupted. If I go system font on the controls I get Comctrl32.dll exceptions. Also when I go back to basics and start with a fresh PropertyPage and Propertysheet classes I have to manually associate the control ID's etc. This is most weird. Also I did use the CMFCPropertyPage and CMFCPropertySheet classes.

The question I'm posing would anyone have a sample MFC VS 2017 project that uses property pages/sheets that I could have a look at? Also some tips and tricks would be most appreciated.

Many thanks in advance. I realise some of these are silly questions but I figure a few people might find themselves in my boat so I figured it was a question worth asking.

What I have tried:

What I have tried to resolve this issue was the following,

*Re ordering the members and declaration in my CPropertyPage classes.
*In the resource dialog changing the system font and shifting the font to MS Sans Serif 8 point.
*Creating a fresh property page and sheet.
Posted
Updated 22-Aug-19 5:27am
Comments
Shao Voon Wong 24-Aug-19 3:05am    
Does it work correctly in 32bit on VS 2017? Did you tried clean and rebuild the projects?
D_code_writer 24-Aug-19 5:05am    
Shao - That is correct sir I did a complete rebuild and clean on the 64 bit version. However the goal was to go to 64 bit so I didn't try the 32 bit road in VS 2017
Shao Voon Wong 24-Aug-19 6:00am    
You should have made sure the 32bit is working first.
D_code_writer 24-Aug-19 7:29am    
Maybe mate but it would have been academic since the whole point of this exercise was the 64 bit conversion.

1 solution

Have a look at a project called NewControls in the visual studio 2010 sample pack. You can find it here : VCSamples/VC2010Samples/MFC/Visual C++ 2008 Feature Pack/NewControls at GitHub[^].

That sample app has a property sheet with six pages which demonstrate controls added to MFC in 2010.
 
Share this answer
 
Comments
Rick York 22-Aug-19 13:46pm    
Personally, I prefer to implement property pages with a base class known to the sheet and then no other header files. In fact, the vast majority of dialogs I write these days have no headers. Actually, I can't remember the last time I made a header file for a dialog. There's just really no need for one when all you need is a single interface function to pass in the data to edited and I define the prototype in the header that defines the data.
D_code_writer 22-Aug-19 20:55pm    
Thank you kind sir - I appreciate it.

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