uc_save.h
来自「Welcome to UnderC version 1.2.9w This」· C头文件 代码 · 共 36 行
H
36 行
#include <iostream>
#include <windows.h>
class RestoreUCWin {
RestoreUCWin()
{
HWND h = GetActiveWindow();
if (! h) return;
RECT rt;
std::ifstream in("/_pos.txt");
if (in) {
in >> rt.left >> rt.top >> rt.right >> rt.bottom;
MoveWindow(h,rt.left,rt.top,rt.right-rt.left,rt.bottom-rt.top,1);
}
}
~RestoreUCWin()
{
HWND h = GetActiveWindow();
if (! h) return;
RECT rt;
GetWindowRect(h,&rt);
std::ofstream out("/_pos.txt");
out << rt.left << ' ' << rt.top << ' ' << rt.right << ' ' << rt.bottom << std::endl;
}
};
RestoreUCWin __uc__;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?