简体   繁体   English

Windows窗口对接

[英]Windows window docking

I'm wondering how to dock / snap a window to the side of the screen in Windows, preferably with straight Win32 API. 我想知道如何在Windows中将窗口停靠/捕捉到屏幕的一侧,最好是使用直接的Win32 API。 The effect I'm looking for is like the task bar -- a window that has a reserved space on screen, so that maximizing another window makes that window take up the rest of the screen, but leaves my window in place and visible. 我正在寻找的效果就像任务栏 - 一个在屏幕上有一个保留空间的窗口,这样最大化另一个窗口会使该窗口占据屏幕的其余部分,但会使我的窗口保持原位并可见。

I know various IM clients do this, but haven't been able to find any resources on how to do it. 我知道各种IM客户端都这样做,但是找不到任何关于如何做的资源。 Not sure what the appropriate name for it is either. 不确定它的名称是什么。

Edit: "Application Desktop Toolbar" is the search term to use to find info on this. 编辑:“应用程序桌面工具栏”是用于查找此信息的搜索词。

IIUYC you're looking for an app bar (MS-officially "Application Desktop Toolbar"). IIUYC您正在寻找一个应用栏(MS官方的“应用桌面工具栏”)。 You can indeed create these with the Windows API. 您确实可以使用Windows API创建这些。

"App Bar" - you turn a window into an App Bar by sending the ABM_NEW message. “App Bar” - 您通过发送ABM_NEW消息将窗口变为App Bar。 Examples on MSDN: MSDN上的示例:

http://msdn.microsoft.com/en-us/library/cc144177(VS.85).aspx http://support.microsoft.com/kb/134206 http://msdn.microsoft.com/en-us/library/cc144177(VS.85).aspx http://support.microsoft.com/kb/134206

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM