
Dynamically Created Checkbox Button Does Not Appear on Dialog
Dynamically Created Checkbox Button Does Not Appear on Dialog
I am trying to dynamically create a Button (checkbox) on a dialog, but it is
not appearing when I run the application and bring it up.
Here is my code in the OnInitDialog () method of my dialog:
CRect rect = CRect(7,7,130,10);
CButton button;
button.Create(
"Test",
WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | WS_TABSTOP,
rect,
this,
3001);
Anyone with an idea for me? Thank you.