Home > Software engineering >  Which is a dialog box shows the complete message, please?
Which is a dialog box shows the complete message, please?

Time:09-24

I use MFC to set up a dialog box procedure, put an edit box on the dialog box, adds a string variable; Effect is when the program is running, the dialog box is displayed, in the edit box shows the string; Idea is when after the success of the dialog displays the clothes with setwindowtext edge in the edit box, but don't know which message dialog displays success will send? A great god, please give directions, create and initdialog message response, dialog box is not displayed, so these two should not! I am a novice, thank you!

CodePudding user response:

Can add in OnInitDialog, regardless of when DoModal modal or Create a modal, will be called to the OnInitDialog, although not shown here, but the window has been created and therefore will not lead to collapse, such as window is invalid
Can also be DDX_Text etc

CodePudding user response:

After the setwindowtext
RedrawWindow
That shows success

CodePudding user response:

Call in OnInitDialog SetDlgItemText ~

CodePudding user response:

OnInitDialog is when creating the window, but there was no mapped ~

CodePudding user response:

reference 1st floor zgl7903 response:
can add in OnInitDialog, regardless of when DoModal modal or Create a modal, will be called to the OnInitDialog, although not shown here, but the window has been created, therefore does not lead to collapse, such as window is invalid
Can also be associated DDX_Text etc.

Excuse me, in theory, to let the dialog box displayed, display, after the completion of another display text edit box should be how to deal with? (when the dialog is displayed on the vision, have text in the edit box) but I need to order they are! Thank you very much!

CodePudding user response:

The
reference 3 floor 7-eleven's response:
SetDlgItemText in OnInitDialog call ~

Excuse me, in theory, to let the dialog box displayed, display, after the completion of another display text edit box should be how to deal with? (when the dialog is displayed on the vision, have text in the edit box) but I need to order they are!

CodePudding user response:

reference 4 floor Yt_737499986 response:
OnInitDialog is when creating the window, but there was no mapped ~

Excuse me, in theory, to let the dialog box displayed, display, after the completion of another display text edit box should be how to deal with? (when the dialog is displayed on the vision, have text in the edit box) but I need to order they are!

CodePudding user response:

In OnInitDialog timer timing? The SetTimer? OnTimer?

CodePudding user response:

refer to 6th floor houjiahong response:
Quote: refer to the third floor 7-eleven's response:
SetDlgItemText in OnInitDialog call ~

Excuse me, in theory, to let the dialog box displayed, display, after the completion of another display text edit box should be how to deal with? (when the dialog is displayed on the vision, have text in the edit box) but I need to order they are!

In OnInitDialog PostMessage a custom message, SetDlgItemText in custom message response function to set the text edit box,
  • Related