Jeremy,
> I have found 2 API calls called GetClassName and GetClassInfo, and
> GetClassName works, but I am not sure how to work it in with where the
mouse
> is etc.
Here's some code I have for getting a window on the screen:
function WindowWithPoint ( ptPoint: TPOINT ): HWND;
function GetChildWindowWithPoint ( hwndRoot: HWND; ptPoint: TPOINT ):
HWND;
var rcWindow : TRECT;
hwndTest : HWND;
begin
Result := hwndRoot;
hwndTest := GetWindow(hwndRoot, GW_CHILD);
while (hwndTest <> 0) do
begin
if (IsWindowVisible(hwndTest)) then
begin
GetWindowRect(hwndTest, rcWindow);
if (PtInRect(rcWindow, ptPoint)) then
begin
Result := GetChildWindowWithPoint(hwndTest, ptPoint);
break;
end;
end;
hwndTest := GetWindow(hwndTest, GW_HWNDNEXT);
end;
end;
begin
Result := GetChildWindowWithPoint(GetDesktopWindow, ptPoint);
end;
Hope this helps,
Deepak Shenoy
Agni Software
http://www.agnisoft.com
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"