Re: win32Lib pixmap

new topic     » goto parent     » topic index » view thread      » older message » newer message
buzzo said...

If I then put the images on that window, the images disappear when the window is scrolled.

It sounds like you are not drawing the image on the window during its paint event.

buzzo said...

When attempting to place the image on the pixmap, the program fails at this line:

status=GdipCreateFromHWND(getHandle(VirtScrn),ppGraphics) 

The "handle" of a Pixmap is the memory address of its underlying Bitmap object (a raw HANDLE value in Windows). The "handle" of a Window is its HWND value from Windows, which is what GdipCreateFromHWND() is expecting. HWND specifically means, Handle of a WiNDow. A Pixmap object is not a window, it is an in-memory Bitmap that can be used like a control.

buzzo said...

The value of status is 3.. indicating "out of memory HWND". If use getHandle(ChartWin), a normal window, status is 0 and the image is drawn.

I would think both VirtScrn and ChartWin are atoms, but I could be incorrect.

They are both integer values. All values returned from create() (or createEx()) are simple integers that reference internal sequences used by Win32Lib to store data about the controls.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu