Home > Back-end >  MFC document more projects newly built subdocument OnSize document internal label the splash screen
MFC document more projects newly built subdocument OnSize document internal label the splash screen

Time:09-20

MDI document is A child since YiDing AFrame and Aview, including Aview inherited from CFormView, then create A new document window after A? At the time of change A document window size, the content within the A document of the splash screen, ask for help!
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,
  • Related