Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All :)

I've done some search but all I got was a forum post that was hanging there unanswered since 2003! :D

So here is the problem: When I open some dialog resource and try to Add Event Handler... to some button or something the Event Handler Wizard dialog has all its fields empty and when I click in the empty Message type: combobox I get this error message:

An error has occurred in the script on this page.

Line: 392
Char: 2
Error: Type Missmach
Code: 0
URL: file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%20.NET%202003/Vc7/VCWizards/CommandWiz/HTML/1033/default.htm

Also the menu item Add Variable... that allows you to add control vars is greyed.

I can still add the event handler manually but that's not the point!
I don't wnat to hold my breath every time I edit the project's resources because the editor may get buged like this.
This problem annoys me from time to time so I'll be very grateful if somebody provides me with a solution :)

Thanks a lot in advance!
Posted
Comments
Uwe Keim 14-Sep-10 15:00pm    
Are you talking about C++/MFC?
Ivan Ivanov 83 14-Sep-10 15:03pm    
Yes, exactly! :)
Ivan Ivanov 83 15-Sep-10 9:16am    
The VS got seriously buged!!!
Now I found out that it won't create class for my new dialog resource. It doesn't create the h/cpp files, it does nothing.

If you have a solution please write soon! :)

1 solution

Typically the studio wizards will add certain text to keep track of what it's added (usually comments), if you get rid of the text or mess with it, the wizards will act really weird. Make sure you don't mess with that. On the other hand however, you can do everything without the wizards and you should learn to do everything outside of the wizards anyway since that'll mean you understand the code and can troubleshoot/fix any problem regardless of how the code was generated.
 
Share this answer
 
Comments
Ivan Ivanov 83 5-Jul-11 14:04pm    
Thank you very much! I finally know what the problem was. I indeed like to rearrange my code and usually do remove the generated comments. Interestingly I do that all the time and yet I get the bug only occasionally... Anyway your answer makes perfect sense so that must be it. :)

Now the second point you made is important too. I do know how to do everything without the wizards and I do understand the code ;), my point was (and is) that if those wizars are there they sould work. It's not a problem to add a single class or an event handler, or a control variable, but if you have to add dozens of them (and more) it slows down the work, and it shifts your atention from the real prblems... (And besides once you get used to the wizards it's really annoying without them :D)

Thanks a lot again :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900