clean
This commit is contained in:
parent
fcfc8c2080
commit
84260fa5e9
@ -4,3 +4,4 @@
|
||||
#include "../functions/addWatermark.h"
|
||||
#include "../functions/captureScreen.h"
|
||||
#include "../functions/screenRecorder.h"
|
||||
#include "../functions/timeAdd.h"
|
@ -134,6 +134,7 @@
|
||||
<ClInclude Include="functions\addWatermark.h" />
|
||||
<ClInclude Include="functions\captureScreen.h" />
|
||||
<ClInclude Include="functions\screenRecorder.h" />
|
||||
<ClInclude Include="functions\timeAdd.h" />
|
||||
<ClInclude Include="Include\Include.h" />
|
||||
<ClInclude Include="Include\Options.h" />
|
||||
<ClInclude Include="Include\stdafx.h" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "addWatermark.h"
|
||||
#include "../Include/Include.h"
|
||||
|
||||
void screenRecorder(std::string file_video)
|
||||
{
|
||||
|
19
Overlay/functions/timeAdd.h
Normal file
19
Overlay/functions/timeAdd.h
Normal file
@ -0,0 +1,19 @@
|
||||
#include "../Include/Include.h"
|
||||
|
||||
void timeAdd(HWND hwnd){
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hwnd, &ps);
|
||||
TEXTMETRIC tm;
|
||||
GetTextMetrics(hdc, &tm);
|
||||
int x = 10;
|
||||
int y = tm.tmHeight + 10;
|
||||
|
||||
auto currentTime = std::chrono::system_clock::now();
|
||||
auto currentTime_t = std::chrono::system_clock::to_time_t(currentTime);
|
||||
|
||||
char timeStr[100];
|
||||
strftime(timeStr, 100, "Time: %H:%M:%S", std::localtime(¤tTime_t));
|
||||
|
||||
TextOut(hdc, x, y, timeStr, strlen(timeStr));
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
@ -35,21 +35,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hwnd, &ps);
|
||||
TEXTMETRIC tm;
|
||||
GetTextMetrics(hdc, &tm);
|
||||
int x = 10;
|
||||
int y = tm.tmHeight + 10;
|
||||
|
||||
auto currentTime = std::chrono::system_clock::now();
|
||||
auto currentTime_t = std::chrono::system_clock::to_time_t(currentTime);
|
||||
|
||||
char timeStr[100];
|
||||
strftime(timeStr, 100, "Time: %H:%M:%S", std::localtime(¤tTime_t));
|
||||
|
||||
TextOut(hdc, x, y, timeStr, strlen(timeStr));
|
||||
EndPaint(hwnd, &ps);
|
||||
timeAdd(hwnd);
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
|
Loading…
Reference in New Issue
Block a user