How can you activate the xbeM_Wheel in a DCDIALOG

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 466
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

How can you activate the xbeM_Wheel in a DCDIALOG

#1 Post by digitsoft »

Hi Roger
How can you activate the xbeM_Wheel in a DCDIALOG
Nolberto Paulino
Regards

User avatar
Tom
Posts: 1253
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: How can you activate the xbeM_Wheel in a DCDIALOG

#2 Post by Tom »

Hi, Nolberto.

If you want to deal with wheel events besides what's happening automatically (scroll bars, tables), catch "xbeM_Wheel" in a custom handler (use HANDLER or HANDLERBLOCK, look at the docs for DCREADGUI) and find out whether the mouse pointer is above the control you want to behave depending on the wheel.

Code: Select all

FUNCTION MyHandler(nEvent, mp1, mp2, oXbp, ..., oMyObject)
LOCAL nMove
DO CASE
  CASE nEvent = xbeM_Wheel .AND. MousePointsOn(oMyObject)
  * mp2[2] tells you the count of lines the wheel sends, number can be negative (lines up)
  oMyObject:SetSize/SetPos/DoWhatEver 
...
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Wolfgang Ciriack
Posts: 488
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: How can you activate the xbeM_Wheel in a DCDIALOG

#3 Post by Wolfgang Ciriack »

if you are using XBase++ 1.9 you have to disable "scrolling of inactive windows, if the cursor is over it" in the windows mouse scrolling settings.
_______________________
Best Regards
Wolfgang

User avatar
digitsoft
Posts: 466
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How can you activate the xbeM_Wheel in a DCDIALOG

#4 Post by digitsoft »

Hello Tom
The cursor moves with the wheel, but I want to know how to position myself at the top of the screen if I use the test to see more data that is hidden below.

Tom wrote: Sat Mar 08, 2025 1:50 am Hi, Nolberto.

If you want to deal with wheel events besides what's happening automatically (scroll bars, tables), catch "xbeM_Wheel" in a custom handler (use HANDLER or HANDLERBLOCK, look at the docs for DCREADGUI) and find out whether the mouse pointer is above the control you want to behave depending on the wheel.

Code: Select all

FUNCTION MyHandler(nEvent, mp1, mp2, oXbp, ..., oMyObject)
LOCAL nMove
DO CASE
  CASE nEvent = xbeM_Wheel .AND. MousePointsOn(oMyObject)
  * mp2[2] tells you the count of lines the wheel sends, number can be negative (lines up)
  oMyObject:SetSize/SetPos/DoWhatEver 
...
Nolberto Paulino
Regards

Post Reply