|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Krzysztof Janik
|
Dec 8, 2010 - 3:49 AM
|
Hi, I would like to use in my control view which inherits from CextRichContentScrollWnd.
One of the functionality is to handling user events eg. click on active (link) object in view.
From documentation it looks like I should only implement in my Class, which inherits from CextRichContentScrollWnd, method RciEvent_OnClick. Additional my class is calling in OnCreate RcsModifyStyle(__EXT_RCS_EVENTS_MOUSE_WND_PROC). But my virtual function OnClick is not called.
Could you please tell me what I have to do for handle operator events. BR
|
|
Krzysztof Janik
|
Dec 10, 2010 - 4:21 AM
|
I made my class derived from CextRichGenWnd and method RciEvent_OnClick is still not invoked.
It could be quite big help to have any of sample using reload virtual methods of CextRichContentEvents. Could you give any? Because I did not find any in samples given in install pack of ProfUis.
|
|
Technical Support
|
Dec 20, 2010 - 8:25 AM
|
|
|
Krzysztof Janik
|
Dec 29, 2010 - 8:09 AM
|
I have fond a bug associated with handling operator events.
in your example is enough a little modify html document eg. like that:
strHTML = _T("<html><style> ")
_T("my1st { display:inline-block; border: 2px outset grey; background-color:grey; padding:2px; font-weight:bold; ")
_T(" ui-can-be-hover:yes; ui-can-be-pressed:yes; ui-can-be-focus:yes; } ")
_T("my1st:hover { text-decoration:underline; border: 2px outset lightgrey; background-color:lightgrey; } ")
_T("my1st:pressed { border: 2px inset grey; } ")
_T("</style>")
_T("<i>We have some text here ... and we have some <br>")
_T("<my1st id=\"one\">clickable (one,my1st)</my1st> element. We also have other <br>")
_T("*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>")
_T("<my1st id=\"two\">clickable (two,my1st)</my1st> element here. This is another <br>")
_T("<my1st id=\"third\">clickable (third,my1st)</my1st> element. <br>"); and click for buttons two and third will not to be handled.
Problem is in file extscrollwnd.cpp line 9472
"if( m_nVkPressed == nChar && pRCI_LastSupportingPressed != NULL && pRCI_LastSupportingPressed->CalcEffectiveRect().PtInRect( point ) )"
the last conditional element will return false.
point is not mowed with scroll vector.
Could You please check and correct the problem.
|
|
Krzysztof Janik
|
Dec 22, 2010 - 7:00 AM
|
Thank you for the sample. It has given me ability to check what my problem is.
In my opinion it doesn’t work how one can expected. Because it is not enough to reload virtual method and check what kind of item was clicked. To have handled "operator events" in the control derived from CextRichGenWnd is needed to add to html content (document or css) style (eg. a:pressed { }). What puts requirement to write document in special way. Please tell me if I am wrong?
|
|
Technical Support
|
Dec 22, 2010 - 9:01 AM
|
You should write HTML in a special way if you need to create a funny UI like the backstage view in a ribbon bar. You should write classic HTML if you need classic elements like hyperlinks. If you need to handle clicks of more than one element of one type, your elements should have some unique tag parameters. We used ID. You can use NAME or any non-standard tags. I.e. you heed to code some HTML if you want to see something. We provided a simple sample app which explicitly specifies HTML. The ribbon bar’s backstage view control does approximately the same, but it generates HTML on the fly using HTREEITEM based tree data structure describing the logical structure of the backstage view. Please provide us with more details about your task.
|
|
Technical Support
|
Dec 9, 2010 - 11:17 AM
|
You can override the CExtRichContentScrollWnd::OnRcsAnalyzeMouseClickEvent() virtual method to handle any mouse click. You should override the CExtRichGenWnd::RciEvent_OnClick() virtual method to handle click on HTML elements. If the last method is not invoked then you have not loaded HTML into the CExtRichContentScrollWnd control or its window is disabled.
|
|
Krzysztof Janik
|
Dec 14, 2010 - 3:19 AM
|
I made my class derived from CextRichGenWnd and method RciEvent_OnClick is still not invoked.
It could be quite big help to have any of sample using reload virtual methods of CextRichContentEvents. Could you give any? Because I did not find any in samples given in install pack of ProfUis.
|
|