Solved

getting CToolBarCtrl messages to a CDialog parent

Posted on 1998-08-27
1
374 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
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
Separate into files by filename 12 90
java ^ examples 8 69
post4 challenge 28 113
Thin secure Windows 10 5 107
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

680 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