I have created a group of four radio buttons from a class derived from CButton. While creating, I am setting the styles as "WS_CHILD | WS_VISIBLE | WS_TABSTOP |BS_OWNERDRAW | BS_AUTORADIOBUTTON | WS_GROUP" for first radio and for rest i am setting "WS_CHILD | WS_VISIBLE | WS_TABSTOP |BS_OWNERDRAW | BS_AUTORADIOBUTTON"
I have overridden the DrawItem function in the button class, but when the program is executed the buttons are drawn, but i can not select any button, they are not getting selected at all.
this is the codeline i am using
DrawFrameControl(&rect, DFC_BUTTON,DFCS_BUTTONRADIO | ((lpDrawItemStruct->itemState & ODS_SELECTED)?DFCS_CHECKED : 0));
Please tell me if i am missing anything.