📄 subject_30022.htm
字号:
<p>
序号:30022 发表者:陳章民 发表日期:2003-02-19 13:48:34
<br>主题:如何獲得.bmp的圖形尺寸
<br>内容:如何獲得.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>回复者:tjhe 回复日期:2003-02-19 13:54:15
<br>内容: 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -