XP - window metrics

Ken Ray kray at sonsothunder.com
Thu Aug 22 21:49:01 EDT 2002


Richard,

You get the "CaptionHeight" in the same location, divide by -15 (as you have
done below) and you're there (in pixels). Like:

function TitleBarHeight
    get queryRegistry("HKEY_CURRENT_USER\Control
Panel\desktop\WindowMetrics\CaptionHeight")
    if it is not empty and if isNumber(it) then
        put round(it / -15) into tHeight
        return tHeight
    end if
end TitleBarHeight

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Richard Gaskin" <ambassador at fourthworld.com>
To: "MetaCard List" <metacard at lists.runrev.com>
Sent: Thursday, August 22, 2002 7:03 PM
Subject: XP - window metrics


> One of my applications relies on having multiple windows laid out
> edge-to-edge.
>
> I use this function to determine the borderwidth of windows across
> platforms:
>
> function WdMargin
>   global g4WWinMargin
>   if the platform is "MacOS" then
>     put 6 into g4WWinMargin
>   else
>     get queryRegistry("HKEY_CURRENT_USER\Control
> Panel\desktop\WindowMetrics\BorderWidth")
>     if it is empty then put 2 into g4WWinMargin
>     if (isNumber(it)) then
>       put round(it / -15) into g4WWinMargin
>     end if
>   end if
>   return g4WWinMargin
> end WdMargin
>
>
> I had been using a hard-wired number for the height of the drag region,
but
> now with XP I'm thinking I should query the registry for that as well.
> Anyone know the registry path for the tite bar height?  Does that path
> differ between XP and earlier Win OSes?
>
> I know the right answer is "search for 'title' in RegEdit", but my XP
> machine is down and I'd like to at least attempt a fix for a tester sooner
> rather than later if possible.
>
> Thanks in advance -
>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  Custom Software and Web Development for All Major Platforms
>  Developer of WebMerge 2.0: Publish any Database on Any Site
>  ___________________________________________________________
>  Ambassador at FourthWorld.com       http://www.FourthWorld.com
>  Tel: 323-225-3717                       AIM: FourthWorldInc
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list