deleting this bitmap
in a large programme i'm making i've decided to display an image, but i don't want it be seen forever so i wondered if anybody knew how the deleting the image that is displayed from the code below.
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static BITMAPFILEHEADER *pbmfh;
static BITMAPINFO *pbmi;
static BYTE *pBits;
static int cxDib, cyDib;
DWORD dwFileSize, dwHighSize, dwBytesRead;
hFile = CreateFile ("E:\\image.BMP", GENERIC_READ,
dwFileSize = GetFileSize (hFile, &dwHighSize);
pbmfh = (BITMAPFILEHEADER *) malloc (dwFileSize);
ReadFile (hFile, pbmfh, dwFileSize,
pbmi = (BITMAPINFO *) (pbmfh + 1);
pBits = (BYTE *) pbmfh + pbmfh->bfOffBits;
cxDib = pbmi->bmiHeader.biWidth;
cyDib = abs(pbmi->bmiHeader.biHeight);
hdc = GetDC (hwnd);
ReleaseDC (hwnd, hdc);
whoops never mind, i found out how to.
cool.. I have the same question.. i'm thinking about coding up a game of texas holdem'.. and I want to display and remove bitmap images of cards.. I was thinking about using InvalidateRect( ) to repaint the entire window.. but this seems kinda inefficient.. what method did you use?
i used a whole different way. I used resources.
And then to delete it i used deleteobject()