I’m not sure why you’d care about how the user goes about changing a value. But to stop it, you’ll likely need a WndProc for each control where you want to suppress that behavior. I forget it’s likely something like WM_Wheel
Users are changing values w/o knowing they are changing values.
Compare to a drop down list in excel. A mousewheel movement scrolls the page, not the selected entry of a dropped down list the cursor happens to be near.
That is what my users are expecting.
not sure about wndproc details. I can handle(pun…) it given a starting point.
create control…
(equ){prop:wndproc} = …
I’m ok with disabling mousewheel on all ddl, even when dropped.
Thanks for the help. Need a little bit more on how to structure the code for 100s of windowprocs.
Can I put the windowproc in an object?
{
private LP originalWindowProc
WindowProc( hwnd, uMsg, wParam, lParam) {
if (wParam == WM_MOUSEWHEEL) {
return 0;
(originalWindowProc)(hwnd, uMsg, wParam, lParam)
how do I call a pointer in clarion?
}
No you cannot put a WindowProc directly in an object as the first parameter would change to the object instance (self)
That said, you can write a local procedure and use that from an object.
Note, your code looks like C, you’ll need to write it in CW (clarion for windows)
The somewhat un-obvious trick will be to be able to retrieve the origWndProc from within the WndProc itself. I used these a decade ago, I assume they’re still good
The template just generates one call of a method for each list control in each window procedure in an app. In hand coded project one can do the same manually (hand code project is included in the package).
If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx.
If nCode is greater than or equal to zero, and the hook procedure did not process the message, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_MOUSE_LL hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.
myMouseHook procedure(long ncode, long wparam, long lparam)
hMouse long (0)
code
! per https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-callnexthookex
! hMouse is ignored
if (ncode >= 0) and (wparam = WM_MOUSEWHEEL)
return 1
else
return api_CallNextHookEx(hMouse, ncode, wParam, lparam)
end