eskin@btree.uucp (Michael Eskin) (02/28/90)
We are in the process of porting some Macintosh code to Windows and are having some trouble with bitmaps. On the Macintosh, I an able to setup a bitmap that points to a particular address in memory and then BLT to or from that bitmap. In the application we are writing, a buffer containing bitmap data, and the organization of that data are being passed to a routine that wants to BLT that data either to another location in memory or to a window. Is it possible to create a device context for the source bitmap and then associate the buffer memory with that context without having Windows allocate the bits when the device context is created? The application that we are writing is designed to be platform independent until the BLT, so there really isn't a concept of a device context for Windows until the BLT routine is called. We have been fighting with this problem for a few months without much luck so any help would be greatly appreciated! Michael Eskin Brooktree Imaging SBU (619) 535-3476
bturner@hpcvlx.cv.hp.com (Bill Turner) (03/01/90)
> We are in the process of porting some Macintosh code to Windows and are > having some trouble with bitmaps. On the Macintosh, I an able to setup > a bitmap that points to a particular address in memory and then BLT to > or from that bitmap. In the application we are writing, a buffer > containing bitmap data, and the organization of that data are being > passed to a routine that wants to BLT that data either to another > location in memory or to a window. Is it possible to create a device > context for the source bitmap and then associate the buffer memory with > that context without having Windows allocate the bits when the device > context is created? Once the memory DC has been created, you can use SelectObject(hMemDC, hBitmap) to change the bitmap used, just as you would with any other drawing object. --Bill Turner (bturner@hp-pcd.hp.com) HP Interface Technology Operation