在客户区外绘图,winAPI

发布于 2024-09-17 07:10:55 字数 71 浏览 4 评论 0原文

我如何在窗口的客户区之外和标题栏上绘制。我知道这是可以做到的,但我不确定如何有效地实施这一点。想想谷歌浏览器,标签位于标题栏上。

How would I draw outside the client area of a window, and on the title bar. I know it can be done, but I am unsure of how to implement this effectively. Think google chrome, where the tabs are on the title bar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

少女净妖师 2024-09-24 07:10:55

当 Windows 要求您绘制窗口中超出客户区域的部分时,它会向您发送一个 WM_NCPAINT 消息。处理该消息并绘制您想要的窗口非客户端部分。请参阅我链接的页面,了解如何获取可以利用的设备上下文的示例。

When Windows asks you to draw the portion of the window that is outside your client area, it will send you an WM_NCPAINT message. Handle that message and draw whatever you want the non-client portion of your window to be. See the page I linked for an example of how to get a device context you can draw upon.

若沐 2024-09-24 07:10:55

可能还值得一提 WM_NCHITTEST ,如果您计划自定义非客户端元素的位置。

It may be worth mentioning WM_NCHITTEST also, if you plan on customizing where non-client elements are located.

茶花眉 2024-09-24 07:10:55

绘制自定义窗口标题 DrawCaption

Drawing a custom window caption DrawCaption

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文