LoadImage(szFileName, IMAGE_BITMAP, x, y, LR_LOADFROMFILE);
解决方案 »
- 在BHO中怎么像指定的页面中的指定位置插入一段JS代码
- 请问在C++中有什么库可以完成使用http协议通信
- MFC基于对话框里面创建了一个Static Text,然后当鼠标移到一个指定的边缘区(Static Text里面),就会自动弹出一个Combo Box(就像QQ那样)
- 聊天程序求助!
- 越过对象的protected的属性, 实现对protected对象的访问 是怎么样实现的??????
- 马上给分:如何在InstallShield中注册字体?
- CDialog里的Picture Control控件不能响应OnLButtonDown吗???急~~~
- 谁给我做一个屏幕取词的软件,像金山词霸一样,但我要取一个软件的Listbox中一某一行的值
- 请教一个DAO,到ODBC的问题
- all references to "comdlg32.dll" discarded by /OPT:REF
- 用VC开发了一个工程,已经完成,现在要把它做成可以发行的软件,怎么做,有没有人知道?
- 如何让在Win2000下开发的程序可以在Win98下运行?
Set Picture1.Picture = LoadPicture("filename")
m_LOGOPICTURE.SetBitmap(::LoadBitmap(NULL,"Forset.bmp"));
m_LOGOPICTURE.ShowWindow(SW_SHOW);
没有反应,请继续指点
告诉你了用LoadImage(szFileName, IMAGE_BITMAP, x, y, LR_LOADFROMFILE);CStatic m_LOGOPICTURE;
m_LOGOPICTURE.SetBitmap(LoadImage("Forset.bmp", IMAGE_BITMAP, x, y, LR_LOADFROMFILE));
m_LOGOPICTURE.ShowWindow(SW_SHOW);
error C2660: 'LoadImageA' : function does not take 5 parameters
CStatic m_LOGOPICTURE;
m_LOGOPICTURE.SetBitmap( NULL,LoadImage("Forset.bmp", IMAGE_BITMAP, x, y, LR_LOADFROMFILE));
m_LOGOPICTURE.ShowWindow(SW_SHOW);
SetBitmap的参数又不对了,大虾们请了请了
The LoadImage function loads an icon, cursor, or bitmap.HANDLE LoadImage(
HINSTANCE hinst, // handle of the instance containing the image
LPCTSTR lpszName, // name or identifier of image
UINT uType, // type of image
int cxDesired, // desired width
int cyDesired, // desired height
UINT fuLoad // load flags
);LR_LOADFROMFILE Loads the image from the file specified by the lpszName parameter. If this flag is not specified, lpszName is the name of the resource
CStatic m_LOGOPICTURE;
m_LOGOPICTURE.SetBitmap( NULL,LoadImage(NULL,"Forset.bmp", IMAGE_BITMAP, x, y, LR_LOADFROMFILE));
m_LOGOPICTURE.ShowWindow(SW_SHOW);
{
CFile file;
if(!file.Open(FileName,CFile::modeRead|CFile::shareDenyNone))
return; WORD bfType;
DWORD bfSize;
file.Read(&bfType,sizeof(WORD));
file.Read(&bfSize,sizeof(DWORD));
file.Seek(2*sizeof(WORD),CFile::current);
DWORD bf0fBits;
file.Read(&bf0fBits,sizeof(DWORD));
int size=bf0fBits-14;
LPBITMAPINFO lpbitmapinfo;
lpbitmapinfo=(LPBITMAPINFO) new BYTE[size];
file.Seek(14,CFile::begin);
file.ReadHuge(lpbitmapinfo,size);
LPVOID pbitsrc;
pbitsrc=(LPVOID) new char[bfSize-bf0fBits];
if(pbitsrc==NULL)
{
delete lpbitmapinfo;
return;
}
file.ReadHuge(pbitsrc,bfSize-bf0fBits);
file.Close(); CRect arry;
GetClientRect(&arry);
HDRAWDIB hdd= ::DrawDibOpen();
::DrawDibBegin(hdd,pDC->m_hDC,lpbitmapinfo->bmiHeader.biWidth,
lpbitmapinfo->bmiHeader.biHeight,&lpbitmapinfo->bmiHeader,
lpbitmapinfo->bmiHeader.biWidth,
lpbitmapinfo->bmiHeader.biHeight,DDF_ANIMATE); ::DrawDibDraw(hdd,pDC->m_hDC,
10,//(arry.right - lpbitmapinfo->bmiHeader.biWidth)/2,
10,//(arry.bottom - lpbitmapinfo->bmiHeader.biHeight)/2,
lpbitmapinfo->bmiHeader.biWidth,
lpbitmapinfo->bmiHeader.biHeight,
&lpbitmapinfo->bmiHeader,
pbitsrc,0,0,
lpbitmapinfo->bmiHeader.biWidth,
lpbitmapinfo->bmiHeader.biHeight,
DDF_SAME_DRAW|DDF_SAME_HDC); ::DrawDibClose(hdd);
delete lpbitmapinfo;
delete pbitsrc;
}
CStatic::SetBitmap
HBITMAP SetBitmap( HBITMAP hBitmap );
参数不对呀