From: CL <clc...@gm...> - 2009-01-16 00:54:40
|
Hi Shef Since I only have one PC, I am not sure if my sample programs working well or not on other hardware. Are you able to run my sample programs on your side (or it also crashes) ? Anyone else can report the result if you have tried it ? About the crashes, can you show a bit more about the python code to do SetWindowPos / MoveWindow ? Technically speaking, I can see no reason why using these API will cause a crash in general. I tried SetWindowPos but it looks like it has no effect after the scene window is created, so I change it to MoveWindow. It works very well on my PC. best regards, CL > I just tried MoveWindow instead of SetWindowPos, but it crashes just as > hard with VPython-5. > Here is the essential part of the code: > > # get the handle of the dock container > PP = self.p1.GetHandle () > > # Set Position and Size of the VPython window, > # Before Docking it !! > flags = win32con.SWP_SHOWWINDOW or \ > win32con.SWP_FRAMECHANGED > win32gui.SetWindowPos ( self.VP, win32con.HWND_TOPMOST, > -4, -22, w+8, h+26, flags ) > #win32gui.MoveWindow ( self.VP, -4, -22, w+8, h+26, True ) > <===JUST AS BAD > > # Dock the VPython window > win32gui.SetParent ( self.VP, PP ) > > Am I doing something wrong, > or are you not testing hard enough ? > > cheers, > Stef > > > This examples only work on Windows platform because the docking > > technique is depending on win32 api. You can change it to non-docking > > version easily by removing some code in vWorld object. > > > > Example 1 is just the bounce2 sample program implemented in a wxdialog box. > > Example 2 is four bounce2 windows in a wxdialog box. > > > > Hope this can help you. > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > > > > > > > ------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > > ------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > End of Visualpython-users Digest, Vol 32, Issue 11 > ************************************************** > |