Home > Software engineering >  MFC dialog-based application problems,
MFC dialog-based application problems,

Time:09-24

I analysis the dialog box to create dialog is created using domodal, actual call interface is CreateDialogIndirect, this function will WM_INITDIALOG message, showwindow subclasses onInitDialog () function I have commented, the next step in the single step debugging in CreateDialogIndirect display window, according to my understanding after creating the window need showwindow will only be displayed, there is no direct calls can be displayed, I'm a little don't understand, and seek god with it! Not assembly level debugging temporarily.

CodePudding user response:

CreateDialogIndirect internal calls createwindow and showwindow

CodePudding user response:

reference
CreateDialogIndirect internal calls createwindow and showwindow

,, ha ha,, so simple and crude, according to my understanding should call CWND: : showwindow displays, but debugging validation is wrong, can't again in the SDK code: : showdinow break points,, so I can't

CodePudding user response:

Positive solution on the ground floor, but the MFC source code is a painful process

CodePudding user response:

Have the parent window, if any, it is recommended to use a modal, because of the modal can prevent the news of the parent window, or can't see the child window cannot parent window operation, will cause the suspended animation

Can process WM_WINDOWPOSCHANGED messages, there would be no flash feeling
 void CDlg7Dlg: : OnWindowPosChanged (WINDOWPOS FAR * lpwndpos) 
{
CDialog: : OnWindowPosChanged (lpwndpos);

//TODO: Add your message handler code here
ShowWindow (m_bHideFlag? SW_HIDE, SW_SHOW);
}

CodePudding user response:

WS_VISIBLE?