On the color filter button click handler, add code to show the color filter dialog as modal; then on the OK button click handler of your color filter dialog call
EndDialog(IDOK)
, and back on the filter button click handler show the modiied bitmap:
class CFilterDialog
{
public:
int m_iSelection;
protected:
void DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Radio(pDX, IDC_FIRST_RADIO_IN_TAB_ORDER, m_iSelection);
}
virtual void OnOK()
{
UpdateData(TRUE); if (m_iSelection >= 0) EndDialog(IDOK); }
};
void CColorAnalyser::OnColorFilterButtonClick()
{
CFilterDialog dlg(this);
dlg.m_iSelection = 0;
if (dlg.DoModal() == IDOK)
{
switch (dlg.m_iSelection)
{
case 0:
break;
case 1:
break;
...
}
}
}