This project involves figuring out two related puzzles about Opera 7 on Windows.
1. Assume Opera 7 (latest build) is running on WinXP Pro or Win2000.
2. Have code like this in a Delphi 7 program and note the two tasks commented:
procedure [login to view URL];
var
hWnd, AppDC: THandle;
Rect: TRect;
const
aWindowTitle = 'OpWindow';
begin
hWnd := FindWindow(pChar(aWindowTitle), nil);
if hWnd > 0 then
begin
try
[login to view URL];
MakeWindowActive(hWnd);
AppDC := GetWindowDC(hWnd);
[login to view URL](hWnd, Rect);
{task 1: determine why above call does not give the "correct" rect of the browser window (it gives 0,0,0,0)}
finally
ReleaseDC(0, hWnd);
PostMessage(hWnd, WM_CLOSE, 0, 0);
{task 2: determine why above message crashes Opera and/or how to automatically close Opera without crashing it}
end;
[login to view URL];
end;
end;
Note, the above technique applied to other applications works perfectly. Opera is doing something unusual and I need some help to figure out exactly what.
## Deliverables
The deliverable is Delphi source code which demonstrates a solution to both tasks, namely finding the browser window coordinates and being able to close the browser without any errors being generated.
During bidding, you may upload an EXE without source which proves you have the solution.
Thank you.
## Platform
Windows 2000, Win XP Pro, Win 2003 Server
Opera 7 latest build from [[login to view URL]][1]; java not relevant nor required