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

delphi package - easy access to kernel objects etc.
Post Reply
brian
Posts: 38
Joined: Fri Feb 29, 2008 11:12 am

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

Post by brian »

Will there be a new version to return unicode for D2009? It currently returns "????" whenever a window has unicode characters.
madshi
Site Admin
Posts: 10366
Joined: Sun Mar 21, 2004 5:25 pm

Post 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...
brian
Posts: 38
Joined: Fri Feb 29, 2008 11:12 am

Post 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;
madshi
Site Admin
Posts: 10366
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ok, that change should be included in the next build.
Post Reply