vc sdk程序错在哪里了??
还没写完的函数系统就编译报错!!intququyucunruneicun(){BITMAPINFOneicunjiegou01,neicunjiegou02,neicun...
还没写完的函数系统就编译报错!!
int ququyucunruneicun()
{
BITMAPINFO neicunjiegou01,neicunjiegou02,neicunjiegou03;
HDC quanpingjubing=GetDC(0);
int *ppv01;
int *ppv02;
int *ppv03;
HBITMAP timeneicun01 = CreateDIBSection(quanpingjubing, &neicunjiegou01, DIB_RGB_COLORS,(void **)&ppv01, NULL, 0);
HBITMAP timeneicun02 = CreateDIBSection(quanpingjubing, &neicunjiegou02, DIB_RGB_COLORS,(void **)&ppv02, NULL, 0);
HBITMAP timeneicun03 = CreateDIBSection(quanpingjubing, &neicunjiegou03, DIB_RGB_COLORS,(void **)&ppv03, NULL, 0);
BitBlt(timeneicun01,0,0,30,30,quanpingjubing,0,0,SRCCOPY);
return 1;
}
error C2664: 'BitBlt' : cannot convert parameter 1 from 'HBITMAP' to 'HDC'
刚接触HBITMAP和BitBlt这两个函数,不太会用,,,请高人指点啊,,
函数目的就是想把当前屏幕的一块区域写到HBITMAP函数建立的内存块里。。怎么会错呢!! 展开
int ququyucunruneicun()
{
BITMAPINFO neicunjiegou01,neicunjiegou02,neicunjiegou03;
HDC quanpingjubing=GetDC(0);
int *ppv01;
int *ppv02;
int *ppv03;
HBITMAP timeneicun01 = CreateDIBSection(quanpingjubing, &neicunjiegou01, DIB_RGB_COLORS,(void **)&ppv01, NULL, 0);
HBITMAP timeneicun02 = CreateDIBSection(quanpingjubing, &neicunjiegou02, DIB_RGB_COLORS,(void **)&ppv02, NULL, 0);
HBITMAP timeneicun03 = CreateDIBSection(quanpingjubing, &neicunjiegou03, DIB_RGB_COLORS,(void **)&ppv03, NULL, 0);
BitBlt(timeneicun01,0,0,30,30,quanpingjubing,0,0,SRCCOPY);
return 1;
}
error C2664: 'BitBlt' : cannot convert parameter 1 from 'HBITMAP' to 'HDC'
刚接触HBITMAP和BitBlt这两个函数,不太会用,,,请高人指点啊,,
函数目的就是想把当前屏幕的一块区域写到HBITMAP函数建立的内存块里。。怎么会错呢!! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询