Solved

Cannot add new events to control

Posted on 2003-11-18
12
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
viewing source code from eclipse 13 111
wordcount challenge 11 164
Way to decrease size of apk file 9 132
How do I get Window Title of all opened process? 4 61
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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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