Window metrics in Win32

Ken Ray kray at sonsothunder.com
Wed Jan 22 18:02:01 EST 2003


Sorry, I meant that the CaptionHeight was -355 (not -270 as I'd said
previously), but that would give you a height of 23. (I was checking my
Win2K machine which got the -270).

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 at lists.runrev.com>
Sent: Wednesday, January 22, 2003 3:48 PM
Subject: Window metrics in Win32


>
> The two functions below are used in an app I'm building to help me
calculate
> window rects, the goal being to have them tightly abutted but not
> overlapping.
>
> My routines seem to work great in Win95, 98, ME and 2k (beautiful
> edge-to-edge placement), but are causing odd window placement on Win NT
and
> XP.
>
> Are the registry settings I'm using supported on those platforms?  Or is
> there some obvious logic error in my functions that I'm just not seeing?
>
> Thanks in advance -
>
>
> 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 not a number then put 2 into g4WWinMargin
>     else
>       put it into g4WWinMargin
>       if (isNumber(it)) then
>         put round(it / -15) into g4WWinMargin
>       end if
>     end if
>   end if
>   return g4WWinMargin
> end WdMargin
>
>
> function TitleBarHeight
>   get queryRegistry("HKEY_CURRENT_USER\Control
> Panel\desktop\WindowMetrics\CaptionHeight")
>   if it is a number then
>     put round(it / -15) into tHeight
>     return tHeight
>   else return 22
> end TitleBarHeight
>
>
>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  Developer of WebMerge 2.1: 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