this is samll code for dynamically loading the Bitmap Resource in Vc++ Program hdc = BeginPaint(hWnd, &ps);hdc = GetDC(hWnd); // remove this statementhbitmap = (HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);if(hbitmap==NULL){ // add thisMessageBox(hWnd,"coudnt load ", "error ", MB_OK);break; // replace it with return statement} // add this// this doesnt return NULL , so the image is getting loaded properly ????HDC hdcMem = CreateCompatibleDC(hdc); GetObject(hbitmap ,sizeof(bmp), &bmp);SelectObject(hdcMem, hbitmap); BitBlt(hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY); DeleteDC(hdcMem);EndPaint(hWnd, &ps);