To use the LBitmapWindow (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 LBitmapWindow (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 LBitmapWindow::MsgProcCallBack virtual function.
The following is a short example of getting started using LBitmapWindow 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);// In your View class, declare an LBitmapWindow (or derived) class objectLBitmapWindow m_Image;// Now, in the function for processing WM_PAINT messages:COLORREF rgb;// Set the window handlem_Image.SetWndHandle(m_hWnd);// Load the filem_Image.Load(TEXT("C:\\LEADTOOLS22\\Images\\sample1.cmp"));// Get the background of the windowrgb = GetSysColor(COLOR_WINDOW);// Set the window background colorm_Image.SetPatternBackColor(rgb);// Fit the image in the windowm_Image.SetZoomMode(ZOOM_FIT, TRUE);
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
