Print Page | Close Window

CMarkupStatic issue

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=12059
Printed Date: 24 June 2025 at 2:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CMarkupStatic issue
Posted By: JerryEvans
Subject: CMarkupStatic issue
Date Posted: 03 September 2008 at 1:31pm
Let's ask again ...

Can anyone help?  I have a vanilla CStatic derived class as in the Markup Dialog sample.

I am registering a callback handler like this:

    m_wnd.AddHandler(CXTPMarkupHyperlink::m_pClickEvent,
        CreateMarkupClassDelegate(this, &CAppDlg::OnHyperlinkClick));

and SetMarkupText gets a string like this

"<TextBlock Foreground=\"#606060\">Riffster 2902. Version 2903 available at <Hyperlink>www.NovaDSP.com</Hyperlink></TextBlock>";

The link is displayed correctly but this is no cursor change and the callback is never made. What might I be doing wrong?

Thx



Replies:
Posted By: JerryEvans
Date Posted: 03 September 2008 at 2:06pm
OK - so I added the SS_NOTIFY style to the control on the dialog. Makes no difference although I see that removing it from the MarkupSample has an effect similiar to what I am seeing here.


Posted By: cpede
Date Posted: 04 September 2008 at 4:23am
I uses the CMarkupStatic found in one of the examples, and it includes code like this:
 
BOOL CMarkupStatic::OnWndMsg(UINT message, WPARAM wParam,
    LPARAM lParam, LRESULT* pResult)
{
 // To Handle Hyperlinks:
 if (m_pUIElement)
 {
   CXTPMarkupContext::m_hContextWnd = m_hWnd;
   if (CXTPMarkupContext::OnWndMsg(m_pUIElement, message,
       wParam, lParam, pResult))
   return TRUE;
 }
 return CStatic::OnWndMsg(message, wParam, lParam, pResult);
}
 
Maybe also add the Tag and Cursor attributes?
 
-cpede


Posted By: JerryEvans
Date Posted: 04 September 2008 at 8:19am
Thanks for the suggestion but I've tried all that. The problem is, I think, a bug in the parser code. I am trying to get a set of test cases that prove this.





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