⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uc_save.h

📁 This package consists of the executable (UCW), a default script file, this file, and the library fi
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -