-
Автор темы
- #1
hello.cpp:
#include <iostream>
#include <windows.h>
void PrintFullScreenText(const std::string& text) {
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
int screenHeight = GetSystemMetrics(SM_CYSCREEN);
HWND windowHandle = CreateWindowExA(WS_EX_TOPMOST, "STATIC", text.c_str(), WS_POPUP | WS_VISIBLE, 0, 0, screenWidth, screenHeight, nullptr, nullptr, nullptr, nullptr);
HDC hdc = GetDC(windowHandle);
HFONT font = CreateFontA(60, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, "Arial");
SelectObject(hdc, font);
SetTextColor(hdc, RGB(255, 0, 0));
MSG msg;
while (GetMessage(&msg, nullptr, 0, 0) > 0) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
DeleteObject(font);
ReleaseDC(windowHandle, hdc);
DestroyWindow(windowHandle);
}
int main() {
PrintFullScreenText("Hello, bro");
return 0;
}
по приколу создал)))