Home > Software engineering >  MFC in a modal dialog box drawing?
MFC in a modal dialog box drawing?

Time:12-16

GDI + drawing has recently been doing, modal dialog box can be OnPaint () function, through GetDlgItem (nID) - & gt; GetDC () to obtain the DC drawing, want to ask how can in a modal dialog box drawing, is in m_pimmodelDlg - & gt; Create (IDD_DIALOG1, this) behind the writing drawing function? I put a Picture in dialog Control? How like a modal dialog box that can not get the DC, strives for the great god gives directions

If (m_pimmodelDlg==NULL) {//determine whether the dialog is point to

M_pimmodelDlg=new CImmodelDlg ();//points to a non die example dialog

M_pimmodelDlg - & gt; Create (IDD_DIALOG1, this);//create

}

M_pimmodelDlg - & gt; ShowWindow (SW_SHOW);//show

CodePudding user response:

Is not the same??

CodePudding user response:

reference 1st floor mmcanyu response:
is not the same??
normal modal dialog boxes, and the modal dialog custom painting no difference? Don't know why I use a modal dialog box drawing no problem, with a modal dialog box is wrong ~ ~
  • Related