Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Resources vs Classes

Posted on 2000-04-14
8
Medium Priority
?
205 Views
Last Modified: 2013-11-20
When a new secondary resource is added, like Menu, Toolbar etc., ClassWizard asks which class to belong this resource to. Whatever I answer, I can see the IDs of that resource in every classes in the ClassWizard. So, what does it matter which class "owns" the resource? And what happens if I add to different functions to respond to the same ID in two different classes?
0
Comment
Question by:Lescha
[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
  • 4
  • 3
8 Comments
 
LVL 3

Expert Comment

by:ghimireniraj
ID: 2715896
Mainframe class

You can also write handlers to them in the view class or classes.

If multiple views are present and you write handler to one view this is unavailable for all the other views.

but if it is in mainframe it is always available whatever view is active through the mainframe class
0
 
LVL 1

Author Comment

by:Lescha
ID: 2715935
Sorry... could you clarify yourself a bit? I didn't quite get the answer. ;-(

And I didn't talk just about SDI/MDI, I was talking in general!
0
 

Expert Comment

by:ch52jb
ID: 2716430
The reason that a resource is 'owned by a class' is so that class becomes the default for member variables and events that are assigned.  However you can assign events and the like to any class.  If you assign different events to the same id, then the first one to get the message handles it.  For example, all dialogs use a button click event frmo IDOK to ok the dialog.  If Dialog1 opens Dialog2 modally, clicking on the OK button sends a button click message with the ID IDOK to the topmost window, so dialog2 handles it, even though dialog1 also has a handler for the same event.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:Lescha
ID: 2717214
Yes, but what happens if I have to unmodal dialogs... oh, I get it. You mean, the one that has the function AND the focus handles the message?
0
 
LVL 1

Author Comment

by:Lescha
ID: 2717227
..I meant, "TWO unmodal dialogs", of course! ;)
0
 

Expert Comment

by:ch52jb
ID: 2721790
Yes, the way windows works is when it posts a message, the window with the highest z order (i.e. the one with focus) gets the message first, then it gets passed down the z order.  If the topmost window has the correct handler then it will process the message.  If not, it posts it on to the next window.  In the case of events like button clicks, the window in focus will get the event, whether it is modal or unmodal.
0
 
LVL 1

Author Comment

by:Lescha
ID: 2724012
uh-huh... thanks, "ch52jb". Please lock the answer.
0
 

Accepted Solution

by:
ch52jb earned 80 total points
ID: 2725633
Tis locked.
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

610 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