Unexpected skipping in DCBROWSE

This forum is for eXpress++ general support.
Post Reply
Message
Author
Piotr D
Posts: 131
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Unexpected skipping in DCBROWSE

#1 Post by Piotr D »

Hi,
three of my customer have reporting an unexpected situation:
when a DBF/NTX file was displayed with DCBROWSE and an pushbutton with for example edit function was pressed,
this function was realized not on (displayed) record, but he was see as a browse pointer is skipped 2 or 4 records
and function worked on this new position. Have you observe situation like these?

Piotr

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Unexpected skipping in DCBROWSE

#2 Post by rdonnay »

I would need to see your code.
There must either be a flaw in the code or a possibly bad index.
The eXpress train is coming - and it has more cars.

Piotr D
Posts: 131
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: Unexpected skipping in DCBROWSE

#3 Post by Piotr D »

Roger,
I will send you later sample code. But for me this behavior looks like it was skipping after mouse wheel (and the wheel was not used).
I have more than 500 installation of this program, and only 3 customer reported for me this.
Piotr

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Unexpected skipping in DCBROWSE

#4 Post by Cliff Wiernik »

We had something 5-6 years ago where the scroll on the mouse caused the line to jump 3 lines each time instead of 1 line. I don't know what specifically we did to address it.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Unexpected skipping in DCBROWSE

#5 Post by Auge_Ohr »

Cliff Wiernik wrote:We had something 5-6 years ago where the scroll on the mouse caused the line to jump 3 lines each time instead of 1 line. I don't know what specifically we did to address it.
3 lines are default for Windows OS()

you can Set/Get Mouse scroll lines with this Code

Code: Select all

#include "DLL.ch"
#define SPI_GETWHEELSCROLLLINES   104
#define SPI_SETWHEELSCROLLLINES   105

DLLFUNCTION SystemParametersInfoA( nAction, nParam1, @Param2, nWinIni ) USING STDCALL FROM USER32.DLL

PROCEDURE main
LOCAL nScrollLines := 0

   SystemParametersInfoA(SPI_GETWHEELSCROLLLINES, 0, @nScrollLines, 0)
   ? nScrollLines

   WAIT
RETURN
greetings by OHR
Jimmy

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Unexpected skipping in DCBROWSE

#6 Post by Cliff Wiernik »

Found my code:

Code: Select all

  
  IF version(3) > '349'  
    DC_ReadGuiHandler({|a,b,c,d,e,f| LB_DefaultHandler(a,b,c,d,e,f)})  
  ENDIF
and

Code: Select all

*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
*+    Function LB_defaultHandler(nEvent, mp1, mp2, oXbp, oDlg)  
*+
*+      Default Handler to change the browse scrolling from the wheel to 1 row instead of 3 rows at a time
*+
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
FUNCTION LB_DefaultHandler(nEvent, mp1, mp2, oXbp, oDlg)  
  IF nEvent == xbeM_Wheel .AND. oXbp:IsDerivedFrom('XbpBrowse')
    mp2[2] := mp2[2]/3
    oXbp:handleEvent(nEvent, mp1, mp2)
    RETURN DCGUI_IGNORE
  ENDIF
  
  RETURN DCGUI_NONE

Post Reply