[pywin32-checkins] pywin32/com/win32comext/axcontrol/demos container_ie.py, 1.1, 1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2007-10-15 05:11:40
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19596 Modified Files: container_ie.py Log Message: Make this sample a little easier to understand by removing unnecessary typelib generation Index: container_ie.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/demos/container_ie.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** container_ie.py 12 Oct 2007 00:36:12 -0000 1.1 --- container_ie.py 15 Oct 2007 05:11:43 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- from win32com.server.exception import COMException from win32com.server.util import wrap + from win32com.client import Dispatch import pythoncom *************** *** 16,22 **** debugging = False ! # generate the Dispatchable interfaces we use (IWebBrowser2, etc) ! from win32com.client import gencache, Dispatch ! ie_mod = gencache.EnsureModule('{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}', 0, 1, 1) IOleClientSite_methods = """SaveObject GetMoniker GetContainer ShowObject --- 17,24 ---- debugging = False ! # If you wanted events or better type info, you'd probably do: ! # gencache.EnsureModule('{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}', 0, 1, 1) ! # which is the "Microsoft Internet Controls" typelib defining interfaces ! # such as IWebBrowser2 and the associated events. IOleClientSite_methods = """SaveObject GetMoniker GetContainer ShowObject *************** *** 186,190 **** rect = win32gui.GetWindowRect(self.hwnd) browser.DoVerb(axcontrol.OLEIVERB_SHOW, None, site, -1, self.hwnd, rect) ! b2 = ie_mod.IWebBrowser2(browser.QueryInterface(pythoncom.IID_IDispatch)) self.browser2 = b2 b2.Left = 0 --- 188,192 ---- rect = win32gui.GetWindowRect(self.hwnd) browser.DoVerb(axcontrol.OLEIVERB_SHOW, None, site, -1, self.hwnd, rect) ! b2 = Dispatch(browser.QueryInterface(pythoncom.IID_IDispatch)) self.browser2 = b2 b2.Left = 0 *************** *** 215,218 **** win32gui.PumpMessages() - - --- 217,218 ---- |