Solved

getting CToolBarCtrl messages to a CDialog parent

Posted on 1998-08-27
1
375 Views
Last Modified: 2013-11-20
I have added a CToolBarCtrl to a dialog box.
How do I notify the dialog when a button has
been pressed on the CToolBarCtrl?

Thanks.

-Eric
0
Comment
Question by:nielsew
[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 2

Accepted Solution

by:
milenvk earned 50 total points
ID: 1321388
When a button is pressed the toolbar control generates a WM_COMMAND message with ID set to the ID of the pressed button. You can handle the WM_COMMAND messages in your dialog (which appears to be the parrent of the toolbar control). By the way it is preferable if you use CDialogBar instead of CToolBarCtrl in MFC dialogs.

0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 172
ODBC Connection Logging, ADO.NET 6 73
mapBully challenge 6 200
Excel file not created as expected 7 110
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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Suggested Courses

739 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