Prev: WaitForSingleObject() and Process termination,...
Next: GetWindow on windows 7 donn't returns child window
From: Thomas Steinbach on 17 Feb 2010 09:52 Hello, how can I determine the visible hight and width of the taskbar and where the taskbar is docked (top, right, left, bottom) using plain C (WinAPI)? And how can I determine whether the taskbar has the auto-hide feature enabled? Thomas
From: r_z_aret on 17 Feb 2010 10:15 On Wed, 17 Feb 2010 15:52:44 +0100, "Thomas Steinbach" <steinbach(a)gmx-topmail.de> wrote: >Hello, > >how can I determine the visible hight and width of the >taskbar and where the taskbar is docked (top, right, left, >bottom) using plain C (WinAPI)? It's a window, so you can get a handle and then use GetWindowRect: // -------------------------------------------------------------------- // PFWTaskBarFind inline HWND PFWTaskBarFind( void ) { #ifdef UNDER_CE // Look for Smartphone version first, in case other is around (paranoia?) HWND hwnd = ::FindWindow( _T( "Tray" ), NULL ); // Smartphone if (!PFWHwndCheck( hwnd )) { // Eric R. Balch (microsoft.public.vc.vcce 15 Jan 99) says next line works for CE. // BZ found it works for Pocket PC, old Microsoft Windows CE platforms, and generic CE hwnd = ::FindWindow( _T( "HHTaskBar" ), NULL ); } return hwnd; #else // "Big" Windows // (thanks to Shing Yip, comp.os.ms-windows.programmer.win32, 21 Jul 99) return ::FindWindow( _T( "Shell_TrayWnd" ), NULL ); #endif } // PFWTaskBarFind // -------------------------------------------------------------------- // PFWTaskBarGetHeight int PFWTaskBarGetHeight( void ) { HWND hW = PFWTaskBarFind(); if (!PFWIsVisible( hW )) return 0; RECT rW; ::GetWindowRect( hW, &rW ); return (rW.bottom - rW.top); >And how can I determine whether the taskbar has the auto-hide >feature enabled? I can't help with this. > >Thomas ----------------------------------------- To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message). Robert E. Zaret, eMVP PenFact, Inc. 20 Park Plaza, Suite 400 Boston, MA 02116 www.penfact.com Useful reading (be sure to read its disclaimer first): http://catb.org/~esr/faqs/smart-questions.html
From: Christian ASTOR on 17 Feb 2010 13:00
On 17 fév, 15:52, "Thomas Steinbach" <steinb...(a)gmx-topmail.de> wrote: > how can I determine the visible hight and width of the > taskbar and where the taskbar is docked (top, right, left, > bottom) using plain C (WinAPI)? > And how can I determine whether the taskbar has the auto-hide > feature enabled? SHAppBarMessage() |