Page 1 of 1

Child windows do not respond to WM_COPYDATA

Posted: 27 Sep 2025 08:16
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?

Re: Child windows do not respond to WM_COPYDATA

Posted: 27 Sep 2025 10:45
by admin
Currently not. But it may be possible in later versions of tB.

Re: Child windows do not respond to WM_COPYDATA

Posted: 27 Sep 2025 11:07
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.

Re: Child windows do not respond to WM_COPYDATA

Posted: 27 Sep 2025 11:17
by admin
Not now.