Taskbar height?
BlitzMax Forums/MaxGUI Module/Taskbar height?
| ||
Any idea on how to either A.)Get the Height of the desktop - the users Taskbar height or B.) Simply get the height of the user's taskbar ? |
| ||
hwnd = FindWindow("Shell_traywnd", "") doesnt seem to return anything |
| ||
hmm nvm it is returning a handle but its crashing if i try to use the handle returned in a gadgetheight() func. but it returns the rect in GetWindowRect( hWnd,lpRect:Byte Ptr ) function so har har i figured it out and stuff. Maybe someone can find this useful |
| ||
Ok i might as well give you the code on how i got the info'true client height of desktop Type lpRECT Field l, t, r, b End Type local taskrect:lpRect = New lpRECT hwnd = FindWindow("Shell_traywnd", "") GetWindowRect( hwnd,taskrect ) local tasksize = taskrect.b - taskrect.t local trueclientheight = GadgetHeight(Desktop()) - tasksize |
| ||
dunno if it's still useful to you, but i might as well post it - how to get the desktop area (minus taskbar)Const SPI_GETWORKAREA:Int = 48 Extern "Win32" Function SystemParametersInfoA:Int(action:Int, param:Int, param2:Byte Ptr, winini:Int) EndExtern Function GetDesktopArea(lpRect:Int Ptr) SystemParametersInfoA(SPI_GETWORKAREA, 0, lpRect, 0) End Function Local deskRect:Int[4] GetDesktopArea(deskRect) Print "Desktop area: " + deskRect[0] + ", " + deskRect[1] + " -> " + deskRect[2] + ", " + deskRect[3] |
| ||
ah cool thats another good way as well. |
| ||
Works great! |