Home > Software engineering >  About MFC non-primary internal control dialog definition
About MFC non-primary internal control dialog definition

Time:09-23

Program objective is to need two dialog, I set up a tree in the main dialog box controls, if placed the tree control in the main dialog box, run after initialization is right,
But if it is set in the main dialog box, and then display when there is a mistake, even can run cannot display in the tree control setting, the content of the
The main dialog box with the corresponding button to jump to the main dialog box,


Home page to confirm below to jump to the main page
The code is as follows: (DIALOG1 main dialog)


The following is the main dialog

The main tree controls within the dialog box is defined as follows:


Want to ask about the main the controls within the dialog cannot in OnInitDialog () function within the initialization? In order to realize implementation should do? Hope the great god directions

CodePudding user response:

Hope everyone more directions

CodePudding user response:

The Lord the controls within the dialog can be in the main dialog in OnInitDialog () function to initialize

CodePudding user response:

refer to the second floor schlafenhamster response:
non-primary the controls within the dialog can be in the main dialog in OnInitDialog () function to initialize the


I just try to change it or not is no display content is I use VS2012 then the code below is I'm not in the main dialog box class wizard adds OnInitDialog () function

But run out or blank

CodePudding user response:

May be I dialog class is not set to try again

reference weixin_36338828 reply: 3/f
Quote: refer to the second floor schlafenhamster response:

Non-primary the controls within the dialog can be in the main dialog box in OnInitDialog () function to initialize the


I just try to change it or not is no display content is I use VS2012 then the code below is I'm not in the main dialog box class wizard adds OnInitDialog () function

But run out or blank

CodePudding user response:

Why it is changed in the About class?

CodePudding user response:

And return, later all will not perform

CodePudding user response:

Don't use getdlgitem (main_tree=0), use the wizard to produce a m_Tree control variables,

CodePudding user response:

reference 5 floor zgl7903 reply:
why is the change in the About class?


Is a beginner is still in groping just found this problem, but is that a lot of return to generate its own, I later all commented out with a return to the front of # 5312 what's the meaning

CodePudding user response:

refer to 7th floor schlafenhamster response:
don't use getdlgitem (main_tree=0), use the wizard to produce a m_Tree control variables,


Okay, I also have a try

CodePudding user response:

Your code didn't see what's the problem, can contact me QQ, I see,
  • Related