AnnSetWnd example for C++ Builder
/* This example updates the container object's window handle if necessary. */
void TForm1::TestAnnWnd ( HANNOBJECT hContainer, HWND hWnd )
{
HWND hObjectWnd; /* Container object's window */
/* Set the container's window to the current window, unless it is already current */
LEADAnn1->AnnGetWnd ( hContainer, hObjectWnd );
if ( hObjectWnd == hWnd )
ShowMessage ( "Already using the current window" );
else
LEADAnn1->AnnSetWnd ( hContainer, hWnd );
}