Disable/Enable Graphical Pushbutton in Dialog...
Posted on 1998-11-13
I have a dialog that displays records from a MSAccess database using a few static labels, edit fields, and some graphical record navigation buttons ( |< < > >| ).
I would like to disable the appropriate button according to the record state, ie... If the last record is currently being viewed, then gray-out and disable the Next & Last Record buttons.
I do not want to wipe the image, but display a greyed-out replacement image when the button is disabled. So, this would not work...
...where m_IDC_LASTRECORD is a pointer object to the CButton class.
The idea is very much like disabling graphical buttons on a toolbar.
Maybe this can be done using the CBitmapButton MFC Class, but the button response is soooooo slow using this class.