/**
* GetToolBarHeight ()
*
* Calcule la hauteur de la barre des tâches.
*
* @return -1 en cas d'erreur sinon la hauteur de la barre d'outils.
*/
#include <Windows.h>
LONG GetToolBarHeight () {
HWND hWnd = FindWindow ("Shell_TrayWnd", NULL);
if (hWnd == NULL)
return (LONG)-1;
RECT windowRect;
if (GetWindowRect (hWnd, &windowRect)) {
// Succès
return (windowRect.bottom - windowRect.top);
}
// Echéc
return (LONG)-1;
}
// ...