def DropShadow(self, drop=True):
if wx.Platform != "__WXMSW__":
# This works only on windows
return
hwnd = self.GetHandle()
print "handle wizard=", hwnd
CS_DROPSHADOW = 0x00020000
GCL_STYLE = -26
csstyle = ctypes.windll.user32.GetWindowLongA(hwnd, GCL_STYLE)
if drop:
if csstyle & CS_DROPSHADOW:
return
else:
csstyle |= CS_DROPSHADOW #Nothing to be done
else:
csstyle &= ~CS_DROPSHADOW
cstyle= ctypes.windll.user32.GetClassLongA(hwnd, GCL_STYLE)
if drop:
if cstyle & CS_DROPSHADOW == 0:
ctypes.windll.user32.SetClassLongA(hwnd, GCL_STYLE, cstyle | CS_DROPSHADOW)
else:
ctypes.windll.user32.SetClassLongA(hwnd, GCL_STYLE, cstyle & ~CS_DROPSHADOW)
评论列表
文章目录