Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Disabling drag-and-drop globally.

Name: Anonymous 2010-07-07 1:18

Is there a way to set up my mouse so a "click" consists of only pressing the button DOWN, instead of waiting for the up click?  I tried setting a global mouse hook and using SendInput to send an MOUSEEVENTF_LEFTUP message every time it gets a WM_LBUTTONDOWN message, but it doesn't do what I want.

I need it so I can get faster @ Minesweeper. :3  I always wind up clicking different squares than I mean to, because by the time I lift up on the button, I've moved my mouse somewhere else.

Name: Anonymous 2010-07-07 1:21

lol

Name: Anonymous 2010-07-07 1:23

VB, eh?

Name: Anonymous 2010-07-07 1:25

>>3
VC

Name: Anonymous 2010-07-07 1:26

get faster @ Minesweeper.
Keyboard efficiency! My fingers always hurt when I have to type long words like ``at''!. Excellent idea!

Name: Anonymous 2010-07-07 1:28

>>5
ikright?

Name: Anonymous 2010-07-07 1:35

Anyone?

Name: Anonymous 2010-07-07 5:18

Sounds like you needa some sort of touch screen mit stylus

Name: Anonymous 2010-07-07 6:07

OP here, I figured it out.  Automatically generating an upclick within my mouse hook after every downclick wasn't working because it was processing the upclick before I exited my hook to let the system process the downclick. The answer was to kill EVERY user-generated (left button) mouse event and send a down/upclick combo on each downclick.

Code if anyone's interested ('flag' is a global variable):


int flag;
...
SetWindowsHookEx(WH_MOUSE_LL, MouseProc, hInst, 0);
...
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) {
    INPUT I[2];

    if (nCode == HC_ACTION && wParam == WM_LBUTTONUP) {
        if (flag == 0)
            return -1;
        else
            flag = 0;
    }

    if (nCode == HC_ACTION && wParam == WM_LBUTTONDOWN) {
        if (flag == 0) {
            flag = 1;

            memset(I, 0, 2*sizeof(INPUT));
            I[0].type = I[1].type = INPUT_MOUSE;
            I[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
            I[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
            SendInput(2, I, sizeof(INPUT));

            return -1;
        }
    }

    return CallNextHookEx(mHook, nCode, wParam, lParam);
}

Name: Anonymous 2010-07-07 6:12

>>9
Your code requires more NULL.

Name: Anonymous 2010-07-07 6:16

There are missing some NULLs in your code.

Name: Anonymous 2010-07-07 7:55

Isn't there an environment variable that determines the width of the box around the mouse click point where a release won't generate a drag event? This would probably be the more elegant solution.

Name: Anonymous 2010-07-07 8:01

>>12
U mena delta? Shit like TWM has it in config files. Windows probably has it hardcoded.

Name: Anonymous 2010-07-07 8:09

>>12
Yeah, I found something like that googling, but it still wouldn't register it as a click until the button is released (I assume). I want it to process the click where I press the button down, which is sometimes different from where I release it, since I'm moving the mouse fast and my fingers are slow :/

Name: Anonymous 2010-07-07 9:55

unplug mouse, problem solved.

Name: Anonymous 2010-07-07 12:35

>so I can get faster @ Minesweeper
Cheating bastard.

Name: Anonymous 2010-07-07 15:54

Just ZA WARUDO and finish the game in freezetime.

Name: Anonymous 2010-07-07 20:15

<i>!</i>. <u><sup>Excellent</sup></u> <span class="o"><sub>idea</sub></span>

Name: Anonymous 2010-07-07 21:48

>>18
Error: Premature compilation of BBCode.
Status: Open.
Severity: Critical.

Name: Anonymous 2010-12-22 16:13

Name: Anonymous 2011-02-04 19:27

Don't change these.
Name: Email:
Entire Thread Thread List