I knew we had this before ... here's what I found out then: -----Original Message----- From: Piske, Harald Sent: Friday, November 16, 2001 02:43 To: Win32-GUI-Mailing List (E-mail) Subject: RE: [perl-win32-gui-users] Win32::DialogBox - LostFocus() Event i n Button and RadioButton Objects doesn't seem to work for me
> The LostFocus() event doesn't respond at all when a mouse click > happens on another object (button, textfield, etc.) >From what I can see in the xs code, the button class is treated in a different manner. You might want to try Button_Anonymous {print join (', ', @_), '\n';} This is an event handler that gets called for a lot of the otherwise unhandled cases. If you're lucky, _LostFocus is one of them. The actual message number is passed as the first parameter. I don't exactely remember if _Anonymous gets fired for each unhandled message or just unhandled notification messages. If that does not help, you could subclass all your controls to receive _MouseMove events and call your _LostFocus sub when another control or the window sees mouse moves ... very easy in theory, just terribly annoying to actually implement :-/