I think I understand how it is meant to work but hmmm it's not. I must have something fundamental wrong with my code below.
I start up the notepad app.
I grab the winhandle for it using WinGetHandle.
I then set up a dll structure and populate it with some data...
All this is going well so far 🙂
I then try to send those numbers to the application using _SendMessage . I receive a reply of 0 so that tells me its all worked? however the size of my notepad hasn't changed and isn't restricted in any way...
I also tried doing another read after this and the data returned is the same as the data I sent , so it looks like it's doing something .. hmmmmm
Global Const $tagMINMAXINFO = "struct;long;long;endstruct;" & _
"struct;long MaxSizeX;long MaxSizeY;endstruct;" & _
"struct;long MaxPositionX;long MaxPositionY;endstruct;" & _
"struct;long MinTrackSizeX;long MinTrackSizeY;endstruct;" & _
"struct;long MaxTrackSizeX;long MaxTrackSizeY;endstruct;"
Local $tMMI = DllStructCreate($tagMINMAXINFO)
local $WinHandle = WinGetHandle("[CLASS:Notepad]")
if @error Then
ConsoleWrite("Application not found " & @CRLF)
ConsoleWrite("Application found and the handle is " & $WinHandle & @CRLF)
Consolewrite("return from Send " & _SendMessage($WinHandle, $WM_GETMINMAXINFO, 0, $tMMI, 0, "wparam", "struct*") & @CRLF)