(page requirements)

Is Windows taskbar's auto hide feature enabled?

Want to know if the Windows taskbar's auto hide feature is enabled? Here's a simple function to check this written in C Language / C++ and Delphi.
Delphi CODE
uses ShellAPI;

  Returns TRUE if taskbar auto hide is on.

    // auto hide is ON
function IsTaskbarAutoHideOn : boolean;
  ABData : TAppBarData;
  ABData.cbSize := sizeof(ABData);
  Result :=
    (SHAppBarMessage(ABM_GETSTATE, ABData)
     and ABS_AUTOHIDE) > 0;
Listing #1 : Delphi code. Download tbah.pas (0.36 KB).
C Language / C++ CODE

// Returns >0 if taskbar auto hide is on.
int IsTaskbarAutoHideOn()

  ABData.cbSize = sizeof(ABData);

    SHAppBarMessage(ABM_GETSTATE, &ABData)
Listing #2 : C/C++ code. Download tbah.cpp (0.31 KB).
Applicable Keywords : C Language, C++, C++Builder, Delphi, Delphi 2.x, Delphi 3.x, Delphi 4.x, Win32
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor