One-Click Win32 API Recovery Tips

How to fix Windows crashes

  • 1. Download and install ASR Pro
  • 2. Launch the program and select the device you want to scan
  • 3. Click on the Scan button to start the scanning process
  • Improve your computer's speed now with this fast and easy download.

    If your computer shows Win32 API error when clicked, you should check these recovery methods.

    If the user right-clicks, the cursor can be in the client area of ​​the window, the window will get associated with the following messages.

    How to fix Windows crashes

    Do you have a computer thats running slow? If so, then it might be time to consider some Windows repair software. ASR Pro is easy to use and will fix common errors on your PC in no time. This software can even recover files from corrupted hard drives or damaged USB sticks. It also has the ability to wipe out viruses with one click of a button!

  • 1. Download and install ASR Pro
  • 2. Launch the program and select the device you want to scan
  • 3. Click on the Scan button to start the scanning process

  • Remember that the custom area is part of a specific window, with the exception of the border. For more information on client areas, see What is a window?

    Mouse Coordinates

    win32 api get mouse click

    In almost all of these messages, the lParam parameter contains the x and y coordinates of each of our mouse pointers. The least significant quarter contains 16 bits of lParam exactly in the x-coordinate, and the next 16 contains the parts of the y-coordinate. Use GET_X_LPARAM and / or GET_Y_LPARAM to unpack macros for lParam matches.

    win32 api get mouse click

      int = xPos GET_X_LPARAM (lParam);int yPos = GET_Y_LPARAM (lParam); 

    On 64-bit Windows, lParam is a 64-bit value. The most significant 8 bits of lParam are not executed. The MSDN documentation mentions that these lParam are "Least significant word" and "Most significant word". In the case of 64 bits, these are usually the least significant bits and words are less than the least significant 32 bits. Macros retrieve the correct valuesIf and when you use them, you are always safe.

    Mouse coordinates are specified in p, not in device independent pixels (DIP), and are usually measured relative to the client's window location. Coordinates are private values. Positions above and to the left of the client area contain negative coordinates, which is important if you are following the position of the mouse outside the window. We'll see how this works in the party theme, Detecting mouse movements outside the window .

    Additional Indicators

    The wParam parameter contains a new bitwise flag Of or Flag that indicates each state of the other mouse switches, as well as the SHIFT and CTRL keys.

    indicator Value
    MK_CONTROL The CTRL key was pressed. Left
    mk_lbutton The PC button was pressed.
    MK_MBUTTON The middle mouse switch was pressed.
    MK_RBUTTON Right mouse button pressed in software.
    MK_SHIFT The SHIFT key was pressed.
    MK_XBUTTON1 The XBUTTON1 button was pressed.
    MK_XBUTTON2 The XBUTTON2 button was actually pressed.

    The absence of a flag means that the corresponding key or key was not pressed. For example, to find out if the CTRL key is pressed:

      if is real (wParam & MK_CONTROL) {... 

    If owners need to find the status along with other keys such as CTRL and SHIFT, use the GetKeyState function, which is often described in the Input section.

    Window messages WM_XBUTTONDOWN to WM_XBUTTONUP also apply to XBUTTON1 and XBUTTON2. The wParam parameter specifies which button was pressed.

    UINT button

      in software = GET_XBUTTON_WPARAM(wParam);if == (XBUTTON1 key)    // XBUTTON1 has been pressed.otherwise if (button == XBUTTON2)   // XBUTTON2 pushed too hard. 

    Double Click On Window

    a does not accept double click notifications by default. To get clicks, define the CS_DBLCLKS hole twice in the WNDCLASS structure when families store the window class.

      WNDCLASS wc implies;    wc = style CS_DBLCLKS;    /* Specify other structure members. */    Register class(&wc); 

    If you set the CS_DBLCLKS flag as shown, the window will collect double click notifications. Double click, probably , will be indicated by a window with the word "DBLCLK" in its name. To illustrate this, double-clicking the left duck button creates the following message thread:


    Typically a WM_LBUTTONDOWN message received becomes a WM_LBUTTONDBLCLK message. Equivalent tweets are defined on the right, for the middle button, and for the XBUTTON buttons.

    Until you get a double click, you will see a message stating that it is impossible to say with certainty that the first single mouse click is the start of a group click. Therefore, the double-click action should actually continue the action that occurs on the first mouse click. For the argument, in the Windows shell, one click selects the folder and double-click opens the folder.

    Non-client Mouse Messages

    In fact, a separate set of messages is defined for mouse events that occur in the non-client area of ​​all windows. Their name contains the messages of the heroes of "NC". The example for WM_NCLBUTTONDOWN is the non-client equivalent of WM_LBUTTONDOWN . A typical application does not always interceptthese messages because the defwindowproc function handles these messages correctly. However, they can be useful for various advanced features. For example, you should use these messages to implement the lifestyle in the title bar. Typically, when processing these messages, families should pass them to DefWindowProc if they decide to do so later. Otherwise, your application will disable standard features such as dragging and dropping or simply minimizing the window.


  • Article
  • 3 minutes if you want to read
  • Improve your computer's speed now with this fast and easy download.