Solved

getting CToolBarCtrl messages to a CDialog parent

Posted on 1998-08-27
1
362 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

7 Experts available now in Live!

Get 1:1 Help Now