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)
}
TCanvas *ca=new TCanvasGraphics::TBitmap b1=new Graphics::TBitmap()
Graphics::TBitmap b2=new Graphics::TBitmap()
Graphics::TBitmap b3=new Graphics::TBitmap()
b1->Picture->LoadFromFile(pic1)
b2->Picture->LoadFromFile(pic2)
b3->Picture->Width=b1->Picture->简枝橘Width+b2->Picture->Width//此处可以耕具实拦团际情况更改
b3->Picture->Height=b1->Height>b2->Height?b1->Height:b2->Height处可以耕具实际情况更改
b3->Canvas->CopyRect(b1->ClientRect,b1->ClientRect,scrCopy)
b3->搭羡Canvas->CopyRect(TRect(b1->Width,0,b1->Width+b2->Width,b2->Height),b2->ClientRect,scrCopy)
b3->Picture->SaveToFile(pic3)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)