非常非常奇怪的问题!BitBlt莫名其妙出错
北仙 2016-03-26 09:05:39 这是部分代码
DWORD ERROR1;
if(
!BitBlt(menuVRAMdc,rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,
NormalDC,rect.left,rect.top,SRCCOPY)
)
{
ERROR1=GetLastError();
printf("%d",ERROR1);
}
这种情况下,优化加到-O3,正常通过,不出错,BilBlt返回为true
但是如果,代码改为
DWORD ERROR1;
if(
!BitBlt(menuVRAMdc,rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,
NormalDC,rect.left,rect.top,SRCCOPY)
);
ERROR1=GetLastError();
printf("%d",ERROR1);
优化为-O3 BitBlt返回居然变为了false ,其它地方没有丝毫改动,GetLastError居然是183
感觉183是别处的错误,BitBlt的错误根本没有被得到
调了好几天了,一直不能解决