1. Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by Pete Stoner <stoner.pete at gm?il.co?> Mar 20, 2008
- 673 views
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
2. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by Greg Haberek <ghaberek at gmai?.co?> Mar 20, 2008
- 658 views
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
3. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by CChris <christian.cuvier at agricultu?e.gouv.fr> Mar 22, 2008
- 685 views
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
4. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by Pete Stoner <stoner.pete at gma?l?com> Mar 23, 2008
- 677 views
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! PeteS
5. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by "Gregory Haberek" <ghaberek at gmail.com> Mar 23, 2008
- 677 views
> 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! Feel free to post an update in the Archive then. -Greg
6. Re: Attn:Greg Haberek, Win32lib 0.70.4 & BatMon
- Posted by Pete Stoner <stoner.pete at gmail.?o?> Mar 24, 2008
- 667 views
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! > > Feel free to post an update in the Archive then. > > > -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