CWnd, OnMouseWheel
Afx_msg BOOL OnMouseWheel (UINT nFlags, quick zDelta, CPoint therapist);
next value: If the mouse wheel is allowed to scroll, A neo-Zero value is delivered; or else, 0 is delivered.
Parameter:
NFlags indicates if the virtual key is pressed. This parameter can be a mix of the following values:
MK_CONTROL Set this bit if the CTRL key is shoved.
MK_LBUTTON Set this bit if the left mouse button is clicked.
MK_MBUTTON Set this bit if the center mouse button is pressed.
MK_RBUTTON This bit is set if your correct mouse button is pressed.
MK_SHIFT If the SHIFT key is pushed, This bit is set.
ZDelta indicates the space of rotation. The zDelta value is expressed in the form of WHEEL_DELTA, which is a multiple or part of 120. Numbers as low as zero indicate scrolling back (Toward the owner), While numbers higher than zero indicate scrolling away (Leaving the user). The user can alter the wheel setting in the mouse software to reverse this response. for much more about this parameter, See the explanation section.
Pt specifies the x and y coordinates of the cursor. These coordinates are usually in accordance with the upper left corner of the window.
story:
inside the user rotates the mouse wheel and reaches the next scale of the wheel, The framework refers to this as member function. Unless it is full, OnMouseWheel calls the default running of WM_MOUSEWHEEL. Windows definitely forwards the message to the control or sub-home window with input focus. The Win32 function DefWindowProc uploads the message to the window that owns it.
The zDelta parameter is a adjustable of WHEEL_DELTA, that can be set to 120. This value is the beginning of the action to be taken. these types of action (Such as scrolling forward to another location tick) Must be created for each delta.
The delta is set to 120 to allow the use of higher precision rollers later in life, comparable to free-Running rollers along with scales. this device may send multiple messages per rotation, But the value in each message is smaller. current swimming pool To support this risk, you may either accumulate the entered delta value until you reach a WHEEL_DELTA (So you get to the same response as the rotation of the given delta), Or scroll part of the line in response to more frequent messages. You can make your scrolling accuracy and accumulate the delta value until it reaches WHEEL_DELTA.
Overload this member function to supply your own mouse wheel scrolling feature.
Note OnMouseWheel systems messages for Windows NT 4.0. visit here For message taking in Windows 95 or Windows NT 3.51, OnRegisteredMouseWheel for being used.
|
Author : Markussen Fanning |
Views : 62 |
|
|
|
|
This Blog Has Been PowerShared™ Successfully! |
|
|
Check out Henry Borre's Profile, and Blogs! |
|