A document internal related code is as follows:
Void CAView: : OnSize (UINT nType, cx, int int cy)
{
//CFormView: : OnSize (nType, cx, cy);
CRect dlgRect;
This - & gt; GetClientRect (dlgRect);
//InvalidateRect (CRect (MARGIN_LEFT_BATPANE, 0, cx, cy), TRUE);
If (batterysPanePic. M_hWnd) {
BatterysPanePic. MoveWindow (MARGIN_LEFT_BATPANE MARGIN_TOP_BATPANE, dlgRect. The Width (), dlgRect. Height (), TRUE);
If (pbatterysDlg!=NULL)
PbatterysDlg - & gt; OnSize (0, dlgRect Width () - MARGIN_LEFT_BATPANE dlgRect. Height () - MARGIN_TOP_BATPANE);
If (tbatterysDlg!=NULL)
TbatterysDlg - & gt; OnSize (0, dlgRect Width () - MARGIN_LEFT_BATPANE dlgRect. Height () - MARGIN_TOP_BATPANE);
If (fbatterysDlg!=NULL)
FbatterysDlg - & gt; OnSize (0, dlgRect Width () - MARGIN_LEFT_BATPANE dlgRect. Height () - MARGIN_TOP_BATPANE);
If (ebatterysDlg!=NULL)
EbatterysDlg - & gt; OnSize (0, dlgRect Width () - MARGIN_LEFT_BATPANE dlgRect. Height () - MARGIN_TOP_BATPANE);
}
}
BOOL CBatteryCheckView: : OnEraseBkgnd (pDC) CDC *
{
Return CFormView: : OnEraseBkgnd (pDC);
}
CodePudding user response:
Learn how to use Spy++CodePudding user response:
Finally, LockWindowUpdate, change the size after release windowUpdate (); To solve the problem,