Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPToolBar in dialogs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPToolBar in dialogs

 Post Reply Post Reply
Author
Message
andy_t View Drop Down
Newbie
Newbie


Joined: 19 October 2004
Location: Norway
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote andy_t Quote  Post ReplyReply Direct Link To This Post Topic: CXTPToolBar in dialogs
    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

Back to Top
Agent 007 View Drop Down
Newbie
Newbie
Avatar

Joined: 08 April 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Agent 007 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.