16,729
社区成员
GPT说Qt::Tool类型不会覆盖任务栏,但依然覆盖了。
想要实现的效果:
直接置顶的效果:
第二张图点击任务栏就能成第一张图的效果,但再点一下模型,就又上来了。
换句话说想让这个窗口在所有其他窗口之上、任务栏之下。
不论使Qt还是Win32,置顶都置于了任务栏之上。
救救孩子吧,谢谢大佬们!!
置顶就是会覆盖任务栏, 但可以重写相关事件虚函数,使窗口在移动到任务栏的时候调整窗口高度,实现不覆盖任务栏的效果
SystemParametersInfo
The SystemParametersInfo function queries or sets systemwide parameters. This function can also update the user profile while setting a parameter.
BOOL SystemParametersInfo(
UINT uiAction, // system parameter to query or set
UINT uiParam, // depends on action to be taken
PVOID pvParam, // depends on action to be taken
UINT fWinIni // user profile update flag
);
Parameters
uiAction
Specifies the systemwide parameter to query or set. This parameter can be one of the following values: Value Meaning
SPI_GETWORKAREA Retrieves the size of the work area on the primary display monitor. The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. The pvParam parameter must point to aRECT structure that receives the coordinates of the work area, expressed in virtual screen coordinates.