mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
VirtualDesktops: Replace std::fstream with C file functions
This commit is contained in:
parent
bdb5605d24
commit
7cdd6853aa
@ -19,7 +19,6 @@
|
|||||||
#include "DexpotMeasure.h"
|
#include "DexpotMeasure.h"
|
||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include "DexpotConstants.h"
|
#include "DexpotConstants.h"
|
||||||
#include "../../Library/Export.h"
|
#include "../../Library/Export.h"
|
||||||
@ -452,13 +451,13 @@ void DexpotScreenshotMeasure::UpdateScreenshot()
|
|||||||
bmfh.bfSize = bmfh.bfOffBits + nBytes;
|
bmfh.bfSize = bmfh.bfOffBits + nBytes;
|
||||||
bmfh.bfType = 0x4d42;
|
bmfh.bfType = 0x4d42;
|
||||||
|
|
||||||
std::ofstream ofs(OutputFile.c_str(), std::ios_base::binary);
|
FILE* file = _wfopen(OutputFile.c_str(), L"wb");
|
||||||
if (ofs)
|
if (file)
|
||||||
{
|
{
|
||||||
ofs.write((char*) &bmfh, sizeof(BITMAPFILEHEADER));
|
fwrite(&bmfh, sizeof(BITMAPFILEHEADER), 1, file);
|
||||||
ofs.write((char*) &bmi, sizeof(BITMAPINFOHEADER));
|
fwrite(&bmi, sizeof(BITMAPINFOHEADER), 1, file);
|
||||||
ofs.write((char*) ScaledBytes, nBytes);
|
fwrite(ScaledBytes, nBytes, 1, file);
|
||||||
ofs.close();
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject(MemDC, OldBitmap);
|
SelectObject(MemDC, OldBitmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user