Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Как на API будет "если зажат Shift"? [D7, WinXP]


Creative ©   (2006-11-30 13:41:00) 

Собственно сабж.
Нужно описать сообщение onMouseMove при зажатом шифте.


Sapersky   (2006-11-30 18:57:00) [1]

WM_MOUSEMOVE  
fwKeys = wParam;        // key flags
xPos = LOWORD(lParam);  // horizontal position of cursor
yPos = HIWORD(lParam);  // vertical position of cursor


Parameters

fwKeys

Value 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.


tesseract   (2006-11-30 15:43:00) [2]

The GetKeyState function can be used to check the down state of the following virtual keys:

VK_CONTROL VK_RCONTROL
VK_LCONTROL VK_RMENU
VK_LSHIFT VK_RSHIFT
VK_LMENU VK_SHIFT
VK_MENU  
The key status returned from this function changes as a specified thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyStatefunction to retrieve that information.

An application calls GetKeyState in response to a keyboard-input message. This function retrieves the state of the key when the input message was generated.


Eraser   (2006-11-30 14:44:00) [3]

[2].


Creative   (2006-11-30 14:42:00) [4]

в WM_MouseMove!
Я ведь не могу заголовок ветки переделать теперь :-(


Eraser   (2006-11-30 14:26:00) [5]

> [0] Creative   (30.11.06 13:41)

так определись в onMouseMove или в WM_MouseMove.
 if ssShift in Shift then


Creative   (2006-11-30 14:20:00) [6]

Второй вопрос остается в силе, как в описании WM_MouseMove написать "если зажата правая/левая мышь"?


Dmitrij_K   (2006-11-30 13:45:00) [7]

GetKeyState()


Creative   (2006-11-30 13:43:00) [8]

Дополнительный вопрос: как написать, какая при этом зажата мышь - левая или правая?


Наверх

Титульная страница Поиск, карта сайта Написать письмо