CompuServe Messages

#CDialogBar ctls

    11-Jul-94 23:31:19
Sb: #CDialogBar ctls
Fm: Bruce McCarroll 76500,1210
To: sysop
I need help in enabling/disabling buttons on a dialog bar: In the header of class CMyFrame (derived from CMDIChildWnd) I define CDialogBar m_dlgBar; The dialog bar is created from a template in int CMyFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) In the view (derived from CScrollView and using CMyFrame) I try to control some buttons void CMyView::OnInitialUpdate() (and elsewhere in CMyView) { …… CDialogBar* pDB = &(((CMyFrame*)GetParentFrame())->m_dlgBar); // THIS NEXT EXPRESSION ADDS LABEL TO BUTTON OK pDB->SetDlgItemText( IDC_ADDSELECT, "Add Item"); // customize button // THIS NEXT EXPRESSION DOES *NOT* GRAY THE BUTTON (pDB->GetDlgItem( IDC_SORT))->EnableWindow( FALSE); …… CScrollView::OnInitialUpdate(); } I should appreciate any help. thanks, bruce