Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindevent to non VFP windows messages
Message
 
To
13/05/2006 04:02:57
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01121600
Message ID:
01121737
Views:
15
Hi Carlos,
OK, OK... But I don't uderstand one thing. Why you redirect OCX's wndproc to VFP wndproc. It's purpose.

MartinJ


>>Hi Carlos,
>>
>>If you want bindevent() to message for non VFP window message, you must hack window has get these message inclusive redirect window procedure:
>>
>>
>>.ctl32_OldProc = GetWindowLong(This.ctl32_controlHwnd, GWL_WNDPROC)
>>Bindevent(This.ctl32_controlHwnd, WM_PAINT, This, [ctl32_WM_Paint], 1)
>>
>>
>>MartinJ
>>
>
>Martin: Thank you for you comments, but I don't get it. This line I use to save the window procedure of vfp, to use it in the event handler:
>
>
>.ctl32_OldProc = GetWindowLong(_vfp.HWnd, GWL_WNDPROC)
>
>
>Procedure ctl32_WM_Paint:
>
>
>Lparameters tnHWnd As Integer, tnMsg As Integer, tnwParam As Integer, tnLparam As Integer
>
>With This
>	If tnMsg = WM_PAINT Then
>		?Transform(tnHWnd, [@0])
>		.CTL32_SETBORDER()
>	Endif
>
>	m.lnResult  = CallWindowProc(.ctl32_OldProc, tnHWnd, tnMsg, tnwParam, tnLparam)
>Endwith
>
>Return m.lnResult
>
>
>Tha above never fires now. Are you saying I should change the window procedure of the control window to that of _VFP? like:
>
>
>.ctl32_VFPProc = GetWindowLong(_vfp.HWnd, GWL_WNDPROC)
>.ctl32_CTLProc = GetWindowLong(This.ctl32_controlHwnd, GWL_WNDPROC)
>
>SetWindowLong(.ctl32_controlHwnd, GWL_WNDPROC, .ctl32_VFPProc)
>
>
>This way I would get the WM_PAINT messages, where? The more I read about this, the more confused I get, if I understand, what that last code does is subclass the window. Do you have any links where I can read about concepts regarding this? I started 6 hours ago, now I want to learn this badly.
>
>Thanks again,
>
>Carlos
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform