News:

OS2World.com Forum is back !!!

Remember to visit OS2World at:
http://www.os2world.com

Main Menu

Mouse Button Triple-Click

Started by fr4nk, October 09, 2026, 09:53:39 AM

Previous topic - Next topic

Martin Iturbide

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

#16
Instead of having an executable, it might be advantageous to put all this functionality into a DLL that is loaded via the OS2.INI -> LoadOneTime (or maybe the LoadPerProcess, I am not sure) keyword.

You will need a DLL with a function exported via ordinal 1 and likely with this function signature:

ULONG APIENTRY SYSDLLSOrd1(VOID);

Of course the name of the routine can be freely chosen as it is called via ordinal and not via name. APIENTRY is the System calling convention (the standard calling convention for 32-bit OS/2 API functions).
Looks like the function should return 1 to signal everything is ok (anything else will likely be a problem).

The (return type and also) the input parameters are not clear but likely do not matter/are not used.

Of course, this very same DLL can also contain the INPUT HOOK function and the replacement/subclassing window class window function (for Entry field and MLE).

Rich Walsh

Quote from: Lars on October 11, 2026, 07:22:36 PMInstead of having an executable, it might be advantageous to put all this functionality into a DLL

Actually, I think the design is pretty clever and avoids most of the pitfalls that come with using a message queue hook (uggghhhh!!!). If I read the code correctly, the exe acts as a daemon that manipulates the target window while the hook simply posts an event message to it and moves on. The selection task happens asynchronously, and if there are problems, it's the daemon or target app that hangs, not the msg queue.

BTW, JPM... windows like TC_CLASS are usually created as children of HWND_OBJECT to ensure they don't get any messages other than the ones you post or send them.

Lars

#18
I don't understand.

In my understanding, the EXE globally subclasses the EntryField and MLE window classes (to modify the behaviour and take into account triple clicks) and also installs an Input Hook (for creating triple click event). For both of that you do not need an executable (an executing main loop, so to say). The advantage of the EXE solution is that you can kill/stop it if that should be necessary.

Or are you calling "subclassing a standard window class" hooking the message queue ?

Rich Walsh

Quote from: Lars on October 13, 2026, 07:07:36 AMIn my understanding, the EXE globally subclasses the EntryField and MLE window classes (to modify the behaviour and take into account triple clicks)
No, nothing is getting subclassed.

The hook posts a msg to the daemon's object window identifying the target of a triple-click. The daemon process then identifies the target's window class, and if it's an EF or MLE, sends it a set-selection msg.

The fact that these window operations can be performed across process boundaries is what makes this approach novel. All of the work (and risk) happens in the daemon process, so if something goes wrong, it only affects the daemon - and possibly the target - but not the message queue or other processes.

Dariusz Piatkowski

...nice...but for those blessed with a 3rd button (I'm still rockin' the IBM ScrollPoint mouse here, well, Lenovo to be honest), is there a fix for that?

I ask b/c the 'Mouse' button object has a very scant MB3 mapping functionality, and this here would be a very nice selection.