vc的PICTURE控件怎么用?我想按下一个 按钮之后,picture中的图片就变了
1个回答
2011-10-29
展开全部
原型:
int WINAPI icePub_dispImg(HWND hWnd,char *strImgFilename,int x,int y)
输入:hWnd 窗体或控件句柄
strImgFilename 待显示的图片文件名
x x坐标
y y坐标
输出:
{
typedef int (WINAPI ICEPUB_DISPIMG)(HWND hWnd,char *strImgFilename,int x,int y);
ICEPUB_DISPIMG *icePub_dispImg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispImg = (ICEPUB_DISPIMG *)GetProcAddress(hDLLDrv, "icePub_dispImg");
}
if(icePub_dispImg != NULL)
icePub_dispImg(m_hWnd,"b.png",10,10);
// icePub_dispImg(m_ctrlText.m_hWnd,"b.jpg",0,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
int WINAPI icePub_dispImg(HWND hWnd,char *strImgFilename,int x,int y)
输入:hWnd 窗体或控件句柄
strImgFilename 待显示的图片文件名
x x坐标
y y坐标
输出:
{
typedef int (WINAPI ICEPUB_DISPIMG)(HWND hWnd,char *strImgFilename,int x,int y);
ICEPUB_DISPIMG *icePub_dispImg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispImg = (ICEPUB_DISPIMG *)GetProcAddress(hDLLDrv, "icePub_dispImg");
}
if(icePub_dispImg != NULL)
icePub_dispImg(m_hWnd,"b.png",10,10);
// icePub_dispImg(m_ctrlText.m_hWnd,"b.jpg",0,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
追问
还有简单一点的吗
追答
extern "C"
{
__declspec(dllexport)
int WINAPI icePub_dispImg(HWND hWnd,char *strImgFilename,int x,int y);
}
#pragma comment(lib,"icePubDll.lib")
icePub_dispImg(m_hWnd,"b.png",10,10);
参考资料: icePubDll搜索之
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询