Repaints the class object's window. Only the specified rectangle will be repainted.
#include "ltwrappr.h"
L_VOID LBitmapWindow::Repaint(pRect=NULL)
Pointer to a rectangle structure that describes the rectangle to be repainted. Pass NULL to repaint the entire window.
None.
Win32, x64.
L_INT LBitmapWindow__RepaintExample(HWND hWndParent)
{
L_INT nRet;
LBitmapWindow LeadBWnd ;
L_UINT uZoomMode ;
RECT rectZoom ;
nRet = LeadBWnd.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")));
if (nRet == SUCCESS)
{
if (LeadBWnd.CreateWnd(hWndParent, TRUE, 0, 0, 100, 100) == NULL)
return 0;
if (LeadBWnd.IsAutoPaintEnabled() == FALSE)
{
// stop paint
LeadBWnd.EnableAutoPaint(TRUE) ;
}
/* repaint the image, but paint stopped,
then the Repaint will not paint the image */
LeadBWnd.Repaint() ;
// start paint with new updates
LeadBWnd.EnableAutoPaint(FALSE) ;
// repaint the image
LeadBWnd.Repaint() ;
// get zoom mode for current bitmap window
uZoomMode = LeadBWnd.GetZoomMode();
if (uZoomMode != ZOOM_FACTOR)
{
uZoomMode = ZOOM_FITHEIGHT ;
// change the zoom mode for current bitmap window
nRet =LeadBWnd.SetZoomMode(uZoomMode) ;
if(nRet !=SUCCESS)
return nRet;
}
//...
//...
if (LeadBWnd.GetHorzLineStep() != 2)
LeadBWnd.SetHorzLineStep(2) ;
if (LeadBWnd.GetVertLineStep() != 2)
LeadBWnd.SetVertLineStep(2) ;
// check if auto scroll bars is enable or not
if (LeadBWnd.IsAutoScrollEnabled() == FALSE)
LeadBWnd.EnableAutoScroll(TRUE) ;
// fill zoom rect to use it in ZoomToRect
rectZoom.left = 50 ;
rectZoom.top = 50 ;
rectZoom.right = 75 ;
rectZoom.bottom= 75 ;
nRet =LeadBWnd.ZoomToRect(rectZoom) ;
if(nRet !=SUCCESS)
return nRet;
//...
//...
// use ScrollBars (Horizontal & Vertical)
// 10 = the distance to scroll the bitmap horizontally.
// 20 = the distance to scroll the bitmap horizontally.
LeadBWnd.ScrollBy( 10, 20) ;
// go to 10 position on horizontal scroll in bitmap
// go to 20 position on vertical scroll in bitmap
LeadBWnd.ScrollTo( 10, 20) ;
}
else
return nRet;
return SUCCESS ;
}
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.