Well I have a Dialog with all kinds of things going on but for this question it regards a single Button Control. I would like the user to be able to use this button only once. It is pretty basic, but using a simple BOOL does not seem to do the trick - or at least how I have tried it.
My version:
Code://Reset Button case IDC_BTN_RSTR: { BOOL var = TRUE; if(var == FALSE) return TRUE; SetDlgItemInt(hwndDlg, IDC_STR, 0, FALSE); SetDlgItemInt(hwndDlg, IDC_STR_, 0, FALSE); SetDlgItemInt(hwndDlg, IDC_STR__, 0, FALSE); var = FALSE; return TRUE; }




Reply With Quote