System Taskbar

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
chrisjx2002
Posts: 192
Joined: Wed Jan 06, 2010 5:39 pm

System Taskbar

Post by chrisjx2002 »

Hello,

I use the System.DesktopWidth and System.DesktopHeight values to define the main window. But how is it possible to have the height of the system taskbar?

Regards
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: System Taskbar

Post by gfilatov »

chrisjx2002 wrote:Hello,

I use the System.DesktopWidth and System.DesktopHeight values to define the main window. But how is it possible to have the height of the system taskbar?
Hello,

It is possible with the following C-function:

Code: Select all

HB_FUNC ( GETTASKBARHEIGHT )

{
	HWND hTaskBar;
	RECT rc;
	int  nHeight;

	hTaskBar = FindWindow( "Shell_TrayWnd", NULL );

	GetWindowRect(hTaskBar, &rc);

	nHeight = rc.bottom - rc.top;

	hb_retni( nHeight );
}
Usage:

nTaskBarHeight := GetTaskBarHeight()
I hope that helps :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: System Taskbar

Post by Rathinagiri »

Thanks a lot Grigory. Really useful.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
DenCo
Posts: 32
Joined: Wed Dec 29, 2010 5:12 pm
Location: Tennessee / USA
Contact:

Re: System Taskbar

Post by DenCo »

I do the same as Chris on my main window setup, and too had wondered about the taskbar.

Thanks for this information.

Bill
chrisjx2002
Posts: 192
Joined: Wed Jan 06, 2010 5:39 pm

Re: System Taskbar

Post by chrisjx2002 »

Thanks a lot. It was exactly what I was looking for.

Best regards
Post Reply