Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2002.08.05;
Скачать: [xml.tar.bz2];

Вниз

Мышиное колесо   Найти похожие ветки 

 
ZEE   (2002-05-25 01:37) [0]

Подскажите, плз, какие месаджи надо ловить, чтобы прога реагировала на прокрутку колесика у мыши (Wheel).


 
Anatoly Podgoretsky   (2002-05-25 01:44) [1]

WM_MOUSEWHEEL


 
SPeller   (2002-05-25 02:28) [2]

По-моему у формы есть событие OnMouseWheel


 
ZEE   (2002-05-25 23:17) [3]

2 Anatoly Podgoretsky: хорошо, WM_MOUSEWHEEL, а как узнать вверх или вниз крутится?...
2 SPeller: у формы такого события не видел (в Дельфях №3 - в других не знаю)


 
rhf   (2002-05-25 23:22) [4]

почитай про WM_MOUSEWHEEL в win32.hlp, там все написано, как и куда оно крутиться, а так же в каком месте экрана и т.п.


 
SPeller   (2002-05-26 07:03) [5]

2ZEE © (25.05.02 23:17)

В третьих не знаю, я в них не работал. У меня только 5 и 6


 
Anatoly Podgoretsky   (2002-05-26 11:38) [6]

ZEE © (25.05.02 23:17)
Ты хелп то посмотрел или как?


 
cok   (2002-05-26 20:19) [7]

OnMouseMove не подойдет? (оно ведь возникает при движении мыши, т.е. при прокрутке колеса)


 
Malder   (2002-05-26 21:43) [8]

cok, ты так думаешь ?


 
ZEE   (2002-05-27 01:48) [9]

В win32.hlp (третьих дельфей) WM_MOUSEWHEEL нету.
Про маус только WM_MOUSEACTIVATE и WM_MOUSEMOVE.
Видно это только у пятых (и т.д.) дельфей есть расшифровка.
Народ, кому не трудно, расскажите что там и как с WM_MOUSEWHEEL, пли-и-и-из.


 
Malder   (2002-05-27 10:06) [10]

[New - Windows NT]

The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window"s parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it.

WM_MOUSEWHEEL
fwKeys = LOWORD(wParam); // key flags
zDelta = (short) HIWORD(wParam); // wheel rotation
xPos = (short) LOWORD(lParam); // horizontal position of pointer
yPos = (short) HIWORD(lParam); // vertical position of pointer


Parameters

fwKeys

Value of the low-order word of wParam. Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

Value Description
MK_CONTROL Set if the CTRL key is down.
MK_LBUTTON Set if the left mouse button is down.
MK_MBUTTON Set if the middle mouse button is down.
MK_RBUTTON Set if the right mouse button is down.
MK_SHIFT Set if the SHIFT key is down.


zDelta

The value of the high-order word of wParam. Indicates the distance that the wheel is rotated, expressed in multiples or divisions of WHEEL_DELTA, which is 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.

xPos

Value of the low-order word of lParam. Specifies the x-coordinate of the pointer, relative to the upper-left corner of the screen.

yPos

Value of the high-order word of lParam. Specifies the y-coordinate of the pointer, relative to the upper-left corner of the screen.



Remarks

The zDelta parameter will be a multiple of WHEEL_DELTA, which is set at 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.
The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels in the future, including perhaps a freely-rotating wheel with no notches. The expectation is that such a device would send more messages per rotation, but with a smaller value in each message. To support this possibility, you should either add the incoming delta values until WHEEL_DELTA is reached (so for a given delta-rotation you get the same response), or scroll partial lines in response to the more frequent messages. You could also choose your scroll granularity and accumulate deltas until it is reached.

See Also

GetSystemMetrics, mouse_event, SystemParametersInfo


 
ZEE   (2002-05-27 14:23) [11]

2 Malder: Спасибо, буду разбираться



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2002.08.05;
Скачать: [xml.tar.bz2];

Наверх









Память: 0.84 MB
Время: 0.025 c
3-13544
Alibaba
2002-07-05 16:00
2002.08.05
Связать 2 TQuery


1-13688
Man-In-Red
2002-07-23 20:22
2002.08.05
Помогите пожалуйста!


1-13646
Kudatsky
2002-07-22 10:13
2002.08.05
Delphi 5 не реагирует на ошибки с плавающей точкой


14-13804
pave1
2002-07-11 09:57
2002.08.05
Вопрос о литературе ...


1-13716
GydruS
2002-07-24 08:25
2002.08.05
Переполнение стека из-за CheckBox а!





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский