
Hiding a button in a Dialog dynamically
To get your button, use GetDlgItem():
CWnd* pWnd = GetDlgItem(IDC_MY_BUTTON);
ASSERT_VALID(pWnd);
pWnd->ShowWindow(SW_HIDE);
--
Ajay Kalra
Microsoft VC++/MFC MVP
Note: Please post all replies to newsgroup only.
Quote:
> Does anyone know how to dynamically show and hide a CButton object in a
> CDialog object. I would guess that one would use ShowWindow with SW_HIDE
or
> SW_SHOW arguments, but how does one acquire access to the embedded
CButton?
> Some example code would be appreciated.
> Thank you.