#FEATURE by stefan
class: WinWorkstation
added:
#getInternalWindowText:
#primInternalGetWindowTextW:into:size:
#primSendMessage:message:wParamInt:lParamInt:
changed:
#primSendMessage:message:wParam:lParam:
#sendButtonMessageType:at:toWindowId: (send #primSendMessage:message:wParamInt:lParamInt: instead of #primSendMessage:message:wParam:lParam:)
Support for WindowsAccessLibrary.ets
Fix sendButtonMessageType:...
--- a/WinWorkstation.st Tue Aug 06 11:38:22 2019 +0200
+++ b/WinWorkstation.st Thu Aug 08 18:42:42 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996 by Claus Gittinger
All Rights Reserved
@@ -2142,7 +2144,7 @@
}
goto again;
}
- /* fail evtl. später ändern und in st verzögert aufrufen
+ /* fail evtl. später ändern und in st verzögert aufrufen
*/
console_fprintf(stderr, "WinWorkstation [info]: UnregisterClass %s failed.\n",(char*)ev->ev_arg1);
}
@@ -13404,6 +13406,27 @@
^ ok
! !
+!WinWorkstation methodsFor:'extensions'!
+
+getInternalWindowText:aWindowId
+ "get a window's title text"
+
+ |buffer n|
+
+ buffer := Unicode16String new:200.
+ n := self primInternalGetWindowTextW:aWindowId into:buffer size:200.
+ n >= 0 ifTrue:[
+ ^ (buffer copyTo:n) asSingleByteStringIfPossible
+ ].
+ self primitiveFailed.
+!
+
+primInternalGetWindowTextW:aWindowId into:buffer size:maxSize
+ "get a window's title text"
+
+ <apicall: int "InternalGetWindowText" (handle, pointer, int) module: "user32.dll" >
+! !
+
!WinWorkstation methodsFor:'font stuff'!
createFontFor:aFontName
@@ -19200,9 +19223,17 @@
primSendMessage:aWindowId message:message wParam:wParam lParam:lParam
"Sends the specified message to a (possibly alien) window.
The SendMessage function calls the window procedure for the specified window and
- does not return until the target's window procedure has processed the message."
-
- <apicall: bool "SendMessageA" (handle uint pointer pointer) module: "user32.dll" >
+ does not return until the target's window procedure has processed the message.
+ Both wParam and lParam must be Pointers."
+
+ <apicall: bool "SendMessageA" (handle uint wparam lparam) module: "user32.dll" >
+
+ "Modified (comment): / 08-08-2019 / 18:35:35 / Stefan Vogel"
+!
+
+primSendMessage:aWindowId message:message wParamInt:wParam lParamInt:lParam
+ <apicall: bool "SendMessageA" (handle uint int int) module: "user32.dll" >
+ "Created: / 08-08-2019 / 18:24:50 / Stefan Vogel"
!
primSetForegroundWindow: aWindowId
@@ -19460,7 +19491,8 @@
wParam := 0.
lParam := (aPoint x) + (aPoint y bitShift:16).
- result := self primSendMessage:aWindowId message:messageType wParam:wParam lParam:lParam.
+"/ result := self primSendMessage:aWindowId message:messageType wParam:wParam lParam:lParam.
+ result := self primSendMessage:aWindowId message:messageType wParamInt:wParam lParamInt:lParam.
^ result
"
@@ -19477,6 +19509,8 @@
Display sendButtonPress:1 at:1@1 toWindowId: externalAddress.
Display sendButtonRelease:1 at:10@10 toWindowId: externalAddress.
"
+
+ "Modified (format): / 08-08-2019 / 18:37:06 / Stefan Vogel"
!
sendButtonPress:button at:aPoint toWindowId:aWindowId
@@ -20037,7 +20071,7 @@
}
%}
"
- (StandardSystemView new label:'äöü') open
+ (StandardSystemView new label:'äöü') open
"
!