1. Windows XP wierdness

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?).

thanks,
Daryl Van Den Brink

new topic     » topic index » view message » categorize

2. Re: Windows XP wierdness

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Windows XP wierdness

On Fri, 16 May 2003 11:34:34 +1000, Derek Parnell
<ddparnell at bigpond.com> wrote:

>Win32lib invokes the w32HResize event handler when it receives either =
the=20
>WM_SIZE message or the RBN_HEIGHTCHANGE notification. It sounds as if XP=
 is=20
>not sending either of these messages at Window Open time. I do not know=20
>why. I guess we can't assume that Windows will do this (it always =
sounded=20
>rather strange thing to do anyway).=20
Oh crud, I hate to think of how much of my code relies on that...
>May I suggest you do you initialization=20
>with the w32HActivate event instead.
Thanks for the heads up, both of you, anyway.

Derek, given that I only posess a win98 m/c, can you think of a test I
could run to check handling of this?

Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: Windows XP wierdness

On Fri, 16 May 2003 02:57:56 +0100, Pete Lomax <petelomax at blueyonder.co.uk> 
wrote:

>
> On Fri, 16 May 2003 11:34:34 +1000, Derek Parnell
> <ddparnell at bigpond.com> wrote:
>
>> 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).

> Oh crud, I hate to think of how much of my code relies on that...


I could always force a w32HResize invocation whenever a window is created 
or opened? Would this do?

>> May I suggest you do you initialization with the w32HActivate event 
>> instead.

> Thanks for the heads up, both of you, anyway.
>
> Derek, given that I only posess a win98 m/c, can you think of a test I
> could run to check handling of this?

I don't have XP either.

The "handling" of what? I'm not sure what you are asking here.

BTW...

== w32HResize == should only be used when the size of something has 
changed.

== w32HActivate == is meant to be used to initialize stuff *after* a window 
is opened but before you get to use it.

== w32HOpen == is meant to be used *before* a window is opened. It is used 
to initialize things prior to a window being used.

-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view message » categorize

5. Re: Windows XP wierdness

On Fri, 16 May 2003 13:00:59 +1000, Derek Parnell
<ddparnell at bigpond.com> wrote:

>I could always force a w32HResize invocation whenever a window is =
created=20
>or opened? Would this do?
Yes

>> Derek, given that I only posess a win98 m/c, can you think of a test I
>> could run to check handling of this?
>
>I don't have XP either.
>
>The "handling" of what? I'm not sure what you are asking here.
I was thinking somehow of that w32HResize invoke not happening
temporarily perhaps, so I could see how it would behave on XP, or as
you suggest above make the calls I get consistent between XP & w98.
>
>BTW...
>
>=3D=3D w32HResize =3D=3D should only be used when the size of something =
has=20
>changed.
>
Yes, many many debug sessions ago I found I was getting a w32HResize
event before one of {paint, open, or activate}, can't remember exactly
but anyway I put some code behind an if event=3Dw32HResize and it
worked. I've since duplicated that way of doing things in several
dozen places.

Pete

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu