我想在屏幕右下角(任务栏上方)显示我的 TopMost 窗口
这是我尝试过的:
this->SetWindowPos(&this->wndBottom, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
显示在屏幕中央
最佳答案
使用 SystemParametersInfo(SPI_GETWORKAREA...)
找到桌面矩形(不包括工具栏的区域)然后使用 SWP_NOSIZE
标志设置窗口位置:
CRect rcDesktop;
::SystemParametersInfo(SPI_GETWORKAREA, NULL, &rcDesktop, NULL);
CRect rw;
GetWindowRect(&rw);
SetWindowPos(0, rcDesktop.right - rw.Width(), rcDesktop.bottom - rw.Height(), 0, 0,
SWP_NOSIZE);
关于c - 在屏幕右下角显示窗口(任务栏上方),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35534346/