none
Changing MFC property sheet look RRS feed

  • Question

  • I have the following code which does not show my property sheet in the OutlookBar Style.

             AppPropSheet derives from CMFCPropertySheet
            CRunJobPage and CCreateJobPage Derives from CMFCPropertyPage

            AppPropSheet sht(_T("Backup"));

             CRunJobPage runjobpg;
             CCreateJobPage crjobpg;
                    sht.AddPage(&crjobpg);
            sht.AddPage(&runjobpg);
          
            sht.m_shtSelImages.Create(IDB_BITMAP28, 32, 1, RGB(128, 128, 128));
            sht.SetIconsList(sht.m_shtSelImages.m_hImageList);
            sht.SetLook(CMFCPropertySheet::PropSheetLook_OutlookBar, 32);
            
            sht.m_psh.dwFlags |= PSH_NOAPPLYNOW;
           sht.DoModal();

    Regards,

    Ramesh D

    Friday, August 16, 2019 4:20 PM

All replies

  • Hello,

    Thank you for posting here.

    I made a test with your code, but I failed to reproduce your issue. It would be better if you could share us a demo which can reproduce the error.

    Best Regards,

    Suarez Zhou

    Tuesday, August 20, 2019 5:31 AM
  • Hi,

    Solved partially the problem. I had changed the CPropertySheet and CPropertyPage based application to one based on CMFCPropertySheet and CMFCPropertyPage. I did not change all instances of CPropertyPage and CPropertySheet, that seemed to have caused the problem.

    There is still a program crashing problem with the CMFCPropertySheet::PropSheetLook_OneNoteTabs style.

    I'll be looking into it further.

    Regards,

    Ramesh D.

    Friday, August 23, 2019 5:50 AM
  • Hi,

    I am glad you got your solution, we appreciated you shared us your solution, we also hope you can mark it as an answer.By marking a post as Answered or Helpful, you help others find the answer faster.

    Best Regards,

    Suarez Zhou

    Tuesday, August 27, 2019 9:01 AM
  • The problem is partially solved. I am not able to get the CMFCPropertySheet::PropSheetLook_OneNoteTabs style.

    Thanks,

    Best Regards

    Ramesh D.

    Wednesday, September 4, 2019 6:19 AM
  • The problem is partially solved. I am not able to get the CMFCPropertySheet::PropSheetLook_OneNoteTabs style.

    Does this help you: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/46190828-8412-4801-b9d1-f64a9a5cc1b4/cmfcpropertysheetpropsheetlookonenotetabs-asserts-in-debug?forum=vcgeneral

    There they say that this style asserts when you link MFC statically. So try to link MFC as shared.

    Regards, Guido

    Wednesday, September 4, 2019 6:29 AM