Re: Windows XP wierdness
- Posted by Derek Parnell <ddparnell at bigpond.com> May 16, 2003
- 386 views
On Fri, 16 May 2003 10:42:23 +0930, <daryl_vdb at hotmail.com> wrote: > > This is not OT > > There seems to be some problems with win32lib on windows XP. The wierd > part about it is that it only shows up when the "modern style" theme is > used. I didn't notice it until recently because I always use the classic > windows 2000 look on my computer, and all my windows euphoria programs > work fine. But when I switched to the modern theme, my wave editor > crashed on startup. The error was "variable not assigned a value". The > variable causing the problem is initially assigned a value in the > w32HResize event, which should occur when a window is opened. > > It became ovbious that the w32HResize event is not occurring when the > window is opened. But how could the theme be causing this? You would > think a theme would affect only the look of the window, not its > behaviour. > > Even wierder is the fact that I tried calling setRect in the main > window's open event (it's a child window that's causing the problem) to > trigger a resize event, and it still didn't work. > > I don't know whether this is a bug in win32lib or another stupid decision > by microsoft. If anyone else knows about this, any help to solve the > problem would be appreciated. I'm using win32lib 0.57.9 (maybe that's > the problem?). > Win32lib invokes the w32HResize event handler when it receives either the WM_SIZE message or the RBN_HEIGHTCHANGE notification. It sounds as if XP is not sending either of these messages at Window Open time. I do not know why. I guess we can't assume that Windows will do this (it always sounded rather strange thing to do anyway). May I suggest you do you initialization with the w32HActivate event instead. -- cheers, Derek Parnell