 |
|
 |
I have this issue that the program won't "Run at Startup" neither will it be enabled.
For now, the best way i found to make it start, is by the Startup folder in the start menu. Using Vista here. Each time the computer starts, then i have to "enable".
is there a better way to make this all automatically ?
thanx for any help.
|
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Here is an alternate method for generating double-click instead of posting message back to WndProc.
LRESULT WINAPI MouseHook(int code,WPARAM wp,LPARAM lp)
{
DWORD dwStyle;
INPUT ip[2];
HWND hWnd;
if (code==HC_ACTION)
{
switch (wp)
{
case WM_MBUTTONDOWN:
case WM_NCMBUTTONDOWN:
ZeroMemory(ip,sizeof(INPUT)*2);
ip[0].type = INPUT_MOUSE;
ip[0].mi.dx = ((LPMOUSEHOOKSTRUCT)lp)->pt.x;
ip[0].mi.dy = ((LPMOUSEHOOKSTRUCT)lp)->pt.y;
ip[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
ip[1].type = INPUT_MOUSE;
ip[1].mi.dx = ((LPMOUSEHOOKSTRUCT)lp)->pt.x;
ip[1].mi.dy = ((LPMOUSEHOOKSTRUCT)lp)->pt.y;
ip[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(2,ip,sizeof(INPUT));
return 1;
case WM_MBUTTONUP:
case WM_NCMBUTTONUP:
ZeroMemory(ip,sizeof(INPUT)*2);
ip[0].type = INPUT_MOUSE;
ip[0].mi.dx = ((LPMOUSEHOOKSTRUCT)lp)->pt.x;
ip[0].mi.dy = ((LPMOUSEHOOKSTRUCT)lp)->pt.y;
ip[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
ip[1].type = INPUT_MOUSE;
ip[1].mi.dx = ((LPMOUSEHOOKSTRUCT)lp)->pt.x;
ip[1].mi.dy = ((LPMOUSEHOOKSTRUCT)lp)->pt.y;
ip[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(2,ip,sizeof(INPUT));
return 1;
}
}
return CallNextHookEx(MouseHookID,code,wp,lp);
}
|
|
|
|
 |
|
 |
Just upgraded to Vista and this was my main gripe. Now fixed easily!
May rose petals strew your every path and may all your children get the freedom of Baku.
~Fish
|
|
|
|
 |
|
 |
Thank you. This is exactly what I was looking for. I'm a bit rusty on coding and trying to get back into it. This is also perfect for elderly and people with disability. Some of the folks are not able to double-click nor hold the left-click down to drag the items. This program would be very handy.
I was wondering, do you know of anyone who could help me with the second part? It should work like the following:
1. Move the pointer on a file/folder
2. Press the Wheel Click
3. Move the pointer and it moves/drags the file/folder.
4. Press the click again and releases the file/ folder
Does this make sense?
Thank you again,
|
|
|
|
 |
|
 |
To clarify the steps:
1. Move the pointer on a file/folder
2. Press & release the Wheel Click
3. Move the pointer and it moves/drags the file/folder.
4. Press and release the click again and the pointer releases the file/ folder
This program would be very handy for people who can not hold the left-mouse click down. Does this make sense?
Thanks again,
|
|
|
|
 |
|
 |
Hi again!
Recently I've discovered a bug in my similar software, and for curiosity I've tested yours too.
If one changes the mouse settings (from Control Panel) to left-handed usage, then our programs generate double right clicks.
In Win2000 and XP this left-handed feature is called "switch primary mouse buttons", and it seems, that this switching happens _after_ the low level hook runs.
It is embarrassing for me, because I am left-handed, but usually using the mouse as right-handed.
There is a kind of workaround: search MSDN's Platform SDK section for GetSystemMetrics function, and call with the SM_SWAPBUTTON parameter.
I will check the "swap state" just before setting the hook. It will not be "real-time", but with two clicks on the SysTray icon the behaviour gets corrected. (My app enables/disables the double click simulation if you click the icon.)
And it is very rare to swap those primary buttons. If one swaps them, then it probably stays swapped for long periods.
(Back in the times, under Windows 98 there was no low level mouse hook, and I used the GetMessage hook to do the simulation. There this bug didn't exist, probably because that hook is not low level. Anyway, it is clear that this low level hook must be used, because the GetMessage hook caused serious crashes in MSOffice.)
-- modified at 12:19 Wednesday 7th November, 2007
|
|
|
|
 |
|
 |
I find this a handy program and offer thanks to the author.
Tell me, is there a way to have it loaded with the enabled, rather than having to enable it after each reboot or start up?
|
|
|
|
 |
|
 |
If you enable it, it should stay after reboot > The most common cause for your problme is, that you don't have registry access (Because the state is written to the registry) > either you get registry access or you rewritte the config-load/save function so, that it load from/to a file. Hope that helps > if in doubt or any other question, please drop a line...
cheers
kim
|
|
|
|
 |
|
 |
I do have registry access and HKLM\Software\MBnDblclickVC\Enabled =1
The program is in the "Run" area of HKLM with the entry "F:\Utilities\2click\MBn2DblClickVC.exe"
The program starts on rereboot, but in the disabled state.
I do not understand "rewriting the config-load/save function so that it loads from/to a file"
|
|
|
|
 |
|
 |
Yes it is really annoying. It should stay enabled if you click it once.
|
|
|
|
 |
|
 |
Hi:
I write a program like this recently, codeing and doing test under winXP, and I found a general problem of hook mouse use 'WH_MOUSE_LL' when under the full "visual styles" in WinXP. Once the application start, open a window (MyCompute or IE etc), click the Minimize or Maximize box, When the window act move your mouse quickly, you will find a delay move of mouse cursor on the screen.
And When you turnoff the "Visual styles" ---> "Minimize or Maximinze Window Animation" the last item in the "Visual Styles" Setting In WinXP, you will find this problem disappear.
It confuse me.
|
|
|
|
 |
|
 |
Well, we are three then who wrote such a program
Usually I turn off those animations, but yesterday I did a test. I haven't noticed that delayed move. Maybe I haven't moved the mouse quick enough...
The test was in a kind of a stressed environment, because a long compilation was running meanwhile. That alone causes small jumps of the mouse cursor (CPU is dualcore, both cores compiling simultaneously + other background calculations running nonstop).
Maybe it has to do with Windows itself. I wouldn't waste nerves on this issue, but maybe it is just too annoying on your PC
|
|
|
|
 |
|
 |
Hi!
I've written a program for this feature too, years ago. You can get addicted to this quickly
I saw that you wrote the same thing in .NET too, but I write here, 'cos I wrote it in C.
I'm wondering about two things:
1. Is it necessary to "reformat screen coordinates"?
2. Is that delay necessary?
Maybe it's all because you have a bit different approach; I used mouse_event instead on SendInput, and do the "thing" directly in the hook, not by posting a message to my code. Also, I do the conversion during the MBUTTONDOWN event.
I'm curious, because maybe your way is the safer way, I don't know.
I include my hook handler below. It works on XP SP2 and previous versions, haven't tried on Vista.
if (code >= 0 && (((MSLLHOOKSTRUCT*)lParam)->flags & LLMHF_INJECTED) == 0) {
switch (wParam) {
case WM_MBUTTONDOWN:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
processed = TRUE;
break;
case WM_MBUTTONUP:
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
processed = TRUE;
break;
}} result = processed ? 1 : CallNextHookEx(shm_data->hookid, code, wParam, lParam);
(Sorry, I'm lerning how to post code snippets in messages now...)
|
|
|
|
 |
|
 |
Hey Hatod,
Thanks for your review
For your questions:
1. Yes the reformation of the screen-coordinates is nessesary because of the input-format sendinput expects! (That might not apply for your mouse_event function)
2. No your right, the delay is not needed but I included it anyway to get closer to a users doubleclick > But please feel free to remove it, that shouldn't affect the proper behaviour.
cheers kim
|
|
|
|
 |
|
 |
just what my mouse driver at home does, and what my mouse at office doesn't
thanks mate
BTW, just a few remarks for you sources zip :
the files *.ncb, *.opt and *.plg are not needed as a source, and can be suppress to lighten the sources zip
|
|
|
|
 |