C++中如何加载各种类型的图片

C++中怎么加载各种类型的图片
C++中应该怎么加载非btm的图片啊,例如jpeg,gif的图片,求大神教啊,
------最佳解决方案--------------------
用CImage类,或者用IStream
我是这么干的:
	CString sStartBmp = “C:\\startbmp\\start.jpg";
IStream *pStm = NULL; 
CFileStatus fstatus; 
CFile file; 
LONG cb; 
if (file.Open(sStartBmp,CFile::modeRead)&&file.GetStatus(sStartBmp,fstatus)&& ((cb = fstatus.m_size) != -1)) 

HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, cb); 
LPVOID pvData = NULL; 
if (hGlobal != NULL) 

if ((pvData = GlobalLock(hGlobal)) != NULL) 

file.ReadHuge(pvData, cb); 
GlobalUnlock(hGlobal); 
CreateStreamOnHGlobal(hGlobal, TRUE, &pStm); 


file.Close();
}

CRect rc;
GetClientRect(rc);
CDC memDC;
memDC.CreateCompatibleDC(pDC);
CBitmap bmp;
bmp.CreateCompatibleBitmap(pDC,rc.Width(),rc.Height()-30);
memDC.SelectObject(&bmp);
memDC.FillSolidRect(0,0,rc.Width(),rc.Height()-30,COLOR_AQUA);

if(pStm != NULL)
{
IPicture *pPic = NULL; 
if(SUCCEEDED(OleLoadPicture(pStm,fstatus.m_size,TRUE,IID_IPicture,(LPVOID*)&pPic))) 

OLE_XSIZE_HIMETRIC hmWidth; 
OLE_YSIZE_HIMETRIC hmHeight; 
pPic->get_Width(&hmWidth); 
pPic->get_Height(&hmHeight); 
pPic->Render(memDC,0,0,rc.Width(),rc.Height()-30,0,hmHeight,hmWidth,-hmHeight,NULL);
pPic->Release(); 

pStm->Release();
}
pDC->BitBlt(0,0,rc.Width(),rc.Height()-30,&memDC,0,0,SRCCOPY);


------其他解决方案--------------------
1.VC6.0只能加载bitmap icon cursor
2.VS05及以上版本,有使用ATL和MFC的共享类CImage,支持图片格式更多了jpg gif等
3.使用COM API OleLoadPicture来加载JPG、GIF格式的图片(注:不支持PNG格式,另外GIF只能加载第一帧,且不支持透明)
4.使用第三方开发库CXImage,包括BMP、 JPEG、 GIF、 PNG、 TIFF、 MNG、 ICO、 PCX、 TGA、 WMF、 WBMP、 JBG、 J2K等

CImage还是不错的
------其他解决方案--------------------

Image img(_T("C:\\123.jpg"));
Graphics g(dc.GetSafeHdc());
Point pt[3]={Point(0,0),Point(100,0),Point(0,100)};
g.DrawImage(&img,pt,3);

------其他解决方案--------------------
楼主可以在网络上搜索一下PictureEx类,它基本上可以满足你的需要
------其他解决方案--------------------
苦逼的vc6不支持image,飘过
------其他解决方案--------------------
谢谢大家,帮了我大忙了