CMFCButton won't work with BS_CHECKBOX or BS_AUTOCHECKBOX. RRS feed

  • Question

  • Hi!

    I have a MFC-project (using dialogs) and I want to display a dynamic checkbox on the dialog.

    I have the following code to create my checkbox:

    m_Button = new CMFCButton;
    int x = m_Button->Create(L"Testing",  WS_VISIBLE|BS_AUTOCHECKBOX, CRect(170, 100, 240, 150), this, 123);

    But it only shows a default button. If I change BS_AUTOCHECKBOX to BS_RADIO I get one of those menus with a green arrow (the one you get when a software has frozen and you can pick kill/wait).

    If I change the 'CMFCButton' to 'CButton' then it works - though the background is not transparent (this is why I'm  using CMFCButton, easier transparency).

    Am I using it wrong, or is this by design?


    Best regards,


    Friday, June 14, 2013 8:09 AM