Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CMarkupStatic issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CMarkupStatic issue

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

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Topic: CMarkupStatic issue
    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
Back to Top
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 647
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post 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.


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.