Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an application i.e, a property sheet (wizard style).Now I would like to add bitmap to the header ,why I am mentioning header here is the property sheet is dwFlag is set to PSH_WIZARD97,as we all are familiar that now property sheet of that style consists of (two separators in the sheet)header and footer(Area where we have Next,Back,Finish).Now I have to add the bitmap to the header and again i must be able to place an icon on that bitmap.Similarly ,have to add bitmap to the bitmap.
C#
CWiz97::CWiz97(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	Init();
}
//Adding pages 
void CWiz97::Init(void)
{
    //SetWizardMode();

    AddPage(&m_pgFirst);
    AddPage(&m_pgSecond);

    m_psh.dwFlags |= PSH_WIZARD97|PSH_WATERMARK|PSH_HEADER;
    m_psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
    m_psh.hbmHeader = MAKEINTRESOURCEW(IDB_BITMAP_LOGO);

    //m_psh.pszbmHeader = MAKEINTRESOURCE(IDB_BITMAP_BANNER);//MAKEINTRESOURCE(IDB_BANNER_ICON);
    m_psh.pszbmHeader = MAKEINTRESOURCE(IDB_BITMAP_LOGO);
    //m_psh.hIcon = AfxGetApp()->LoadIcon(IDI_ICON_SHEET);
    
    m_psh.hInstance = AfxGetInstanceHandle();
}
Note: CWin97 is derived from CPropertysheet.

This method is called from the Propertysheet derived class's constructor.

Here I am getting the bitmap only at the right top corner but not stretching through out sheet.

Can anyone suggest me the possible way to achieve this.

Thanks in advance.
Posted
Updated 9-Jul-14 4:22am
v2

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