Window metrics in Win32
Ken Ray
kray at sonsothunder.com
Wed Jan 22 17:59:01 EST 2003
Richard,
I'm running XP, and my BorderWidth is set at -15, and the TItlebarHeight is
set at -270. This translates to a border width of 1 and a titlebar height of
17. Is this not what you're expecting?
Ken
----- 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