[wxpython-users] Win32 mode and graphics?

Brian Hamlin bh1 at light42.com
Thu May 1 21:53:03 PDT 2008


On May 1, 2008, at 9:03 PM, Chris.Barker wrote:
> Brian Hamlin wrote:
>>> so I am going through demos.. yes, FloatCanvas in the demo app. but 
>>> I am getting errors
>>>   CreateXXXBrush() failed with error (number) (this function only 
>>> valid in Win32 mode)
>
>> I should say clearly.. FloatCanvas *is* working.. some of the Demos 
>> work *fine*.. it is some of the calls that are failing, in some 
>> demos.. on Windows98.. thanks
>
> I have no idea what I'm talking about, but a wild guess is that maybe 
> you are running out of resources -- older Windows versions were 
> limited as to how many GDI objects, etc you could have, an FloatCanvas 
> caches pens and brushes, so that may be the source of the error.
>
> Though you'd sure think you were running in "Win32 mode"!
>
> However, if I'm right, you may not have any problems with your real 
> app. The FloatCanvasDemo generates a LOT of random colors, etc, so 
> that the pen and brush cache is probably a lot larger than what you'd 
> get with a real app.
>
> Are you seeing any of these errors with your own code?
>
> In the refactor, we'll probably get rid of that caching system, but 
> frankly I'm not going to put too much effort into supported a 10 yr. 
> old OS that was build on old, crappy technology to begin with.
>
Hi Chris, thanks for the reply

   nope, I'm not seeing that in my own code.. just going through the 
arduous process of development environment setup. I totally agree that 
is a crappy environment! no wonder I dont really own one of these.. Its 
literally all I had at hand to set up a windows test machine.   Yes, it 
is Win32.. says so in multiple places

   The caching theory makes perfect sense.. I'll be satisfied that 
things are "good enough" and I'll move forward. I just need to *see* 
things run on windows since I know thats where many users will be for 
this app..

   (hopefully, fun stuff soon)

   best regards
      -Brian



More information about the wxpython-users mailing list