Hi all,
I need some assistance.. I'm trying to trace a problem. The quick description is when I run the Visual FoxPro 5 development environment, and I click in a 'edit' window (like when you bring your program up, to edit it) the screen freezes.
when I ran wine --debugmsg +win vfp.exe, my last line of trace is: trace:win:EVENT_Capture (0x20021) then the window freezes.
So I saw that SetCapure() called EventCapture() in input.c, and I'm trying to trace what all (yikes!) calls SetCapture()
I started with [rick@pc99 wine]$ grep -nri --include *.c setcapture * to get all the c files with SetCapture().
So after a day of picking and choosing, I've added more traces to EVERYTHING that the grep command outputs (basically):
controls/button.c:234: TRACE_(win)("Calling SetCapture in button.c\n"); controls/button.c:235: SetCapture( hWnd ); controls/button.c:236: TRACE_(win)("Done with SetCapture in button.c\n"); controls/combo.c:1197: TRACE_(win)("Calling SetCapture (combo.c)\n"); controls/combo.c:1198: SetCapture(lphc->hWndLBox); controls/combo.c:1778: TRACE_(win)("Calling SetCapture (combo.c2)\n"); controls/combo.c:1779: SetCapture( hWnd ); controls/combo.c:1808: TRACE_(win)("Calling SetCapture (combo.c3)\n"); controls/combo.c:1809: SetCapture(lphc->hWndLBox); controls/edit.c:4324: TRACE_(edit)("About to SetCapture - edit.c\n"); controls/edit.c:4325: SetCapture(hwnd); controls/edit.c:4326: TRACE_(edit)("Done with SetCapture - edit.c\n"); <snipped>
I havn't touched the spec files yet, but everywhere setcapture() is called, I added a trace. Mostly TRACE_(win), but sometimes 'win' wouldn't take even with DECLARE_DEBUG_CHANNEL(win); (IIRC, everything under /dlls/ was that way).
So now if I run notepad I get:
wine --debugmsg +win,+shell,+edit,+header,+accel notepad.exe
trace:win:WINPOS_WindowFromPoint found child 10022 trace:edit:EditWndProc_common 32 bit W : WM_MOUSEACTIVATE: hwnd=00010022, wParam=00010021, lParam=02010001 trace:edit:EditWndProc_common 32 bit W : WM_LBUTTONDOWN: hwnd=00010022, wParam=00000001, lParam=002f0041 trace:edit:EDIT_WM_LButtonDown About to SetCapture - edit.c trace:win:SetCapture Calling Event_Capture trace:win:EVENT_Capture (0x10022) Window #!! -Maybe? trace:win:EVENT_Capture About to Return from Event Capture!!! Prev(0) Wnd(65570)
I assume what I'm looking for is the WM_LBUTTONDOWN. Looks good. So I run FoxPro:
wine --debugmsg +win,+shell,+edit,+header,+accel ../DevStudio/vfp/vfp.exe
trace:win:RDW_Paint Released Window pointer --rdw_paint() painting.c trace:win:SetCapture Calling Event_Capture trace:win:EVENT_Capture (0x20021) Window #!! -Maybe? trace:win:EVENT_Capture About to Return from Event Capture!!! Prev(0) Wnd(131105)
Where the heck is the code that calls SetCapture for Foxpro? I didn't think I needed to, but do I have to get into those spec files also?
Is there somewhere, other than the .c files grep returns, that would call that function? I'm definately not an expert here, but I *think* I should be able to trace a function on my own :)
My wine is cvs build 2/20/2002, using fake_windows.
Any suggestions would be appreciated.
Rick