#include "ltwrappr.h"
L_VOID LBitmapWindow::Repaint(pRect=NULL)
LPRECT pRect; |
pointer to a rectangle structure |
Repaints the class object's window. Only the specified rectangle will be repainted.
Parameter |
Description |
pRect |
Pointer to a rectangle structure that describes the rectangle to be repainted. Pass NULL to repaint the entire window. |
None
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
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 paintLeadBWnd.EnableAutoPaint(TRUE) ;}/* repaint the image, but paint stopped,then the Repaint will not paint the image */LeadBWnd.Repaint() ;// start paint with new updatesLeadBWnd.EnableAutoPaint(FALSE) ;// repaint the imageLeadBWnd.Repaint() ;// get zoom mode for current bitmap windowuZoomMode = LeadBWnd.GetZoomMode();if (uZoomMode != ZOOM_FACTOR){uZoomMode = ZOOM_FITHEIGHT ;// change the zoom mode for current bitmap windownRet =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 notif (LeadBWnd.IsAutoScrollEnabled() == FALSE)LeadBWnd.EnableAutoScroll(TRUE) ;// fill zoom rect to use it in ZoomToRectrectZoom.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 bitmapLeadBWnd.ScrollTo( 10, 20) ;}elsereturn 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
