How to get Windows 7 jump list window via ::FindWindow or ::EnumWindows?

What's it's class or parent?

I can't Spy++ it because it disappears if loses focus.

Thank you.

Jump list

http://msdn.microsoft.com/en-us/library/windows/desktop/aa511446.aspx

有帮助吗?

解决方案 2

Open spy++, open jump list, click the refresh button on spy++.

Jump list

其他提示

Here's a way, similar to the Spy++ technique, to find it through code as soon as it's shown using an event hook:

void CALLBACK WinEventProc(HWINEVENTHOOK, DWORD, HWND hwnd, LONG, LONG, DWORD, DWORD) {
    std::wstring className(256, L'\0');
    std::wstring windowText;

    windowText.resize(GetWindowTextLengthW(hwnd) + 1);
    GetWindowTextW(hwnd, &windowText[0], windowText.size());
    windowText = windowText.c_str();

    GetClassNameW(hwnd, &className[0], className.size());
    className = className.c_str();

    std::wcout << "Class: \"" << className << "\"\n";
    std::wcout << "Window: \"" << windowText << "\"\n";
}

int main() {
    HWINEVENTHOOK hWinEventHook = SetWinEventHook(
        EVENT_OBJECT_SHOW, EVENT_OBJECT_SHOW, 
        nullptr, WinEventProc, 
        0, 0, 
        WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS
    );

    MSG msg;
    while (GetMessage(&msg, nullptr, 0, 0)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    if (hWinEventHook) {
        UnhookWinEvent(hWinEventHook);
    }
}

As each window is shown, it appears in the console (or whatever stdout is at the time) output as a class name of DV2ControlHost and text of Jump List. If you want to interact with it, however, I believe there's a much more structured API, though I might be mistaken.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top