Update of /cvsroot/wnd/wnd/wnd/controls/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv527
Modified Files:
methods.py
Log Message:
??
Index: methods.py
===================================================================
RCS file: /cvsroot/wnd/wnd/wnd/controls/base/methods.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** methods.py 29 Apr 2005 15:23:51 -0000 1.1.1.1
--- methods.py 15 May 2005 09:31:54 -0000 1.2
***************
*** 104,118 ****
#
#*******************************************************************
- def _base_ReflectMessage(self, hwndTo, msg, wp, lp):
-
- fReturn = c_ushort()
- msgr= fw.WND_MSGREFLECT(self.Hwnd, msg, wp, lp)
- result = self.SendMessage(hwndTo,
- fw.WND_WM_NOTIFY,
- fw.WND_NM_MSGREFLECT,
- addressof(msgr))
- if msgr.fReturn: return result
- return self.DefWindowProc(self.Hwnd, msg, wp, lp)
- #return result, msgr.fReturn
def ChildWindows(self, flag=None):
--- 104,107 ----
***************
*** 139,148 ****
def DeferWindows(self, *windows):
- # SWP_NOZORDER|SWP_NOACTIVATE
- flag= 4|16
handle= user32.BeginDeferWindowPos(len(windows))
if handle:
try:
for wnd, x, y, w, h in windows:
if isinstance(wnd, (int, long)):
newHandle= user32.DeferWindowPos(handle, wnd, 0, x, y, w, h, flag)
--- 128,140 ----
def DeferWindows(self, *windows):
handle= user32.BeginDeferWindowPos(len(windows))
if handle:
try:
for wnd, x, y, w, h in windows:
+ flag= 4|16 # SWP_NOZORDER|SWP_NOACTIVATE
+ if x==None or y==None:
+ flag |= 2 # SWP_NOSIZE
+ if w==None or h==None:
+ flag |= 1 # SWP_NOMOVE
if isinstance(wnd, (int, long)):
newHandle= user32.DeferWindowPos(handle, wnd, 0, x, y, w, h, flag)
***************
*** 151,160 ****
if newHandle: handle= newHandle
else: raise ''
! except:
user32.EndDeferWindowPos(handle)
! raise WinError(GetLastError())
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
def HideWindows(self, *windows):
#SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_HIDEWINDOWSWP_NOCOPYBITS|WP_HIDEWINDOW
--- 143,156 ----
if newHandle: handle= newHandle
else: raise ''
! except Exception, d:
user32.EndDeferWindowPos(handle)
! if GetLastError():
! raise WinError(GetLastError())
! else:
! raise RuntimeError, d
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
+
def HideWindows(self, *windows):
#SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_HIDEWINDOWSWP_NOCOPYBITS|WP_HIDEWINDOW
***************
*** 170,176 ****
if newHandle: handle= newHandle
else: raise ''
! except:
user32.EndDeferWindowPos(handle)
! raise WinError(GetLastError())
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
--- 166,175 ----
if newHandle: handle= newHandle
else: raise ''
! except Exception, d:
user32.EndDeferWindowPos(handle)
! if GetLastError():
! raise WinError(GetLastError())
! else:
! raise RuntimeError, d
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
***************
*** 189,195 ****
if newHandle: handle= newHandle
else: raise ''
! except:
user32.EndDeferWindowPos(handle)
! raise WinError(GetLastError())
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
--- 188,197 ----
if newHandle: handle= newHandle
else: raise ''
! except Exception, d:
user32.EndDeferWindowPos(handle)
! if GetLastError():
! raise WinError(GetLastError())
! else:
! raise RuntimeError, d
if user32.EndDeferWindowPos(handle): return
raise WinError(GetLastError())
|