Button control
-
Hi all, i like to deactivate my Dialog Button IDC_STOP_ROBOT. Seems like no big deal, but when useing the syntax below nothing happens?
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(FALSE);
.. or enable again:
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(TRUE);
happy coding, -mark
-
Hi all, i like to deactivate my Dialog Button IDC_STOP_ROBOT. Seems like no big deal, but when useing the syntax below nothing happens?
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(FALSE);
.. or enable again:
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(TRUE);
happy coding, -mark
CWnd* pWnd; pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT); pWnd->EnableWindow(FALSE);
ANDCWnd* pWnd; pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT); pWnd->EnableWindow(FALSETRUE); // sorry
if it doesn't work try rebuilding all. (now I noticed it's actually the same... :wtf::eek:) Hope it helps. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix -
Hi all, i like to deactivate my Dialog Button IDC_STOP_ROBOT. Seems like no big deal, but when useing the syntax below nothing happens?
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(FALSE);
.. or enable again:
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(TRUE);
happy coding, -mark
macmac38 wrote: ...nothing happens? At what point(s) are you calling
EnableWindow()
?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen