Solved

getting CToolBarCtrl messages to a CDialog parent

Posted on 1998-08-27
1
369 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 109
Named range not carried over 10 62
Problem to open Excel file 15 99
JQuery serialize and unserialize 8 52
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now