?? subject_30022.htm
字號:
<p>
序號:30022 發(fā)表者:陳章民 發(fā)表日期:2003-02-19 13:48:34
<br>主題:如何獲得.bmp的圖形尺寸
<br>內(nèi)容:如何獲得.bmp的圖形尺寸<BR>CDC* CMap::LoadBitmap(char* _path)<BR>{<BR> char* path=new char[255];<BR> strcpy(path,BmpPath);<BR> strcat(path,_path);<BR> <BR> CDC* destdc;<BR> CBitmap* bitmap;<BR><BR> destdc = new CDC;<BR> bitmap = new CBitmap;<BR><BR> CClientDC dc(Window);<BR><BR> destdc->CreateCompatibleDC(&dc); <BR> bitmap->m_hObject = (HBITMAP)::LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);<BR> destdc->SelectObject(bitmap);<BR> <BR> delete bitmap;<BR> delete[] path;<BR><BR> return destdc;<BR>}
<br><a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回復(fù)者:tjhe 回復(fù)日期:2003-02-19 13:54:15
<br>內(nèi)容: destdc->CreateCompatibleDC(&dc); <BR> bitmap->m_hObject = (HBITMAP)::LoadImageNULL,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);<BR> BITMAP bm;<BR> bitmap->GetBitmap(&bm);<BR> //bm.bmWidth //寬度<BR> //bm.bmHeight //高度<BR> destdc->SelectObject(bitmap);<BR>
<br>
<a href="javascript:history.go(-1)">返回上頁</a><br><a href=http://www.copathway.com/cndevforum/>訪問論壇</a></p></blockquote>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -