谁遇到这个问题,使用GDI+中Image时返回OutOfMemory:
代码大概是这样:
Image * pImage=new Image(L".\\res\\common.png");
用pImage->GetLastStatus();返回的是OutOfMemory;
在MSDN上说
ResIf you construct a GDI+ object and then immediately call the GetLastStatus method of that object, you can determine whether the constructor succeeded or failed. In such cases, GetLastStatus might return OutOfMemory even though there was plenty of memory available to create the object. Several GDI+ constructors set the status to OutOfMemory when they fail regardless of the reason for failure.但MSDN好像没说怎么解决,谁遇到过的,给小弟说一下,