Processing the Window Activation Messages

When working in an MDI environment, each window may have its own bitmap data or transformations. Therefore, the toolkit data should be set to reflect the changes.

L_VOID OnMDIActivate ( HWND hWnd, L_BOOL active, HWND hActivate, HWND hDeactivate ) 
{ 
   PAINTXFORM XForm ; 
   HDC hdcCompatibility ; 
   RECT rcDCRect ; 
   . 
   . 
   . 
   /*set the painting toolkit data*/ 
   hdcCompatibility = GetDC ( hMDIChildWnd ) ; 
   L_PntSetMetrics ( pPaint, hdcCompatibility, MDIChildData.pBitmap, MDIChildData.hPalette ) ; 
   ReleaseDC ( hWnd, hdcCompatibility ) ; 
   XForm.nZoom    = MDIChildData.nZoomFactor ; 
   XForm.nXOffset = MDIChildData.nHscroll ; 
   XForm.nYOffset = MDIChildData.nVscroll ; 
   L_PntSetTransformation ( pPaint, &XForm ) ; 
   GetClientRect ( hMDIChildWnd, &rcDCRect ) ; 
   L_PntSetDCExtents ( pPaint, &rcDCRect ) ; 
   L_PntSetClipRgn (pPaint, MDIChildData.hClipRng ) ; 
   . 
   . 
   . 
} 

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

LEADTOOLS Digital Paint C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.