Time:09-15
CodePudding user response:
code don't use figure!
MM_LOENGLISH mode the use of double buffer drawing window "https://download.csdn.net/download/schlafenhamster/9427265 This program demonstrates how to MM_LOENGLISH mode with double buffer drawing window, focus on MM_TEXT and MM_LOENGLISH mode BitBlt calls,
Void CLoEnglishView: : OnLButtonDown (UINT nFlags, CPoint point) {//TODO: Add your message handler code here and/or call the default The static BOOL sw=FALSE; CClientDC dc (this); //back color CRect the rect. GetClientRect (& amp; The rect); Dc. SetMapMode (MM_TEXT); SetWindowOrgEx (dc, 0, 0, NULL); SetViewportOrgEx (dc, 0, 0, NULL); If (sw) Dc. FillSolidRect (0, 0, the rect. Width (), the rect. Height (), RGB (255, 128, 255)); The else Dc. FillSolidRect (0, 0, the rect. Width (), the rect. Height (), RGB (255, 255, 128)); if(! Sw) {Sw=TRUE; Dc. SetMapMode (MM_LOENGLISH); SetWindowOrgEx (dc, 0, 0, NULL); SetViewportOrgEx (dc, the rect. Right/2, the rect. The bottom/2, NULL); } The else {Sw=FALSE; Dc. SetMapMode (MM_TEXT); SetWindowOrgEx (dc, 0, 0, NULL); nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
Page link:https//www.codepudding.com/Softwareengineering/935.html