Labans Calender Control and Mouse Wheel Disable Problem

karmahum

Registered User.
Local time
Today, 19:41
Joined
Apr 29, 2002
Messages
53
Hello all.

I have a database that has a number of forms for data entry. On some of the forms I have implemented a calender control created by Stephen Lebans. Also on these forms I am trying to disable the use of the mouse wheel (I am using Access 97). Mrabrams2 posted an excellent bit of code that works to disable the mouse (see attached).

However, when the code for both of these features are loaded into a single database, the mouse wheel disable does not work.

I have gone through the code piece by piece and have finally determined that a conflict appears to occur during a function ID call (using Addrof). Further, both use the following:

Declare Function CallWindowProc Lib "user32" Alias _
"CallWindowProcA" (ByVal lpPrevWndFunc As Long, _
ByVal hWnd As Long, ByVal msg As Long, _
ByVal wparam As Long, ByVal lparam As Long) As Long

Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hWnd As Long, _
ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

The CallWindowProc function appears to be where the problem resides because the program appears confused about which to call.

I am sorry if I am not making any sense. So, in essence, I am asking if anyone has successfully combined Stephan Labans calender control and Mrabrams2 mouse wheel disable code into a single database successfully?

Thanks.
 
Credit

Just to set the record straight, the Prevent Mouse Wheel solution, is credited to a gentleman named Andy (Accessman) from Indiana, with help from another nice guy from England named Rory. Both posted/worked on the code on another board a while ago.

*I will place a disclaimer in future sample databases.*

Thanks,
Michael
 
WindowProc

I have isolated the problem to the WindowProc function that is called by both. The proble, however, is that I can not follow the logic with regards to where the function is called.

As I step through the logic, it jumps from a line of code without being called (at least as far as I can tell.)

Hopefully someone has some ideas.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom