remove paint::gadget
This commit is contained in:
@@ -845,13 +845,13 @@ namespace paint
|
||||
BITMAPFILEHEADER bmFileHeader = { 0 };
|
||||
bmFileHeader.bfType = 0x4d42; //bmp
|
||||
bmFileHeader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
|
||||
bmFileHeader.bfSize = bmFileHeader.bfOffBits + imageBytes;
|
||||
bmFileHeader.bfSize = bmFileHeader.bfOffBits + static_cast<DWORD>(imageBytes);
|
||||
|
||||
HANDLE hFile = ::CreateFileW(static_cast<std::wstring>(::nana::charset(file_utf8, ::nana::unicode::utf8)).data(), GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
DWORD dwWrite = 0;
|
||||
::WriteFile(hFile, &bmFileHeader, sizeof(BITMAPFILEHEADER), &dwWrite, nullptr);
|
||||
::WriteFile(hFile, &bmpInfo.bmiHeader, sizeof(BITMAPINFOHEADER), &dwWrite, nullptr);
|
||||
::WriteFile(hFile, pData, imageBytes, &dwWrite, nullptr);
|
||||
::WriteFile(hFile, pData, static_cast<DWORD>(imageBytes), &dwWrite, nullptr);
|
||||
::CloseHandle(hFile);
|
||||
|
||||
::DeleteObject(hBmp);
|
||||
|
||||
Reference in New Issue
Block a user