
Adding buttons dynamically to a dialog
It's because of the CCmdUI stuff. Acts the same as the menu items. I
would go with Dirk's suggestion, and then also add an
ON_UPDATE_COMMAND_UI_RANGE handler for the same range of ids. - Doug S.
Quote:
> On Tue, 16 Jun 1998 20:06:01 +0200, "Dirk Djuga"
> >Just determine what is the max. number of buttons you will create, and
> >reserve a range of control IDs that is suitable.
> I have a solution. Since the parent always gets the messages, then I
> can trap OnCommand() and determine manually which button was pressed.
> This works perfectly if I use CDialog. But if I use CDialogBar, the
> button is disabled! How can I enable the button?