Ciantic / VirtualDesktopAccessor

DLL for accessing Windows 11/10 Virtual Desktop features from e.g. AutoHotkey
MIT License
782 stars 93 forks source link

the wParam of OnChangeDesktop is incorrect #59

Closed ZhuangQu closed 1 year ago

ZhuangQu commented 1 year ago

In your example

OnChangeDesktop(wParam, lParam, msg, hwnd) {
    Critical(1)
    OldDesktop := wParam + 1
    NewDesktop := lParam + 1
    Name := GetDesktopName(NewDesktop - 1)
    OutputDebug("Desktop changed to " Name " from " OldDesktop " to " NewDesktop)
    ; TraySetIcon(".\Icons\icon" NewDesktop ".ico")
}

The OldDesktop is always 1, not actual. The NewDesktop is correct.

Ciantic commented 1 year ago

Should work in latest DLL