1. Win32lib Pixmap
- Posted by Liquid-Nitrogen Software <nitrogen_069 at HOTMAIL.COM> Jun 26, 1999
- 441 views
- Last edited Jun 27, 1999
Is it possible to get the address of a win32lib Pixmap so that I can draw straight to the memory with poke(), or machine code? Or is there a way that I can allocate a block of memory and then draw that block to the window? Also, does anyone know how to use directX or where to get some documentation on it? Thanks, Mark.
2. Re: Win32lib Pixmap
- Posted by David Cuny <dcuny at LANSET.COM> Jun 27, 1999
- 429 views
Mark wrote: > Is it possible to get the address of a win32lib > Pixmap so that I can draw straight to the memory > with poke(), or machine code? A Pixmap is actually a handle to a Win32 DIB (device independant bitmap). So you already have the address. > Or is there a way that I can allocate a block of memory > and then draw that block to the window? The function createDIB does exactly that - it creates 2, 16 or 256 bit color bitmaps from data. Hope this helps! -- David Cuny
3. Re: Win32lib Pixmap
- Posted by Liquid-Nitrogen Software <nitrogen_069 at HOTMAIL.COM> Jun 28, 1999
- 453 views
>> Or is there a way that I can allocate a block of memory >> and then draw that block to the window? > >The function createDIB does exactly that - it creates 2, 16 or 256 bit color >bitmaps from data. > >Hope this helps! > >-- David Cuny I can't figure out where to look for the actual address to write to. Can you help me out? I assume that I have to use another routine to actualy get the DIB to show up in the window, is that correct? -mark
4. Re: Win32lib Pixmap
- Posted by David Cuny <dcuny at LANSET.COM> Jun 28, 1999
- 446 views
Mark wrote: > I can't figure out where to look for the actual address > to write to. It would help if you had a good Win32 programming text; I *think* the latest Petzold book goes into DIBs in mind-numbing detail. You should also have the Win32 Programmer's Reference, which is available through a link on the RDS site. The GetObject function can be used to obtain a filled-in DIBSECTION, which contains the header information of the DIB. The first chunk of information is a BITMAP section, which contains a pointer to the bits. You can also use the GetDIBits/SetDIBits function to get and set bits. > I assume that I have to use another routine to actually > get the DIB to show up in the window, is that correct? The Win32Lib function drawBitmap is used, which does a lot of setup, and then calls BitBlt to display the DIB. Hope this helps! Coding the bitmap stuff was one of the most difficult parts of Win32Lib. -- David Cuny