Bring TaskSwitcher Window to Foreground - possible?

124 Views Asked by At
DWORD myThreadId = GetCurrentThreadId();

HWND hwnd_TaskSwitcher = FindWindow("TaskSwitcherWnd", "Task Switching");
AttachThreadInput(myThreadId, GetWindowThreadProcessId(hwnd_TaskSwitcher, NULL), 1);

SetForegroundWindow(hwnd_TaskSwitcher);

Following a tap on the touchpad, i wish to bring forth the alt-tab / task-switcher window, to be able to choose from the opened windows the task-switcher shows me.

But I am unable to bring to front, the tasks-switcher window on windows 8 at all.

Can this be done somehow ?

1

There are 1 best solutions below

0
Ankur On

We can use explorer.exe to launch the task switcher window.

I found: Launching Windows Special Folders:

To see the task switcher window, we may execute:

explorer.exe shell:::{3080F90E-D7AD-11D9-BD98-0000947B0257}

In C or CPP we may do:

ShellExecute(HWND_DESKTOP,
  L"open",
  L"C:\\Windows\\explorer.exe",
  L"shell:::{3080F90E-D7AD-11D9-BD98-0000947B0257}",
  L"C:\\Windows",
  SW_SHOWDEFAULT
);