Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindevent, Raiseevent, Bindevent... and With
Message
 
 
To
02/05/2006 07:04:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01118319
Message ID:
01118331
Views:
16
Check http://fox.wikis.com/wc.dll?Wiki~WithLeaksLocals

>Today I discovered something "peculiar"
>
>I am doing a Bindevent to a window message, to capture mouse clicks in my statusbar class, like this:
>
>
>Bindevent(.ctl32_ProxyHwnd, WM_NOTIFY, This, [ctl32_MouseEventHandler],1)
>
>
>Inside the ctl32_MouseEventHandler method I have:
>
>
>With This
>...
>Raiseevent(This, [Click])
>...
>EndWith
>
>
>And the control is placed on a Form that has in its Init event:
>
>
>BindEvent(Thisform.oStatusBar, [Click], This, [StatusBarClick])
>
>
>And in the Form StatusBarClick method I have:
>
>
>?"Click", ;
>"nButton:" + Transform(.nButton), ;
>"nPanel:"  + Transform(.nPanel),  ;
>"nXCoord:" + Transform(.nXCoord), ;
>"nYCoord:" + Transform(.nYCoord)
>
>
>Now all those properties .nButton, .nPanel, etc. are properties of the control, they are missing the full qualifier like ThisForm.StatusBar.nButton, but it works!
>
>Seems like the With...Endwith is inherited from the ctl32_MouseEventHandler method?
>
>Carlos
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform