I have this code :
m_pBtnCom = new CButton();
m_pBtnCom->Create(_T("Push"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_TEXT|BS_VCENTER|BS_CENTER, rc, this, BTN_CMT);
Where:
this
= my derivedCWnd
classrc
=CRect
button positionBTN_CMT
= button id
Current context:
If I disable the parent CWnd
by calling EnableWindow(FALSE)
, even if I call the function EnableWindow(TRUE)
on the button (m_pBtnCom->EnableWindow(TRUE)
), the latter remains disabled; Therefore, nothing works on it: click, tooltip, ...
I tried to remove WS_CHILD
, without success
Question:
Is it possible to activate the button when the window (argument this
in my code) is disabled?