属性页指定了PSH_WIZARD97和PSH_WATERMARK,为什么显示的图片是平铺到整个窗口的?

strcat 2005-08-18 02:39:50
代码:

g_psh.dwSize = sizeof( PROPSHEETHEADER );
g_psh.hInstance = hInstance;
g_psh.hwndParent = NULL;
g_psh.phpage = g_hpsp;
g_psh.dwFlags = PSH_WIZARD97 | PSH_HEADER | PSH_WATERMARK;
g_psh.pszbmWatermark = MAKEINTRESOURCE( IDB_WATERMARK );
g_psh.pszbmHeader = MAKEINTRESOURCE( IDB_HEADER );
g_psh.nStartPage = 0;
g_psh.nPages = 2;
PropertySheet( &g_psh );

请大侠们支招!
...全文
149 点赞 收藏 8
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
strcat 2005-08-19
感谢大家,我的运行环境是VC6,将工程用VS.net 2003打开后就一切正常了。感觉上应该是Platform SDK的问题。
回复
vcmute 2005-08-18
CPropertyPage初始化的时候 m_psp.dwFlags |=PSP_HIDEHEADER;
回复
lixiaosan 2005-08-18
http://www.codeproject.com/property/resizeable_wizard97.asp
http://www.codeproject.com/property/conquering_wizard97.asp
回复
lixiaosan 2005-08-18
Remarks

If the user chooses a setting such as Large Fonts, which enlarges the dialog box, the watermark that is painted on the start and finish pages will be enlarged as well. The size and position of the original bitmap will remain the same. The additional area will be filled with the color of the pixel in the upper-left corner of the bitmap.

Note that several members of this structure are only supported for Comctl32.dll versions 4.71 and later. You can enable these members by including one of the following in your header:

#define _WIN32_IE 0x0400 // For version 4.71

or

#define _WIN32_IE 0x0500 // For version 5.80

However, you must initialize the structure with its size. If you use the size of the currently defined structure, the application may not run with the earlier versions of Comctl32.dll, which expect a smaller structure. This includes all systems with Microsoft Windows 95 or Microsoft Windows NT 4.0 that do not have Internet Explorer version 4.0 or later installed. You can run your application on pre-4.71 versions of Comctl32.dll by defining the appropriate version number. However, this may cause problems if your application also needs to run on systems with more recent versions.

You can remain compatible with all Comctl32.dll versions by using the current header files and setting the size of the PROPSHEETHEADER structure appropriately. Before you initialize the structure, use the DllGetVersion function to determine which Comctl32.dll version is installed on the system. If it is version 4.71 or greater, use:

psh.dwSize = sizeof(PROPSHEETHEADER);

to initialize the dwSize member. For earlier versions, the size of the pre-4.71 structure is given by the PROPSHEETHEADER_V1_SIZE constant. Use:

psh.dwSize = PROPSHEETHEADER_V1_SIZE;

The three wizard styles, PSH_WIZARD, PSH_WIZARD97, and PSH_WIZARD_LITE, are mutually incompatible. Only one of these style flags should be set.

回复
strcat 2005-08-18
up
回复
strcat 2005-08-18
去掉以后,就无法在第一页显示位图了啊!
回复
lixiaosan 2005-08-18
PSH_WATERMARK 使用水印模式,故图片会平铺

去掉试试
回复
strcat 2005-08-18
up
回复
发帖
界面
创建于2007-09-28

1.5w+

社区成员

VC/MFC 界面
申请成为版主
帖子事件
创建了帖子
2005-08-18 02:39
社区公告
暂无公告