You are here:

C++/doubt regaring wParam

Advertisement


Question
Hi,
My question iis,
is there any specific value for the middle click(that is the scroling button in b/w left click and right click in the mouse)of the mouse will have any specific value for wParam parameter.

Answer
if the middle mouse button goes down on the client area of a window, a WM_MBUTTONDOWN message is generated and the wParam could be one or more of these bit flags:
 MK_CONTROL The CTRL key is down.
 MK_LBUTTON The left mouse button is down.
 MK_MBUTTON The middle mouse button is down.
 MK_RBUTTON The right mouse button is down.
 MK_SHIFT The SHIFT key is down.
 MK_XBUTTON1 Windows 2000/XP: The first X button is down.
 MK_XBUTTON2 Windows 2000/XP: The second X button is down

if the middle mouse button goes down on the non-client area of a window, a WM_NCMBUTTONDOWN message is generated and the wParam is the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message.  

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


vijayan

Expertise

my primary areas of interest are generic and template metaprogramming, STL, algorithms, design patterns and c++11. i would not answer questions about gui and web programming.

Experience

about 15 years or so

Education/Credentials
post graduate engineer

©2016 About.com. All rights reserved.