How to Display Radio button dynamically on Dialog.
-
Hi, I have written following code in my MFC code to display Radio Button on my dialog.
CButton myButton;
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(50,40,80,70),this, 1);But Dialog is not showing Radio button.Can anyone help me.
-
Hi, I have written following code in my MFC code to display Radio Button on my dialog.
CButton myButton;
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(50,40,80,70),this, 1);But Dialog is not showing Radio button.Can anyone help me.
-
Hi, I have written following code in my MFC code to display Radio Button on my dialog.
CButton myButton;
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(50,40,80,70),this, 1);But Dialog is not showing Radio button.Can anyone help me.
What function is this code in? My guess would be that myButton is going out of scope and being destroyed just after it's been created.
-
What function is this code in? My guess would be that myButton is going out of scope and being destroyed just after it's been created.
Thanks for your reply.Previously myButton is local variable in OnInitDialog function. I have changed it to member variable and I have allocated memory.It is working fine and it is displaying Radio Button. I have changed this to Push Button. I need to add Event Handler to this Button.Can any one help me.
modified on Thursday, March 26, 2009 12:17 AM
-
Thanks for your reply.Previously myButton is local variable in OnInitDialog function. I have changed it to member variable and I have allocated memory.It is working fine and it is displaying Radio Button. I have changed this to Push Button. I need to add Event Handler to this Button.Can any one help me.
modified on Thursday, March 26, 2009 12:17 AM