how to enable/disable on mouse click?
-
I have an edit box to be enabled when user tick check box and disabled when box is unchecked. I want the disabling/enabling to be done immediately after user use the mouse click to check/uncheck. How do i detect the mouse click? currently the code is: if(left mouse click and box is checked){ GetDlgItem( IDC_BUTTON1 )->EnableWindow(TRUE);} else{ GetDlgItem( IDC_BUTTON1 )->EnableWindow(FALSE); }
-
I have an edit box to be enabled when user tick check box and disabled when box is unchecked. I want the disabling/enabling to be done immediately after user use the mouse click to check/uncheck. How do i detect the mouse click? currently the code is: if(left mouse click and box is checked){ GetDlgItem( IDC_BUTTON1 )->EnableWindow(TRUE);} else{ GetDlgItem( IDC_BUTTON1 )->EnableWindow(FALSE); }
Handle the BTNCLICK massage for the check box.Note associate a boollean member variable with the checkbox tocheck the current status.