English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have the bitmaps drawn out i just need to include them! I cant find out how. Ive seen some code but it had no explanation and I dont understand. Please help

2006-07-01 15:38:16 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

Hmm you need to open the bitmap and then you would need to get a pointer from that bitmap. I don't know where you want to include them but here is how you load the bitmap:

// Loads A Bitmap Image
AUX_RGBImageRec *LoadBMP(char *Filename) {
// File Handle
FILE *File=NULL;
// Make Sure A Filename Was Given
if (!Filename)
{
// If Not Return NULL
return NULL;
}
// Check To See If The File Exists
File=fopen(Filename,"r");
if (File) // Does The File Exist?
{
// Close The Handle
fclose(File);
// Load The Bitmap And Return A Pointer
return auxDIBImageLoad(Filename);
}
// If Load Failed Return NULL
return NULL;
}


The above function loads the bitmap and returns the pointer. So I don't know how you are going to use it, but if it is a simple mfc or a windows layout you would just bind the pointer to some object you created.

2006-07-01 15:52:42 · answer #1 · answered by ? 6 · 0 0

(windows??) Visual C++ ? -> Picturebox
http://programmersheaven.com
http://codeproject.com

2006-07-02 00:12:05 · answer #2 · answered by hB 2 · 0 0

fedest.com, questions and answers