Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using, in an excel2000 sheet, the following code to
get mouse control: Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private 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 Private Declare Function GetCursorPos Lib "user32" (point As POINTAPI) As Long Public Sub captureInput(App As Application) If Not isEqual(GetWindowLong(App.hwnd, GWL_WNDPROC), AddressOf WindowProc) Then Set aW = App.ActiveWindow PrevProc = SetWindowLong(App.hwnd, GWL_WNDPROC, AddressOf WindowProc) End If End Sub Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Select Case uMsg Case WM_MOUSEMOVE If Not is_Working Then is_Working = True: GetCursorPos point Call handleTypes(point) is_Working = False End If End Select '----------------------------- WindowProc = CallWindowProc(PrevProc, hwnd, uMsg, wParam, lParam) End Function ......... In an Workbook_Open event: Call captureInput(App) ......... Everything functions well until I put everything in an Add- in. Then I get this error 28 - Stack overflow Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
"Out of Stack Space" Macro Error | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Run Time Error "28" - Out of stack space? | Excel Programming |