Child windows do not respond to WM_COPYDATA

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Raf
Posts: 128
Joined: 31 Jul 2024 15:34

Child windows do not respond to WM_COPYDATA

Post by Raf »

I send a message to the Xyplorer window by handle if it has ThunderRT6FormDC class. The problem is that the child windows have exactly the same class, but they don't respond to messages.

I've added a workaround to check if owner class of this window is ThunderRT6Main which means "it's main window and it may respond". If it's not, I don't send message to this window:

Code: Select all

        ; Autohotkey
        _winClass := WinGetClass(_winId)
        switch _winClass {
            case "ThunderRT6FormDC":
                ; Exclude XYplorer child windows:
                ; main window have "ThunderRT6Main" owner
                _ownerId := DllCall("GetWindow", "ptr", _winId, "uint", 4)
                _ownerClass := WinGetClass(_ownerId)

                if (_ownerClass != "ThunderRT6Main")
                    continue
            . . .
        }

        SendMessage(..., _winId)
 
It would be much easier (and faster) if the child windows had a different window class that does not overlap with the main one. Is it possible to change it or not?

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Child windows do not respond to WM_COPYDATA

Post by admin »

Currently not. But it may be possible in later versions of tB.

Raf
Posts: 128
Joined: 31 Jul 2024 15:34

Re: Child windows do not respond to WM_COPYDATA

Post by Raf »

Can child or main window explicitly return some "true/false" after sending a script without SC CopyData? Currently there's no response after using messages and CLI switches.

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Child windows do not respond to WM_COPYDATA

Post by admin »

Not now.

Post Reply