https://blog.csdn.net/weixin_41794771/article/details/93198098
讲解地址
// 1获取窗口句柄 winName 窗口名字 HWND win_handle = FindWindow(0, winName); // 2 用来确定窗口在屏幕中的显示位置 HWND_TOPMOST 左上角点坐标 x y 图像宽度 高度 SWP_SHOWWINDOW显示图片 SetWindowPos(win_handle, HWND_TOPMOST, 0 ,0, SCREENWIDTH, SCREENHEIGHT, SWP_SHOWWINDOW); //设置窗口位置和大小 // 3 改变窗口风格 GWL_STYLE 无边框格式 SetWindowLong(win_handle, GWL_STYLE, GetWindowLong(win_handle, GWL_EXSTYLE | WS_EX_TOPMOST)); //改变窗口风格 // 4 将设置用用在窗口上 ShowWindow(win_handle, SW_SHOW);
原文:https://www.cnblogs.com/kekeoutlook/p/11681960.html