First load it.
if it's in a resource:
HBITMAP hbmp;
hbmp = LoadBitmap(hInst, "image.bmp");
//hInst is just your HINSTANCE, use
//the first paramater to your WinMain
//function
if it's just a file NOTE only win95+)
HBITMAP hbmp;
hbmp = (HBITMAP)LoadImage(hInst, "image.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
next to load it into an HDC.
hdc BitmapHDC, hdc;
hdc = GetDC(hwnd);
BitmapHDC = CreateCompatibleDC(hdc);
SelectObject(BitmapHDC, hbmp);
// hwnd is the HWND you used for your
// CreateWindow call. It helps
// to make this variable global.
Finally, when you want to display your bitmap, here's how you do it:
BitBlt(hdc,
int nXDest,
int nYDest,
int nWidth,
int nHeight,
BitmapHDC,
int nXSrc,
int nYSrc,
SRCCOPY
);
// ok, hdc is the same one from above.
// xDest is the x coord of where you blit to
// yDest is the y coord of where you blit to
// nWidth is the width of your image
// nHeight is the height of your image
// XSrc is the x coord of where you get from your image, usually 0.
// YSrc is the y coord of where you get from your image, usually 0.
and that's it. When your closing your app, do the following to clean up any memory you allocated:
ReleaseDC(hwnd, BitmapHDC);
ReleaseDC(hwnd, hdc);
DeleteDC(BitmapHDC);
DeleteDC(hdc);