Using LVectorWindow as a Window

To use the LVectorWindow (or any derived) class as a Window in your application, you must create a window, and then assign the newly created window handle to an LVectorWindow (or derived) object. After that, the class object will do all of the processing required to handle the Window messages that the window will receive, including those relating to displaying images. If you want to process messages yourself, you can override the LVectorWindow::MsgProcCallBack virtual function.

For a complete example, please refer to the C++ Class Library Vector Demo. In the file VecView.cpp, search for this code, and follow the instructions for modifying the demo to work with the LVectorWindow as either a Window or a Control.

There are two way to use LEAD controls :   
   //     1.As a control:   
   //          Enable A and Disable B    
   //     2.As a Window :   
   //          Enable B and Disable As 

The following is a short example of getting started using LVectorWindow as a Window. This example was done using MFC, so your code may look different if you use some other foundation class library.

// Do not forget to load the libraries in application's initialization code:   
// LBase::LoadLibraries (LT_ALL_LEADLIB);   
// Declare an LVectorWindow object, or a pointer to an LVectorWindow object   
// In the Vector Demo, this in the Document Class   
public:    
   LVectorWindow *m_pVectorWindow;   
//If working with a pointer to an LVectorWindow object, allocate the object   
//In the Vector Demo, this is in the Document class constructor   
m_pVectorWindow = new LVectorWindow;   
//Attach the LVectorWindow object to an already existing window   
//In the vector Demo, this is done in the View Class,  in the OnCreate() function   
//The m_hWnd refers to the existing window that the LVectorWindow object is being attached   
GetDocument()->m_pVectorWindow->SetWndHandle(m_hWnd);   
//Add code to load a file.   
//In the Vector Demo, this is in the Document class, in the OnOpenDocument() function   
m_pVectorWindow->Load(szTemp); 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help