I am a novice and I have an existing program that I am trying to edit. There is a dialog box that has several buttons that I needed to color. I found that I could easily create new buttons by inserting an activex control (Microsoft Form Command Button). After doing so I found that the buttons I changed would no longer enable and diable during program execution like they were supposed to. The orignal code had a member variable assigned to the button. That member variable was a CButton type. I deleted that member variable and put in one with the same name but a CCommandButton type. Originally the code called in a function called EnablePBs and the ran that through a code
void CR5KDlg::EnablePBs(BOOL bEnable)
int nCmdShow = SW_SHOW;
nCmdShow = SW_HIDE;
I have tried changing the code to m_btnname.SetEnabled(bEnable), but that just causes exception errors. I am not sure exactly what to do to make this work. PLease Help.