LVectorWindow::GetVectorWnd

#include "ltwrappr.h"

HWND LVectorWindow::GetVectorWnd(L_VOID)

Gets the window handle of the class object's vector window.

Returns

The vector handle of the vector window.

Comments

This returns the m_hWnd data member.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetVectorWnd, LVectorWindow::GetVectorRect, LVectorWindow::GetVectorVisibleRect, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object
//This example centers the LVectorWindow object in the parent window

void Example26(LVectorWindow *pVectorWindow)
{
   RECT parentRect, vectorRect, moveRect;
   L_INT moveWidth, moveHeight;
   HWND hWndParent = ::GetParent(pVectorWindow->GetVectorWnd());
   if (hWndParent != NULL)
   {
      ::GetClientRect(hWndParent, &parentRect);
      pVectorWindow->GetVectorRect(&vectorRect);

      moveWidth = vectorRect.right - vectorRect.left;
      moveHeight = vectorRect.bottom - vectorRect.top;

      moveRect.left = ((parentRect.right - parentRect.left) - moveWidth)/2;
      moveRect.top  = ((parentRect.bottom - parentRect.top) - moveHeight)/2;
      moveRect.right = moveRect.left + moveWidth;
      moveRect.bottom = moveRect.top + moveHeight;


      pVectorWindow->Move(moveRect, TRUE);
   }
}