Trying to detect focus on a tab gadget

Just starting out? Need help? Post your questions and find answers here.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Trying to detect focus on a tab gadget

Post by Karbon »

I'm trying to detect a focus change on a tab in a panel gadget but am unable to do so thus far.. I want something to happen *only* when the tab receives the focus so I can't just check the panel's state in the WaitWindowEvent() loop.

Trying this :

Code: Select all

If message = #WM_NOTIFY
    
    *MyPanel.NMHDR = lParam
    
    If *MyPanel\code = #TCN_SELCHANGE

      DoSomething()

    EndIf

That doesn't work and I can't seem to find anything like the #EN_SETFOCUS message for edit controls..

Any suggestions are appreciated! Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net