I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY?  
Author Message
Chris Lang





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

My project, which has moved forward through the VS IDE's from version 5 now has a problem using the wizards to add new functions variables, or windows events.

I "converted" the source files when I first opened the project in version 8 from version 7 and can successfully manually add the functions, message handlers and class members but it would be nice if the IDE worked the way it does with older versions, and with newer projects.

Is there some file I need to remove, or is there a setting that needs to be changed (similiar to deleting the old clw file to reset the class wizard).

Thanks Chris



Visual C++11  
 
 
Bite Qiu - MSFT





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

Hi, CHris

I had the same feeling and confusion when i starting to use new VS 2003 IDE, but when you figure out how to perform the same thing, like message handlers, in new IDE, you will find it is much convenient than before, you only need to do the following steps:

1. press "alt+enter" to open the properties window.

2. click on a class which you want to add "something" in the class view

3. In the toolbar of properties window, you will find some buttons like "Events", "Messages", "Overrides"

4. simply click one of them, you will understand what to do next :)

Thanks

Bite



 
 
Chris Lang





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

Bite,

Duh!!!, What about when that DOESN'T work.

When I do what you (and the Microsoft documentation states) I get an error message that says the file is read-only. Which is incorrect and actaully inconsistent with the rest of the application. When you open a read-only file there is a "lock" icon associated with it. None of my windows show a lock icon and furthermore I'm able to edit the file just fine.

I can manuall add the messages, functions, variables etc. the the code files but it would be nice if the VS worked as documented for this particular project.

Note that other projects work fine which is why I'm convivced that there is a setting that is not correct and trying to guess that that is, is nearly impossible, which is why I posted the question here in hopes that someone from Microsoft would acatully take the time to look into their own code and find out why it isn't working.

Is there a file size limit (32k for cpp files )

Is there some functionality or delcares that were added in by a previous version of VS that are inconsistent with VS 2005 and need to be removed

Is there a specific formatting for the header or cpp file that is required for the wizards to work

Chris


 
 
Bite Qiu - MSFT





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

chris,

Are your files checked-in to a source management system such as microsoft sourcesafe cuz they are read-only untill they are checked-out. if this doesn't work either, i think the more appropriate place for your question is probably the MFC newsgroup:http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.mfc&lang=en&cr=US

Bite



 
 
Brian Kramer





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

Chris, I'm not a wizards-user and I'm fearing that the information you're giving isn't going to ring any bells, so I do want to make a suggestion that might help get closer to resolving this.  See if you can create a machine-independent reproduction of the bug (try a coworker's machine with a new project but with same source code), then create a bug report in the Microsoft Connect website.  Maybe Ayman or Bite can expedite the assignment of the bug to someone in the Visual Studio group who can take a closer look at the problem.  From this you can find out how severe the problem is, what sort of workaround might exist, and--when it leads to a subsequent bug fix--lets you take part in improving the next release of VS.
 
 
Chris Lang





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

Brian,

I assumed that this problem would not be new, but perhaps it is. Right now I have to finish the project and so don't have the time to do much trouble shooting.

Once this project is finished, I will do what you recommend and forward it to the bug report web site. Right now I can only tell you that is seems to be a function of file size. In some classes, the wizard still work. In others it doesn't. Furthermore in the classes that it doesn't work when double clicking on a method of the class in the Class View window always goes to the declaration and not the defination. Also, in the classes that the wizard does work, it is really slow (like 30 seconds sometimes from the time I click OK to add the new function/method, to actaully returning control to me). And this slowness is also only related to projects that have been "moved forward" from existing VS versions.

I personally hate bugs and glitches in my own programs and know that finding them sometime takes work on the part of the user experiencing the problem. So I will follow up with this because it is exactly what I would expect my own users to do for me if the situation were reversed.

Chris


 
 
Simple Samples





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

Does the problem still exist

I think one possible cause is when a project is open twice at the same time. When a project is currently open more than one time, some related files, such as intellisense, are read-only for the additional session(s). If that is the cause, then it would help for VS to be more clear about the problem.



 
 
Chris Lang





PostPosted: Visual C++ General, I'm unable to add windows message events or new functions/variables with the IDE using the wizard... WHY? Top

The problem was a corrupted *.ncb file. I closed the solution, renamed the *.ncb file to *.ncb1 and reopened the ncb file. At this point all the intellisense and the ability to add functions, members, and methods to my classes all seems to work.

One thing to note is that the size of the ncb file was reduced from 30M to 6M when it was recreated.