Many programs (True Transparancy and others) can get all active or running in background window class names like this one:
Delphi 7 Object Inspector name is tpropertyinspector
Opera main window class name is operawindowclass
etc.
So how to get any opened window class name in Delphi?
Call EnumWindows
to get all the top level windows. Then call GetClassName
to find out the window class name for each window. If you also wish to probe child windows then call EnumChildWindows
on each top level window.
Call GetClassName like this:
var
ClassName: string;
len: Integer;
...
SetLength(ClassName, 256);
len := GetClassName(window, PChar(ClassName), Length(ClassName));
if len=0 then
RaiseLastOSError;
SetLength(ClassName, len);
Simply use the GetClassName
function in the Windows API (same way in Delphi as in any language).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With