Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach
Subscribe:

Labels

Saturday, August 11, 2012

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.

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

//
// Returns >0 if taskbar auto hide is on.
//
int IsTaskbarAutoHideOn()
{
  APPBARDATA ABData;

  ABData.cbSize = sizeof(ABData);

  return
    SHAppBarMessage(ABM_GETSTATE, &ABData)
    & ABS_AUTOHIDE;
}
Listing #2 : C/C++ code. Download tbah.cpp (0.31 KB).

comments