есть вот такой код:
| Код | void CChildView::OnFileOpen() { if(!this->GetFileFromUser()) return;
imgSize.cx = imgOriginal.GetWidth(); imgSize.cy = imgOriginal.GetHeight();
GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
UINT size = 0; PropertyItem* propertyItem = NULL; WCHAR* name = new WCHAR[fileName.GetLength()*2]; MultiByteToWideChar(CP_ACP, 0, fileName, -1, name, fileName.GetLength()*2); Image* tmpImg = new Image(name);
size = tmpImg->GetPropertyItemSize(PropertyTagImageDescription);
propertyItem = (PropertyItem*)malloc(size);
tmpImg->GetPropertyItem(PropertyTagImageDescription, size, propertyItem);
imgDescription = (WCHAR*)propertyItem->value;
delete tmpImg; free(propertyItem); GdiplusShutdown(gdiplusToken);
Invalidate(); UpdateWindow(); }
|
выдаёт ошибку вот тут:
| Код | Image* tmpImg = new Image(name);
|
ошибка:
| Код | j:\FibIm\ChildView.cpp(101): error C2660: 'Gdiplus::GdiplusBase::operator new' : function does not take 3 arguments
|
не могу понять в чём дело. |