Home > Software engineering >  The button in the Dialog window of the child window can't response to a mouse click
The button in the Dialog window of the child window can't response to a mouse click

Time:09-24

Excuse me, I'm in a Dialog window (CDialogEx) has built three controls: m_ctlBrightBg (CStatic), m_ctlBtnBrightAdd (CButton), m_ctlBtnBrightSubtract (CButton), and then passed in OnInitDialog SetParent set m_ctlBtnBrightAdd and m_ctlBtnBrightSubtract to m_ctlBrightBg child window, click m_ctlBtnBrightAdd or m_ctlBtnBrightSubtract click button can't response code, if does not perform SetParent normal, m_ctlBrightBg (CStatic) Notify attribute is set to True, still won't do,

: : SetParent (m_ctlBtnBrightAdd m_hWnd, m_ctlBrightBg m_hWnd);//set the child window
: : SetParent (m_ctlBtnBrightSubtract m_hWnd, m_ctlBrightBg m_hWnd);//set the child window

Do you have any good solution, please? Thank you very much!

CodePudding user response:

Message is sent to the parent window, in response to the parent window, or to preach to the dialog box (Relay)

CodePudding user response:

You from a CYourStatic CStatic derived, processing
  • Related