gregston
gregston

Reputation: 147

CMFCColorDialog not working in MFC Property Page as Release, OK as Debug

The title pretty much explains it. Here's the function to display the ColorDialog when a button is clicked:

void 
CMyPP::OnBnClickedButtonCol()
{
    CMFCColorDialog dlg(m_text_colour);

    if (dlg.DoModal() == IDOK) 
    { 
        m_text_colour = dlg.GetColor(); 
    }
} 

In the release build nothing happens when the button is clicked. I can't see any difference in the VS 2008 options between debug and release to explain it. I think CMFCColorDialog is from the MFC feature pack but the rest of the program is basic MFC - could that explain it? Thanks

Upvotes: 1

Views: 335

Answers (1)

gregston
gregston

Reputation: 147

Sorry, I missed out a crucial piece of information, in that the Debug version was using mfc in a shared dll while the release was static. Then I found this solution which has worked for me: https://social.msdn.microsoft.com/Forums/en-US/7245ee72-ffd5-4167-b690-c2edc10fb88e/static-link-fails-with-vs2008-mfc-feature-pack . Thanks for your help.

Upvotes: 1

Related Questions