Page 1 of 1

Process().TaskBarWindows[].Text: Unicode/D2009?

Posted: Mon Dec 01, 2008 2:23 pm
by brian
Will there be a new version to return unicode for D2009? It currently returns "????" whenever a window has unicode characters.

Posted: Mon Dec 01, 2008 8:02 pm
by madshi
I'll put that on my to do list, but adding full unicode support to all the countless objects in madKernel is a lot of work, so I guess it will take quite some time...

Posted: Tue Dec 02, 2008 2:06 am
by brian
I was able to get it working after a few simple changes (only this specific case for TaskBarWindows)

(IWindow)

(335)
function GetText : String;
procedure SetText (value: String);
property Text : String read GetText write SetText;


(4198)
function GetText : String;
procedure SetText (value: String);


(4418)

function TIWindow.GetText : String;
var i1 : integer;
begin
if CheckValid and
(SendMessageTimeoutW(FHandle, WM_GETTEXTLENGTH, 0, 0, SMTO_ABORTIFHUNG, 2000, dword(i1)) <> 0) then begin
SetLength(result, i1 + 1);
if SendMessageTimeoutW(FHandle, WM_GETTEXT, i1 + 1, integer(result), SMTO_ABORTIFHUNG, 2000, dword(i1)) <> 0 then
SetLength(result, i1)
else result := '';
end else
result := '';
end;

procedure TIWindow.SetText(value: String);
var c1 : dword;
begin
if CheckValid then
SendMessageTimeoutW(FHandle, WM_SETTEXT, 0, integer(value), SMTO_ABORTIFHUNG, 2000, c1);
end;

Posted: Tue Dec 02, 2008 8:28 am
by madshi
Ok, that change should be included in the next build.