[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Menu in a TDialog object (Borland C++ v4.5)

Posted on 1997-03-10
1
Medium Priority
?
325 Views
Last Modified: 2008-03-10
I have with Borland C++ 4.5 Resource workshop defined a dialogbox and included a menu in the dialog.

From my TDialog object do I want to act on the menu selections (the menu is showed automatic)

How can in the TDialog object catch when a menu item is selected/activated.

What must the response tabel contain ?

Must I do more than define a response tabel ?
E.g. any init of the menu ? Or connecting the menu to the Dialog.


Now my response table contain this:

DEFINE_RESPONSE_TABLE1(T_DC_createDataDialog, TDialog)
  EV_COMMAND(IDM_EN_OPEN, SelectTDEfile),
// IDM_EN_OPEN = the menu item.
// SelectTDEfile = the function.
END_RESPONSE_TABLE;


I hope it makes sense.
0
Comment
Question by:tovergaard
[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
1 Comment
 
LVL 3

Accepted Solution

by:
gaohong earned 200 total points
ID: 1162140
Hi,

Must I do more than define a response tabel ?  Yes
   
E.g. any init of the menu ? yes or no
yes. If you are not using OWL function to do what you want
for instance. To define a pop up menu for a particular window
you need construct  a TPopupMenu and appen your menu items.
Or connecting the menu to the Dialog.  

No. TDialog (TWindow) has done menu init for you.

So you only need to define your response table and command
handler in your dialog class like:


  DEFINE_RESPONSE_TABLE1(T_DC_createDataDialog, TDialog)
         EV_COMMAND(IDM_EN_OPEN, SelectTDEfile),
         EV_COMMAND_ENABLE(IDM_EN_OPEN, SelectTDEfileEnable),
         ...
  END_RESPONSE_TABLE;

Good luck

gaohong xie
0

Featured Post

Industry Leaders: 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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

656 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