1. Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

Greg, since you are still around could you take a look at why your BatMon prog
docks wrongly with Win32Lib 70.4 (you can comment out the xControls call).

With Win32Lib 60.6 it docks as expected at the top of the screen, but when I
switch to Win32Lib 70.4 it appears about 25 pixels below the top of the screen. I
tried to find the cause and when I comment out the VOID = SHAppBarMessage(
ABM_SETPOS, abd ) call it docks to the top again. There is obviously something
different between the 2 Win32lib versions that causes this but I can't see what
it is..

PeteS

new topic     » topic index » view message » categorize

2. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

Pete Stoner wrote:
> 
> Greg, since you are still around could you take a look at why your BatMon prog
> docks wrongly with Win32Lib 70.4 (you can comment out the xControls call).
> 
> With Win32Lib 60.6 it docks as expected at the top of the screen, but when I
> switch to Win32Lib 70.4 it appears about 25 pixels below the top of the
> screen.
> I tried to find the cause and when I comment out the VOID = SHAppBarMessage(
> ABM_SETPOS, abd ) call it docks to the top again. There is obviously something
> different between the 2 Win32lib versions that causes this but I can't see
> what
> it is..

I'll check this out while I'm at work since I have Windows XP and a laptop at my
disposal. Shouldn't be too difficult to discern.

-Greg

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

3. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

Greg Haberek wrote:
> 
> Pete Stoner wrote:
> > 
> > Greg, since you are still around could you take a look at why your BatMon
> > prog
> > docks wrongly with Win32Lib 70.4 (you can comment out the xControls call).
> > 
> > With Win32Lib 60.6 it docks as expected at the top of the screen, but when I
> > switch to Win32Lib 70.4 it appears about 25 pixels below the top of the
> > screen.
> > I tried to find the cause and when I comment out the VOID = SHAppBarMessage(
> > ABM_SETPOS, abd ) call it docks to the top again. There is obviously
> > something
> > different between the 2 Win32lib versions that causes this but I can't see
> > what
> > it is..
> 
> I'll check this out while I'm at work since I have Windows XP and a laptop at
> my disposal. Shouldn't be too difficult to discern.
> 
> -Greg

There had been a request on this forum that getClientRect(Screen) return the
usable area of the screen rather than the raw size, which was the earlier
behaviour. You should be able to find this change mentioned in the change log for
70.1 or later. In a nutshell, the call to ShAppBarMessage() was working around a
bug that is now fixed.

CChris

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

4. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

CChris wrote:
> 
> Greg Haberek wrote:
> > 
> > Pete Stoner wrote:
> > > 
> > > Greg, since you are still around could you take a look at why your BatMon
> > > prog
> > > docks wrongly with Win32Lib 70.4 (you can comment out the xControls call).
> > > 
> > > With Win32Lib 60.6 it docks as expected at the top of the screen, but when
> > > I
> > > switch to Win32Lib 70.4 it appears about 25 pixels below the top of the
> > > screen.
> > > I tried to find the cause and when I comment out the VOID =
> > > SHAppBarMessage(
> > > ABM_SETPOS, abd ) call it docks to the top again. There is obviously
> > > something
> > > different between the 2 Win32lib versions that causes this but I can't see
> > > what
> > > it is..
> > 
> > I'll check this out while I'm at work since I have Windows XP and a laptop
> > at
> > my disposal. Shouldn't be too difficult to discern.
> > 
> > -Greg
> 
> There had been a request on this forum that getClientRect(Screen) return the
> usable area of the screen rather than the raw size, which was the earlier
> behaviour.
> You should be able to find this change mentioned in the change log for 70.1
> or later. In a nutshell, the call to ShAppBarMessage() was working around a
> bug that is now fixed.
> 
> CChris

OK I see what's happening now. The ShAppBarMessage() call is not a workaround
but is the correct way to register an Application Toolbar, the problem was that
after initially proposing to windows the position for the top of the screen (0,
0) with the ShAppBarMessage(ABM_NEW, abd) call and then setting that position
with the ShAppBarMessage(ABM_SETPOS, abd), the {0, 0} position is then *below*
the new appbar so the new setRect routine (correctly I guess as all other apps
also see the (0, 0) pos there) then sets the bar to that position. The easy fix
is just to deduct the height of the appBar from the y pos when doing the
setRect..

Works for me! smile

PeteS

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

5. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

>  OK I see what's happening now. The ShAppBarMessage() call is not a workaround
>  but is the correct way to register an Application Toolbar, the problem was that
>  after initially proposing to windows the position for the top of the screen (0,
>  0) with the ShAppBarMessage(ABM_NEW, abd) call and then setting that position
>  with the ShAppBarMessage(ABM_SETPOS, abd), the {0, 0} position is then *below*
>  the new appbar so the new setRect routine (correctly I guess as all other apps
>  also see the (0, 0) pos there) then sets the bar to that position. The easy fix
>  is just to deduct the height of the appBar from the y pos when doing the
>  setRect..
>
>  Works for me! smile

Feel free to post an update in the Archive then. blink


-Greg

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

6. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon

Gregory Haberek wrote:
> 
> >  OK I see what's happening now. The ShAppBarMessage()
> call is not a workaround but is the correct way to register an Application
> Toolbar,
> the problem was that after initially proposing to windows the position for the
> top
> of the screen (0, 0) with the ShAppBarMessage(ABM_NEW, abd) call and then
> setting
> that position with the ShAppBarMessage(ABM_SETPOS, abd), the {0, 0} position
> is
> then *below* the new appbar so the new setRect routine (correctly I guess as
> all
> other apps also see the (0, 0) pos there) then sets the bar to that position.
> The
> easy fix is just to deduct the height of the appBar from the y pos when doing
> the
> setRect..</font></i>
> >
> >  Works for me! smile
> 
> Feel free to post an update in the Archive then. blink
> 
> 
> -Greg

Played a little more and I found using the setRect this way didn't work too well
when there were other toolbars there. Changed to setWindowRect which does
position it correctly (the docs for setting app bars say use moveWindow and that
is what setWindowRect calls)..

Greg, I'll send you my revised version of your batmon.exw

PeteS

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

Search



Quick Links

User menu

Not signed in.

Misc Menu