AnnSetWnd example for Delphi
{ This example updates the container object’s window handle if necessary. }
procedure TForm1.TestAnnWnd ( hContainer: HANNOBJECT; h_Wnd: HWND );
var
hObjectWnd: HWND;{ Container object's window }
begin
{ Set the container's window to the current window, unless it is already current }
LEADAnn1.AnnGetWnd ( hContainer, hObjectWnd );
if ( hObjectWnd = h_Wnd ) then
ShowMessage ( 'Already using the current window' )
else
LEADAnn1.AnnSetWnd ( hContainer, h_Wnd );
end;