On Wed, 13 Nov 2002 19:26:49 -0500, Blake Garretson wrote:
I upgraded to wxPython using the precompiled win32 binary, and now
my wx program won't work. (I previously used I'm using a DC
client to draw some graphics, and it fails when it goes to refresh the
screen. Here's the error that shows up in a popup dialog:

c:\projects\wx\src\msw\dcclient.cpp(216): assert "wxFalse" failed: wxPaintDC
may be created only in EVT_PAINT handler!
Do you want to stop the program?
The assert tries to tell you that there is an error in your program: it is
using wxPaintDC outside of EVT_PAINT handler which is forbidden. Although it
might work in your case on your platform, there is no warranty that it works
on all of them.

Simply use wxClientDC instead of wxPaintDC outside of EVT_PAINT.

GCS/GM d? H+ s++:-- p2 au--- a- w+ v C+++ UBLS+++ P- L++ N++ E--- W++++ M? V--
-po+ R++ G`` !tv b+++ D--- e++++ u++ h--- f+ r++ n- y?

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouppython-list @
postedNov 13, '02 at 11:54p
activeNov 15, '02 at 12:22p



site design / logo © 2022 Grokbase