Re: Win32Lib: getDC of a pixmap problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

Brian Broker wrote:

> Hope you're feeling better, David...

Much, thanks.


> Does 'getDC' support getting the DC of a
> pixmap in this manner or have I stumbled upon
> a bug here?

My guess is that you failed to specify the size (x,y) of the Pixmap when you
created it. It's easy to accidentally use the (cx,cy) parameters instead:

   create( class, title, parent, cx, cy, x, y, flags )

If (x,y) are zero, then no bitmap is created, and a handle of zero is
stored. Calling getDC() will then generate the error you got.

If this is the problem, either specify a size for the pixmap, or resize it
with setSize().

Hope this helps!

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu