Solved

getting CToolBarCtrl messages to a CDialog parent

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
mapBully challenge 6 134
Detect file exist or not 3 157
Making an alias 7 95
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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 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