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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.