有人了解classin么
如果是学生党的话,一上课就专注学习模式,真是太疯狂开心了。
直接上代码:
#include<iostream>
#include<windows.h>
using namespace std;
void Topper()
{
HWND hWnd = ::GetForegroundWindow();
if (::GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
{
::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
else
{
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
}
int main()
{
system("mode con cols=15 lines=1");
Sleep(7500);
Topper();
return 0;
}
用法:先打开此程序,再打开强制置顶的程序,等个十秒,就解除置顶了