| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Removing a button control.
Hi,
I want to remove a button control from a dialog box ( I used the ClassWizard for that), but when I actually deleted the control from the Dialog source and run the program I got an error message referring to “Debug Assertion Failed”. Can anyone explain me how to remove the button control correctly? Thanks. P.S. The language is VC++. |
|
#2
|
|||
|
|||
|
A good way to delete the button control is to do it from the Resource tab view. Open the dialog in that view, click the control on the dialog you want to get rid of and press the delete button. You will also have to remove any reference to that button that you have in your code. So if you have a button and you created a member variable for it and then you used that member variable in your code you will have to manually remove that yourself. If that assertion is happening before the dialog appears take a look in OnInit(). Otherwise just start sticking breakpoints all over the place and step through the code until you hit the line that is causing the assertion.
|
|
#3
|
|||
|
|||
|
Thanks, It's working know. Just as you described, the member variable wasn't deleted.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Removing a button control. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|