Development: wxMSW

From WxWiki
Jump to: navigation, search

wxMSW

DirectX Integration

Some parts of DirectX would be benificial to wxWidgets.

DirectDraw

  • Proposal - check for ddraw.dll at startup on MSW if wxUSE_DIRECTDRAW is enabled. If so, set the global DC to the directdraw DC, otherwise use the normal one. When time to create a DC, clone the global DC.
    • Psuedo-code: In Startup Code:
      • wxDC* pGlobalDC;
 if (ddraw.dll)
   pGlobalDC = new wxDirectDrawDC(DONTSHOW)
 else 
   pGlobalDC = new wxNormalDC(DONTSHOW)
      • When time to create dc clone the global one...
        • TODO: How to do this...

DirectSound/Music

PortAudio is the relatively famous one now started from the music-dsp list, but a native implementation might be desired if wx ever expands to this.

DirectInput

Desired for wxJoystick for force feedback and other features.


The Great Flicker Wars

wxWidgets apps flicker on resize more than most other apps made by other compilers under MSW, since the others ordinarily use better controls than the common controls. By migrating away from static (i.e. non-user editable) controls toward non-static ones, and setting a few attributes on the main frame, most of the problems can be eliminated. For example, you can use a wxTextCtrl's instead of awxStaticText labels, by dummying it up to look and act like wxStaticText controls. Also, by paying special attention to scroll bars, and using the right attributes for the parent frame, 65-95% of the flickering can be eliminated (see Flicker-Free Drawing). While these guidelines can significantly reduce the problem, ultimately the best solution may be to have the wxWidgets library employ these techniques in a manner transparent to the programmer.