05-17-2007 03:38 AM
05-17-2007 04:13 AM
I don't understand what do you mean by "controls on a graph control": the graph control hasn't any built-in button available so I think you are referring to buttons on the same panel as the graph control, otherwise you should clarify better your situation.
Normally, command buttons can be disabled by calling SetInputMode (PanelHandle, controlID, 0); that disables and dims the control. If you want to disable the button but do not want to dim it, you can use SetCtrlAttribute (panelHandle, controlID, ATTR_CTRL_MODE, VAL_INDICATOR); to exclude user interaction with the control. As a las resort, you could install a callback in your active-only command button and trap EVENT_LOST_FOCUS event either swallowing it (I don't remember wether this event can be swallowed) or calling SetActiveCtrl to restore it as the active control.