[python-win32] watermark bitmap in a property sheet wizard
Micha Stellmacher
fwdtome at netcologne.de
Sat Jun 12 14:40:28 CEST 2010
Hi,
I would like to create a property sheet wizard with a "watermark"
bitmap. The following sample code runs on a XP Pro (IE 8) machine:
-------------------------------------------------------------------------------
from pywin.mfc import dialog
from win32api import LoadLibrary
from win32com.shell import shellcon
from win32gui import LoadImage
import win32con
class PropertySheetWizard(dialog.PropertySheet):
def __init__(self, pageList, dll):
dialog.PropertySheet.__init__(self, 'My Property Sheet Wizard',
dll, pageList)
self.SetWizardMode()
dwFlags = (shellcon.PSH_WIZARD97 | shellcon.PSH_WATERMARK |
shellcon.PSH_USEHBMWATERMARK |
shellcon.PSH_STRETCHWATERMARK)
self.SetPSHBit(dwFlags, 1)
hlib = LoadLibrary(dll)
self.hbmWatermark = LoadImage(hlib, 124, win32con.IMAGE_BITMAP,
0, 0, 0)
# ... ???
page = self.GetActivePage()
page.SetPSPBit(shellcon.PSP_HIDEHEADER, 1)
wiz = PropertySheetWizard([49,], r'C:\Windows\system32\syssetup.dll')
wiz.DoModal()
-------------------------------------------------------------------------------
MSDN says: "The watermark is specified in the wizard's PROPSHEETHEADER
structure and is added to the page automatically."
[http://msdn.microsoft.com/en-us/library/bb774544%28VS.85%29.aspx]
What have I to do to set my image resp. to pass my hbmWatermark to the
PROPSHEETHEADER structure?
Thank you in advance.
Micha Stellmacher
More information about the python-win32
mailing list