WxFocusEvent

From WxWiki

Jump to: navigation, search

I'm using wxWidgets 2.6.2 and have found that wxFocusEvent::GetWindow() returns an int*, whereas I would expect the (more useful) behaviour to be returning a wxWindow*. Maybe this can be fixed (or at least documented) by a wx developer? :-)

  • Please, instead of complaining in the documentation, file a bugreport and refer to that
  • Sounds like you're using Microsoft's debugger. The GetWindow() does return a pointer to wxWindow: just look at its declaration in event.h. And if you don't believe the code in the header file, save the return value to a variable of type wxWindow* (without any casts). You won't get any compiler warnings or errors because it's a proper assignment. However, sometimes the MS debugger can't figure out the return type of wxWidgets functions and so reports them as int*. This may be true of other debuggers too.
Personal tools