diaya

I write the wizard used the method of "Ask Dr.GUI #46---Watermarks on Your Property Sheets" in studio .net2003 msdn. Now in the vista, the wizard 's header text and header bitmap don't be shown,but the water mark can be shown.

Anyone know why this is

Thanks in advance for any help.

Following codes :

The IE version is defined 0x400 ,eg: #define _WIN32_IE 0x0400

CSheet::CSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
...
m_hbmHeader = ::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_HEADER));
m_hbmWatermark = ::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_WATERMARK));
Construct(nIDCaption, pParentWnd, 0, m_hbmWatermark, NULL, m_hbmHeader);
m_psh.dwFlags |= PSH_WIZARD97;
AddPage(&m_pageWelcome);
AddPage(&m_pageImportInfo);
....
}

CPageWelcome m_pageWelcome;
CPageImportInfo m_pageImportInfo;


CPropertyPageFixed::CPropertyPageFixed(UINT nIDD, UINT nIDCaption)
: CPropertyPage(nIDD, nIDCaption)
{
}

void CPropertyPageFixed::Construct(UINT nIDTemplate, UINT nIDCaption, UINT nIDHeaderTitle,
UINT nIDHeaderSubTitle)
{
CPropertyPage::Construct(nIDTemplate, nIDCaption, nIDHeaderTitle, nIDHeaderSubTitle);
}


CPageWelcome::CPageWelcome()
: CPropertyPageEx(CPageWelcome::IDD)
{
Construct(IDD, AFX_IDS_APP_TITLE, 0, 0);
m_psp.dwFlags |= PSP_HIDEHEADER;
}

CPageImportInfo::CPageImportInfo()
: CPropertyPageEx(CPageImportInfo::IDD)
{
Construct(IDD, AFX_IDS_APP_TITLE, IDS_PAGE_IMPORTINFO_CAPTION, 0);
}



Re: Application Compatibility for Windows Vista The header bitmap and the header text missing in the wizard from CPropertySheet

Bruce N. Baker - MSFT

Is this still an issue

This may be a potential bug, there's a no-repro for this a while back.

What happens when you put NULL in for the watermark, does the header then get displayed ok

 






Re: Application Compatibility for Windows Vista The header bitmap and the header text missing in the wizard from CPropertySheet

laura_glow

I'm having the same problem, did you find a fix for this yet

I played around with the flags mentioned here http://msdn2.microsoft.com/en-us/library/ms652418.aspx but to no avail.

regards!
Laura




Re: Application Compatibility for Windows Vista The header bitmap and the header text missing in the wizard from CPropertySheet

Bruce N. Baker - MSFT

I'd follow this up with Main Support (see sticky at the top) or if your a partner we can create a case for you.




Re: Application Compatibility for Windows Vista The header bitmap and the header text missing in the wizard from CPropertySheet

laura_glow

I solved it using 0x0500 as the value for this define:
#define _WIN32_IE 0x0500
and then followed the instructions listed here:

http://msdn2.microsoft.com/en-us/library/ms652417.aspx#Backward_Compatible

Backward Compatible Wizards

[...]

it is still possible to implement a backward compatible wizard with an appearance similar toappe the Wizard97 style. To do so, you must explicitly implement the following:

  • Add the watermark graphic to the dialog box template for your welcome and completion pages.
  • Make all your templates same size. There is no separate system-defined header area for interior pages.
  • Create the interior page's header area explicitly on your templates.
  • Do not use a header graphic because it may conflict with the title or subtitle if the wizard changes size.