Home > Software engineering >  Would like to have two Windows in the MFC button control response under the same event. Don't u
Would like to have two Windows in the MFC button control response under the same event. Don't u

Time:11-20

Want to others in the MFC dialog, to integrate some buttons and a TAB, and then there is a problem, create new button control click TAB how can trigger another button in the program!

CodePudding user response:

Two window of the button

The same program (process)?

CodePudding user response:

The same, that is, on the basis of that have been programmed to others, I want to make interface 1 (dialog1) look good, added a Tab Control the button Control all transplantation in Control will interface 1 Tab in the Control,
Insert a new dialog2, 3, 4 set Tab Control Control good, later, in the new dialog2, button Control is added to the 3, 4, 5, want to click the button Control in the Control 5 to be able to use interface 1!
Thank humbly ~

CodePudding user response:

reference 1st floor schlafenhamster response:
two window of the button

The same program (process)?

The same, that is, on the basis of that have been programmed to others, I want to make interface 1 (dialog1) look good, added a Tab Control the button Control all transplantation in Control will interface 1 Tab in the Control,
Insert a new dialog2, 3, 4 set Tab Control Control good, later, in the new dialog2, button Control is added to the 3, 4, 5, want to click the button Control in the Control 5 to be able to use interface 1!
Thank humbly ~

CodePudding user response:

//simulation messaging m_hBtnParent=another button on the parent window of the dialog box
PostMessage (m_hBtnParent WM_COMMAND, MAKEWPARAM (ID, BN_CLICKED), 0).

CodePudding user response:

The on button click the actual function (not response functions are to be put in the TAB

CodePudding user response:

Very simple, there are two ideas:
1) message
2) with Pointers directly fix
  • Related