Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ON_NOTIFY_EX not called with CXTPMDiframeWnd
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ON_NOTIFY_EX not called with CXTPMDiframeWnd

 Post Reply Post Reply
Author
Message
Duane View Drop Down
Groupie
Groupie
Avatar

Joined: 16 May 2023
Location: Montreal
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Duane Quote  Post ReplyReply Direct Link To This Post Topic: ON_NOTIFY_EX not called with CXTPMDiframeWnd
    Posted: 01 June 2023 at 10:39am
Using Codejock ToolkitPro22.1 with the Ribbon sample.  I'm trying to set the tooltips for a command bar acting as a toolbar as well as a ribbon.  In our MFC project we use ON_NOTIFY_EX() but this doesn't seem to be called here.  I've also tried ON_NOTIFY_EX_RANGE

Is this supported?  Is there a way to directly set the tooltip by setting the prompt programmatically?
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2023 at 1:06pm
Use the update handler instead:


BEGIN_MESSAGE_MAP(MyClass, MySubClass)
   ON_UPDATE_COMMAND_UI(ID_MY_ID, OnUpdateMyCommand)
END_MESSAGE_MAP()

void MyClass::OnUpdateMyCommand(CCmdUI* pCmdUI)
{
   if (const auto pControl = CXTPControl::FromUI(pCmdUI))
   {
      pControl->SetTooltip(L"My new tootip);
   }
}
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 299
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2023 at 4:21am
Hello,

Unfortunately it is not clear what exactly is going wrong. Can you please provide more detailed information.

Regards,
Artem Gontarenko
Back to Top
Duane View Drop Down
Groupie
Groupie
Avatar

Joined: 16 May 2023
Location: Montreal
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Duane Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2023 at 10:43am
Sorry it wasn't clear.  Updating an MFC project with Codejock.

I was trying to use:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnTooltipHandler)

to set the toolbar tooltips dynamically as we do in the original MFC project.  But this event wasn't firing.
I was able to set them directly on the toolbar buttons with CJ so it was not an issue.
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.250 seconds.