Detecting height of dock and taskbar
Ken Ray
kray at sonsothunder.com
Thu Sep 29 18:32:26 EDT 2005
On 9/29/05 5:13 PM, "Richard Gaskin" <ambassador at fourthworld.com> wrote:
> Chipp Walters wrote:
>> Nope, sorry Richard, it can't be obtained correctly from the registry. I
>> know, I've tried. There's a specific API call for it. See:
>> <http://lists.runrev.com/pipermail/use-revolution/2003-December/027437.html >
>
> That post contains something I don't understand:
>
> ------------------
> I've searched and found Ken Ray's:
>
> function TitleBarHeight
> get queryRegistry("HKEY_CURRENT_USER\Control
> Panel\desktop\WindowMetrics\CaptionHeight")
> if it is not empty and isNumber(it) then
> put round(it / -15) into tHeight
> return tHeight
> end if
> end TitleBarHeight
>
> but, sadly, this isn't reliable. It doesn't take into account double row
> taskbars or unlocked taskbars, etc..
> ------------------
>
> Why would taskbar variances affect window title bar height?
It wouldn't AFAIK. The only way to get to it is through the FindWindow() API
call to "Shell_traywnd" to get a handle to the window, and then execute the
GetWindowRect API call to get its rect, then calculate it from there.
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list