本文介绍了如何将位图添加到属性表的页眉和页脚(wizard97样式)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个应用程序,即属性表(向导样式)。现在我想在页眉中添加位图,为什么我要提到这里的标题是属性表是dwFlag设置为 PSH_WIZARD97 ,因为我们都很熟悉,现在该样式的属性表包含(表中的两个分隔符)页眉和页脚(我们有Next,Back,Finish的区域。)现在我必须将位图添加到标题中,我必须能够在该位图上放置一个图标。同样,必须将位图添加到位图。

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.

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();
}

注意: CWin97 派生自 CPropertysheet



这个方法是从Propertysheet派生类的构造函数调用的。



这里我只在右上方获取位图角落,但没有延伸到床单。



任何人都可以建议我实现这个目标。



提前致谢。

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.

推荐答案

这篇关于如何将位图添加到属性表的页眉和页脚(wizard97样式)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:48