Jump to content

Recommended Posts

Posted
...
Global $idButton = GUICtrlCreateButton("Click Me", 10, 10)
Global $idButton2 = GUICtrlCreateButton("MarkFullscreenWindow = FALSE", 10, 40)
...
Global $hIcon, $bMarkFullscreenWindow = False
Global $iCnt = 0
While 1
...
        Case $idButton2
            $bMarkFullscreenWindow = Not $bMarkFullscreenWindow
            GUICtrlSetData($idButton2, "MarkFullscreenWindow = " & $bMarkFullscreenWindow)
            TB_MarkFullscreenWindow($hGUI, $bMarkFullscreenWindow)
...

The description for TB_SetActiveAlt() and TB_MarkFullscreenWindow() is the same in the UDF. Therefore I added the above to see what it does. Did nothing that  I can see.
What does it do ? ( my reading comprehension does not comprehend 😅 ) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

 

@argumentum Thank you

The same description is left over from the copy paste, since I didn't deal with them, they stayed like that

I also didn't understand many things, and many of them are related to applications with multiple tabs, the so-called (TDI) or multiple-document interface (MDI) application's

 

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
SetActiveAlt method from: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist-setactivealt

SetActiveAlt marks the item associated with hwnd as the currently active item for the window's process without changing the pressed state of any item. Any user action that would activate a different tab in that process will activate the tab associated with hwnd instead. The active state of the window's item is not guaranteed to be preserved when the process associated with hwnd is not active. To ensure that a given tab is always active, call SetActiveAlt whenever any of your windows are activated. Calling SetActiveAlt with a NULL hwnd clears this state.

 

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
MarkFullscreenWindow method  from: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist2-markfullscreenwindow

Setting the value of fFullscreen to TRUE, the Shell treats this window as a full-screen window, and the taskbar is moved to the bottom of the z-order when this window is active. Setting the value of fFullscreen to FALSE removes the full-screen marking, but does not cause the Shell to treat the window as though it were definitely not full-screen. With a FALSE fFullscreen value, the Shell depends on its automatic detection facility to specify how the window should be treated, possibly still flagging the window as full-screen.

Since Windows 7, call SetProp(hwnd, L”NonRudeHWND”, reinterpret_cast<HANDLE>(TRUE)) before showing a window to indicate to the Shell that the window should not be treated as full-screen. This ensures the taskbar does not adjust itself to be below the window in z-order. This is similar to ITaskbarList2::MarkFullscreenWindow(FALSE) except the Shell will not fallback to its automatic detection facility and will not treat the window as full-screen.

example:

#include <GUIConstants.au3>
#include "TaskbarList.au3" ; * <--

Local $hGUI = GUICreate("My Custom GUI", @DesktopWidth, @DesktopHeight, -8, 0, $WS_OVERLAPPEDWINDOW)
Local $idButton_1 = GUICtrlCreateButton("Exit", 50, 100, 85, 25)
Local $idButton_2 = GUICtrlCreateButton("Normal", 50, 130, 85, 25)
Local $idButton_3 = GUICtrlCreateButton("Full Screen", 50, 160, 85, 25)
GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $idButton_1
            Exit
        Case $idButton_2
            TB_MarkFullscreenWindow($hGUI, False)
        Case $idButton_3
            TB_MarkFullscreenWindow($hGUI, True)
    EndSwitch
WEnd


 

I know that I know nothing

Posted

Make it 4.

Global Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}"
Global Const $sIID_ITaskbarList4 = "{C43DC798-95D1-4BEA-9030-BB99E2983A1A}"
Global Const $tagITaskbarList4 = _
    "HrInit hresult();" & _
    "AddTab hresult(hwnd);" & _
    "DeleteTab hresult(hwnd);" & _
    "ActivateTab hresult(hwnd);" & _
    "SetActiveAlt hresult(hwnd);" & _
    "MarkFullscreenWindow hresult(hwnd;boolean);" & _
    "SetProgressValue hresult(hwnd;uint64;uint64);" & _
    "SetProgressState hresult(hwnd;int);" & _
    "RegisterTab hresult(hwnd;hwnd);" & _
    "UnregisterTab hresult(hwnd);" & _
    "SetTabOrder hresult(hwnd;hwnd);" & _
    "SetTabActive hresult(hwnd;hwnd;dword);" & _
    "ThumbBarAddButtons hresult(hwnd;uint;ptr);" & _
    "ThumbBarUpdateButtons hresult(hwnd;uint;ptr);" & _
    "ThumbBarSetImageList hresult(hwnd;ptr);" & _
    "SetOverlayIcon hresult(hwnd;ptr;wstr);" & _
    "SetThumbnailTooltip hresult(hwnd;wstr);" & _
    "SetThumbnailClip hresult(hwnd;ptr);"  & _
    "SetTabProperties hresult(hwnd;int);"
Global enum $STPF_NONE, $STPF_USEAPPTHUMBNAILALWAYS, $STPF_USEAPPTHUMBNAILWHENACTIVE, $STPF_USEAPPPEEKALWAYS = 4, $STPF_USEAPPPEEKWHENACTIVE = 8

SetTabProperties is not bad...

Posted
1 hour ago, Nine said:

SetTabProperties is not bad...

would you post an example ?

Also, instead of declaring them independently, might as well declare them all ?

Global Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}" ; Win2000
Global Const $sIID_ITaskbarList2 = "{602D4995-B13A-429b-A66E-1935E44F4317}" ; WinXP
Global Const $sIID_ITaskbarList3 = "{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}" ; Win7
Global Const $sIID_ITaskbarList4 = "{C43DC798-95D1-4BEA-9030-BB99E2983A1A}" ; Win7
Global Const $tagITaskbarList = _
        "HrInit hresult();" & _
        "AddTab hresult(hwnd);" & _
        "DeleteTab hresult(hwnd);" & _
        "ActivateTab hresult(hwnd);" & _
        "SetActiveAlt hresult(hwnd);"

Global Const $tagITaskbarList2 = $tagITaskbarList & _
        "MarkFullscreenWindow hresult(hwnd;boolean);"

Global Const $tagITaskbarList3 = $tagITaskbarList2 & _
        "SetProgressValue hresult(hwnd;uint64;uint64);" & _
        "SetProgressState hresult(hwnd;int);" & _
        "RegisterTab hresult(hwnd;hwnd);" & _
        "UnregisterTab hresult(hwnd);" & _
        "SetTabOrder hresult(hwnd;hwnd);" & _
        "SetTabActive hresult(hwnd;hwnd;dword);" & _
        "ThumbBarAddButtons hresult(hwnd;uint;ptr);" & _
        "ThumbBarUpdateButtons hresult(hwnd;uint;ptr);" & _
        "ThumbBarSetImageList hresult(hwnd;ptr);" & _
        "SetOverlayIcon hresult(hwnd;ptr;wstr);" & _
        "SetThumbnailTooltip hresult(hwnd;wstr);" & _
        "SetThumbnailClip hresult(hwnd;ptr);"

Global Const $tagITaskbarList4 = $tagITaskbarList3 & _
        "SetTabProperties hresult(hwnd;int);"

to have a chance to use some of it in pre-win7 ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

  • ioa747 changed the title to ITaskbarList4 interface
  • 2 weeks later...
Posted
1 hour ago, CYCho said:

@ioa747Is there a way to refresh thumbnail preview while the app is in minimized state?

I did some tests but I didn't succeed. It needs further research. If I find anything I will let you know

I know that I know nothing

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...