Print Page | Close Window

ON_NOTIFY_EX not called with CXTPMDiframeWnd

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24400
Printed Date: 27 April 2024 at 5:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ON_NOTIFY_EX not called with CXTPMDiframeWnd
Posted By: Duane
Subject: ON_NOTIFY_EX not called with CXTPMDiframeWnd
Date 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?



Replies:
Posted By: Fredrik
Date 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


Posted By: agontarenko
Date 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


Posted By: Duane
Date 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.



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