summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
378b042)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45051
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
{
// track the window which has the focus in the status bar
void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
{
// track the window which has the focus in the status bar
- static wxWindow *s_windowFocus = (wxWindow *)NULL;
+ static wxWindow *s_windowFocus = NULL;
wxWindow *focus = wxWindow::FindFocus();
wxWindow *focus = wxWindow::FindFocus();
- if ( focus && (focus != s_windowFocus) )
+ if ( focus != s_windowFocus )
{
s_windowFocus = focus;
wxString msg;
{
s_windowFocus = focus;
wxString msg;
+ if ( focus )
+ {
+ msg.Printf(
+ _T("Focus: %s")
- _T("Focus: %s, HWND = %08x"),
-#else
- _T("Focus: %s"),
- s_windowFocus->GetClassInfo()->GetClassName()
+ , s_windowFocus->GetName().c_str()
- , (unsigned int) s_windowFocus->GetHWND()
+ , (unsigned int) s_windowFocus->GetHWND()
+ );
+ }
+ else
+ {
+ msg = _T("No focus");
+ }
#if wxUSE_STATUSBAR
SetStatusText(msg);
#if wxUSE_STATUSBAR
SetStatusText(msg);