Other file formats under Windows
I have wrote a game which uses the .PCX format to load it''s images. I wrote my own decoder and such. I have no problem with directx. However, I am making an editor and I would like to load these pcx pictures and display them using the Device Context/Windows API. The problem is, all windows calls are built around the BMP format. So, I guess I need to load my pcx files in and convert them to a bitmap format before I can display them. I have no idea how to do this. I have tried using the CBitmap class and its SetBits/CreateBitmap calls, but this is not working. I don''t want to have to save my images in both formats since that would be a waste of space. I suppose I could have my game use bmp files, but it is already written around the pcx format. Any ideas?
Abs
Easiest way would be to create a device context for the image and then load in the pcx to the HDC pixel by pixel.
Not necessarily efficient, but easy.
Not necessarily efficient, but easy.
![Resist Windows XP''s Invasive Production Activation Technology!](http://druidgames.cjb.net/Out_Source/resist.jpg)
BetaShare - Run Your Beta Right!
Just create a BITMAP structure - it's format is quite simple, then use CreateBitmapIndirect() to create a HBITMAP from that, then it's simple to BitBlt to the DC you want.
War Worlds - A 3D Real-Time Strategy game in development.
Edited by - Dean Harding on May 21, 2001 1:29:18 AM
War Worlds - A 3D Real-Time Strategy game in development.
Edited by - Dean Harding on May 21, 2001 1:29:18 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement