Print Page | Close Window

CXTPToolBar in dialogs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1889
Printed Date: 05 March 2025 at 10:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPToolBar in dialogs
Posted By: andy_t
Subject: CXTPToolBar in dialogs
Date Posted: 02 March 2005 at 10:09am

Hi all,

Is anyone using CXTPToolBars in dialogs or this not recommended? The problem is that the toolbar is not receiving ui update messages. I can get around this by calling

SendMessageToDescendants(WM_IDLEUPDATECMDUI);

in OnTimer(), but is there a better place to call this or another way of doing it all together?

Should I be using MFC toolbars instead?

thanks for any help,
Andy




Replies:
Posted By: Agent 007
Date Posted: 08 April 2005 at 10:34am

Add the following member function declaration to the dialog class
declaration file.

afx_msg LRESULT OnKickIdle(WPARAM wp, LPARAM lCount);

Add the following member function definition to the dialog class definition file.

LRESULT CDialogSampleDlg::OnKickIdle(WPARAM, LPARAM)
{
    SendMessageToDescendants(WM_IDLEUPDATECMDUI);
    return 0;
}

Add the following macro to the message map section in the dialog class definition file.

ON_MESSAGE(WM_KICKIDLE, OnKickIdle)

Also, see the sample: Command Bars, DialogSample




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net