参考过往的贴子,隐藏和恢复任务栏可以用
::ShowWindow(::FindWindow("Shell_TrayWnd", NULL), SW_HIDE);
::ShowWindow(::FindWindow("Shell_TrayWnd", NULL), SW_SHOW);可是怎样才可以获得现在任务栏的状况/设定呢?比如说,有的电脑任务栏固定显示,有的自动隐藏,可是当滑鼠拉下时又会自动出现另外,怎样模拟这些behavior呢?谢谢。

解决方案 »

  1.   

    BOOL IsWindowVisible(
      HWND hWnd   // handle to window
    );
      

  2.   

    MSDN: 
    The taskbar supports two display options: Auto Hide and Always On Top. To set these options, the user must open the taskbar shortcut menu, click Properties, and select or clear the Auto Hide check box or the Always On Top check box. There is no way to set these options programmatically. To retrieve the state of these display options, use the ABM_GETSTATE message. If you would like to be notified when the state of these display options changes, process the ABN_STATECHANGE notification message in your window procedure.判断是否设定了任务栏自动隐藏 SHAppBarMessage + ABM_GETSTATE 
    编程设定任务栏属性 未公开