- wxNode *node;
- for ( node = wxTopLevelWindows.GetFirst();
- node;
- node = node->GetNext() )
- ((wxWindow*)node->GetData())->Enable(FALSE);
-
- // always enable ourselves
- if(win) win->Enable(true);
- bool rc = wxYield();
-
- for ( node = wxTopLevelWindows.GetFirst();
- node;
- node = node->GetNext() )
- ((wxWindow*)node->GetData())->Enable(TRUE);
- return rc;
+ wxWindowList::Node *node;
+ for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
+ {
+ node->GetData()->Enable(FALSE);
+ }
+
+ // always enable ourselves
+ if ( win )
+ win->Enable(TRUE);
+ bool rc = wxYield();
+
+ for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
+ {
+ node->GetData()->Enable(TRUE);
+ }
+
+ return rc;