Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bindevent, Raiseevent, Bindevent... and With
Message
 
 
À
02/05/2006 07:04:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01118319
Message ID:
01118331
Vues:
15
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform