|
-
July 26th, 1999, 09:00 PM
#1
enable button
Hello,
I have a SDI with a form. The form has a button on it which creates a modeless dialog when it is clicked.
After the user click on it I disabled the button. I would like to enable it when the user closes the dialog, but I can't make it work. My code is as follows:
I created a friend function of CView called EnableButtons and a CButton variable called mybutton. Then I am calling the function from the dialog. Until then everything works.
The code inside EnableButtons is:
CTestView* pButton;
pButton = new CTestView();
pButton->mybutton.EnableWindow(TRUE);
Then it compiles perfectly but when I click on the dialog button I get an error:
Debug Assertion Failed!
Could anybody please help me? Thanks,
Marcelo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|