Little bug: Events dont fires if the control has no focus!

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Little bug: Events dont fires if the control has no focus!

Post by Dorwol »

Hello,

The "OnEvent"-Events does not work, if the viewer-control has no focus.

Typical situation is: The user has the application-focus to any control (e.g. a command-button) and scrolls the pages with the mouse-wheel (!) - In this situation the viewer-control has NO Focus but the pages will scroll and the event "...Pages.Current" will not fires. So I don't know if the current page has changed! :(
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Little bug: Events dont fires if the control has no focus!

Post by Corwin - Tracker Sup »

I'm afraid that we cannot reproduce such problem here...
Can you describe step by step how this behaviour can be reproduced? Little demo app will be very helpful...
The user has the application-focus to any control
Do you mean any control "outside" Viewer ActiveX? If so, then this is very strange - in such case Viewer should not receive any messages, and should not react on mouse wheel scrolling...
Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Re: Little bug: Events dont fires if the control has no focus!

Post by Dorwol »

Little demo app will be very helpful...
No Prob, please see the attached m0vie!

For this m0vie I use your example "GoToPage" withe the following changing:

Code: Select all

Private Sub CoPDFXCview1_OnEvent(ByVal nType As Long, ByVal Name As String, ByVal DataIn As Variant, DataOut As Variant, ByVal Flags As Long)
On Error Resume Next
Dim vDataOut As Variant
CoPDFXCview1.GetDocumentProperty 0, "Pages.Current", vDataOut, PXCVA_Flags.PXCVA_GetNamed
Text1.Text = vDataOut + 1
End Sub
You do not have the required permissions to view the files attached to this post.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Little bug: Events dont fires if the control has no focus!

Post by Corwin - Tracker Sup »

Thanks for the m0vie (nice work!).
For now we are thinking that problem is in specific mouse drivers which send mouse wheel messages even to inactive windows. And that causes a problem - the ActiveX control cannot fire events under such circumstances.

The only fix we can do is to ignore mouse wheel messages when the Viewer ActiveX has no focus.

This fix will be available in new build due next week.
Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Re: Little bug: Events dont fires if the control has no focus!

Post by Dorwol »

The only fix we can do is to ignore mouse wheel messages when Viewer ActiveX has no focus. This fix will be available in new build.
Oh yes, that's good Idea! THX!