在MFC单文档加添加DialogBar,然后在DialogBar上添加按钮,会出现如下情况MFC DialogBar 按钮灰色不响应,单击无响应。

解决方案:

在 CSideDialogBar头文件和CPP文件里添加如下函数

afx_msg void OnUpdateButton(CCmdUI *pCmdUI);

ON_UPDATE_COMMAND_UI(IDC_BUTTON_PRINT_GEAR_PARA, OnUpdateButton)

void CSideDialogBar::OnUpdateButton(CCmdUI *pCmdUI)
{
pCmdUI->Enable(TRUE);

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-11-14
  • 2021-07-24
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2021-10-01
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案