I want to instantiate 2 property pages from the same class and template, because the settings they show are basically the same.
CCPUSettingsSheet sheet;
CCPUSettingsPage cpucore1, cpucore2;
sheet.AddPage(&cpucore1);
sheet.AddPage(&cpucore2);
The only problem is that they get the same tab label text, which is the caption field in their resource template. I need to assign a different text to each one, however.
Assuming CCPUSettingsPage
derives from CPropertyPage, you can use its public m_psp member to access its underlying PROPSHEETPAGE structure. From there, you can write something like:
cpucore1.m_psp.dwFlags |= PSP_USETITLE;
cpucore1.m_psp.pszTitle = "First Tab";
cpucore2.m_psp.dwFlags |= PSP_USETITLE;
cpucore2.m_psp.pszTitle = "Second Tab";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With