def CreateViewWindow(self, prev, settings, browser, rect):
print("FileSystemView.CreateViewWindow", prev, settings, browser, rect)
self.cur_foldersettings = settings
self.browser = browser
self._CreateMainWindow(prev, settings, browser, rect)
self._CreateChildWindow(prev)
# This isn't part of the sample, but the most convenient place to
# test/demonstrate how you can get an IShellBrowser from a HWND
# (but ONLY when you are in the same process as the IShellBrowser!)
# Obviously it is not necessary here - we already have the browser!
browser_ad = win32gui.SendMessage(self.hwnd_parent, win32con.WM_USER+7, 0, 0)
browser_ob = pythoncom.ObjectFromAddress(browser_ad, shell.IID_IShellBrowser)
assert browser==browser_ob
# and make a call on the object to prove it doesn't die :)
assert browser.QueryActiveShellView()==browser_ob.QueryActiveShellView()
评论列表
文章目录