Solved

Cannot add new events to control

Posted on 2003-11-18
12
179 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
12 Comments
 
LVL 44

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 44

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
 
LVL 44

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 44

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
Expand LInux Boot partition remotly 3 86
sum67 challenge 35 93
tripleUp challenge 7 74
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now