CMarkupStatic crashes when mouse moves
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=12160
Printed Date: 14 September 2025 at 12:51pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CMarkupStatic crashes when mouse moves
Posted By: BerntK
Subject: CMarkupStatic crashes when mouse moves
Date Posted: 15 September 2008 at 11:26am
I use CMarkupStatic for displaying infotext for some records... When I move through the records by keypress I update the CMarkupStatic by SetMarkupText("some XAML") for every record.
Problem: If I move the mouse across the CMarkupStatic window - while scolling though the records - the application crashes at the function:
CXTPMarkupObject* CXTPMarkupObject::GetValue(CXTPMarkupDependencyProperty* pProperty)
were the passed pProperty is invalid.
Callstack:
ToolkitPro1202vc80D.dll!CXTPMarkupObject::GetValue(CXTPMarkupDependencyProperty * pProperty=0x032c8250) Zeile 701 + 0xe Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupStyle::GetBasedStyle() Zeile 154 + 0xe Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupInputElement::AddStyleTriggers(CXTPMarkupStyle * pStyle=0x032f7228, CXTPMarkupDependencyProperty * pProperty=0x032c8588, CXTPMarkupObject * pNewValue=0x032c8530) Zeile 480 + 0x8 Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupInputElement::FireTriggers(CXTPMarkupDependencyProperty * pProperty=0x032c8588, CXTPMarkupObject * pNewValue=0x032c8530) Zeile 563 + 0x17 Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupFrameworkElement::OnPropertyChanged(CXTPMarkupDependencyProperty * pProperty=0x032c8588, CXTPMarkupObject * pOldValue=0x032c8ef0, CXTPMarkupObject * pNewValue=0x032c8530) Zeile 411 C++ ToolkitPro1202vc80D.dll!CXTPMarkupTextBlock::OnPropertyChanged(CXTPMarkupDependencyProperty * pProperty=0x032c8588, CXTPMarkupObject * pOldValue=0x032c8ef0, CXTPMarkupObject * pNewValue=0x032c8530) Zeile 298 C++ ToolkitPro1202vc80D.dll!CXTPMarkupObject::SetValue(CXTPMarkupDependencyProperty * pProperty=0x032c8588, CXTPMarkupObject * pValue=0x00000000) Zeile 628 + 0x1b Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupInputElement::OnMouseLeave(CXTPMarkupMouseEventArgs * __formal=0x0012cf08) Zeile 266 C++ ToolkitPro1202vc80D.dll!CXTPMarkupContext::HandleMouseEnter(CXTPMarkupInputElement * pMouseOver=0x032f9298, CPoint point={...}) Zeile 465 + 0x1c Bytes C++ ToolkitPro1202vc80D.dll!CXTPMarkupContext::HandleMouseMove(CXTPMarkupUIElement * pUIElement=0x032d26d0, CPoint point={...}) Zeile 500 C++ ToolkitPro1202vc80D.dll!CXTPMarkupContext::OnWndMsg(CXTPMarkupUIElement * pUIElement=0x032d26d0, unsigned int message=512, unsigned int wParam=0, long lParam=11796582, long * pResult=0x0012d384) Zeile 672 C++ Toolsd.dll!CMarkupStatic::OnWndMsg(unsigned int message=512, unsigned int wParam=0, long lParam=11796582, long * pResult=0x0012d384) Zeile 79 + 0x28 Bytes C++
If I exclude CMarkupStatic::OnWndMsg() no crashes (but also no handling of hyperlinks,...)
I also tried the MarkUpSample. I added a OnTimer function to update the text of the CMarkupStatic periodically every 200ms. Everthing is fine except when I move the mouse across the control. After some moves the hyperlink does not show the mouseover and when exiting the program it asserts.
tx for help, Bernt
|
Replies:
Posted By: BerntK
Date Posted: 19 September 2008 at 3:20am
Hi,
Adding two lines to SetMarkupText("some XAML") methode solves the problem:
void CMarkupStatic::SetMarkupText(LPCSTR lpszMarkup) { MARKUP_RELEASE(m_pUIElement); MARKUP_RELEASE(m_pMouseOver); m_pActiveElement = NULL;
m_pUIElement = Parse(lpszMarkup);
if (m_hWnd) Invalidate(FALSE); }
|
Bernt
|
|