Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cannot add new events to control

Posted on 2003-11-18
12
Medium Priority
?
198 Views
Last Modified: 2013-11-20
Dear All,

when i open the dialog editor and try to add new events to a control it just does not work. the caption "Events..." in the context menu does not activate. even when i want to follow up an already existing event by double klicking the control, this does not work.

where could the problem be?

does anybody have a clue how this error can happen?

Thanks a lot for your help!

Lorenz
 



 
 
0
Comment
Question by:lorenzociripenso
10 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9769927
One possibility is that you have a workspace with multiple projects in it.  The wizard only seems to work (by me - VC++ 6) with the currently active project.  If the dialog is in another project then you would need the setactiveproject command in the class view to switch projects.
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9769931
Alternatively delete the clw file for the project.  Class wizard will recreate it for you when you use it.
0
 

Author Comment

by:lorenzociripenso
ID: 9770176
Thank you, but i couldn't solve the problem with your advice.

I'using VC++ 6.0 as well.
I have just one project in my workspace.
I deleted and recreated the clw file just before, because I had a similar occurency as Sanad78 in http://beta.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20704682.html

I think it could be related to my resource.h file, which is quite messy. Is there a way to rebuild it?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9770434
I can't believe a messy resource.h would cause this problem.  If by rebuild you mean renumber I don't know of any way apart from by hand.

Try the rebuild all option in the build menu.  Maybe it will help.

If you have many ID's not used there is a command 'Resource Symbols' that will show you all the ID's defined in the resource.h and where they are used.  You can then select the unused ones and delete them form that utility.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9773457
If deleting the clw file does not help, you may have to remove all VS created files (ncb opt plg) to clean up your project. I have to do this every now and then so that Visual Studio "plays nice" again.

I use a bunch of Perl scripts to clean up and renumber my resource.h files if they get too messy.
0
 

Author Comment

by:lorenzociripenso
ID: 9776236
I did not yet mention that i have about 200 controls one single dialog. is it possible that this is to much for my little VC++? Is there a limit in putting controls in a dialog?
0
 

Author Comment

by:lorenzociripenso
ID: 9776259
By deleting the (.ncb .opt .plg) files i get an error and I have to restore them to get my program to the previous state.

It is also quite strange that the events handler works in other dialogs. that makes me realy think that I have overloaded my dialog.

I have about 90 event handlers in there. that shouldn't be too much!?

0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9776805
I don't know of any limit to the number of controls on a dialog.  However with a large number of controls it just gets confusing for the user (Property sheet + pages more suitable?).

In your .h file for that dialog are all the event handlers together such as

      // Generated message map functions
      //{{AFX_MSG(CxxxDlg)
      afx_msg void OnClose();
      afx_msg void OnBtnNew();
      afx_msg void OnUpdateBtnNew(CCmdUI* pCmdUI);
      afx_msg void OnBtnSave();
      afx_msg void OnUpdateBtnSave(CCmdUI* pCmdUI);
      //}}AFX_MSG
0
 

Author Comment

by:lorenzociripenso
ID: 9777563
OK, people. I didn't manage to resolve the problem. I startet from my latest version and applied all my new changes to that one step by step. Now it works.

I don't know what was the problem with the other one, but for shure there was something wrong with the ClassWizard...

Thank You all for your Help!

And nice greetings from Thailand!

Lorenz
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 11984780
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question