The people invented the mouse are great, maybe it is too lazy to invent this device, :). PF ...
In the article, the mouse is not very important. People prefer the keyboard, in fact, I also like to use keyboard operations, such as opening the calculator, I prefer to use the keyboard WIN R, then enter "CALC" to open the calculator. Instead of using the mouse point "start" -> "Program" -> "Attachment" -> Calculator. But it is different when playing CS. Ha ha……
There is a mouse is very good, but we can't assume that the customer has installed the mouse. Joining the customer does not have a mouse or the mouse is broken. Of course, this may not happen, but there is this possibility, so our procedure should consider This situation is.
function
Fmouse = getSystemMetrics (SM_MousePresent); used to determine if the mouse is installed, if installed, return a non-0 value, otherwise returns 0. [Windows 98 returns 2] without mouse. Terms in the mouse: Clicking Press and releases a mouse button. Double-Clicking Quick Press and release the mouse button twice. Dragging Press and hold the mouse button and move the mouse. The e-lite word of the mouse is mouse, then what is its complex form? Perhaps use mouse devices to be a reference. X = loword (lparam); // The X coordinate y = HiWord (lparam) of the mouse; // Y coordinate is determined to double-click, then the two clicks must occur in the case where the actual location of the same is very close (internal range It is a wide system font 字, 半) 并且 并且 并且 并且 时间. 时间. 为 时间 时间 时间 时间 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息 息The CS_DBCLCKS identification word is included. Wndclass.style = cs_hredraw | cs_vredraw | cs_dblclks; Double-click Message is: WM_LBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDBLCLK WM_LBUTTONUP
That is to say, double-click to process the message, and then processes double-click the message. For example, click the application icon as "selection", and double-click the icon is "select" first, then "run". Hit Test Message WM_NCHITTEST: This message takes precedence over all display areas and non-display area messages. LPARAM contains X and Y screen coordinates, WPARAM is useless. Intercept mouse message: case wm_nchittest: return (LRESULT) HTNowhere;