在MFC中最小化/最大化窗口时请求帮助以设置焦点 [英] Request for help to set the Focus when minimize/maximize the window in MFC
问题描述
我创建了工具提示。它的效果很好,除了当我最小化屏幕并且
最大化时,我将光标放在按钮上。首先它没有显示工具提示。当我点击UI时,如果我将光标悬停在按钮上,则会显示工具提示。
I have created the Tooltip. It works out well except that when i minimize the screen and maximize, then I place cursor over the button .At first its not showing the tool-tip. when i click on UI and if i hover cursor over the button, Tool-tips are shown up.
2 Windows。 Parent,基于Parent窗口单击操作,将打开子窗口。
我需要在子窗口中启用Button的工具提示。
2 Windows. Parent , Based on the Parent window click action, Child Window is opened.
I need to enable the Tooltip for Button in the Child window.
基于以下链接实现Button of Child窗口的工具提示
                      https://social.msdn.microsoft.com/Forums/en-US/ccd78d4a-9778-4cb2-b2d8-0986d3276ece/maximize-the-dialog-window?forum = vcmfcatl
https://social.msdn.microsoft.com/Forums/en-US/ccd78d4a-9778-4cb2-b2d8-0986d3276ece/maximize-the-dialog-window?forum=vcmfcatl
推荐答案
我真的不明白你在问什么。
I don't really understand what you are asking.
你说"如果我将光标悬停在按钮上方";在显示工具提示之前出现延迟是正常的。
You say "if i hover cursor over the button"; it is normal for there to be a delay before a tooltip is shown.
以下消息可能有所帮助:
The following messages might help:
- WM_ACTIVATE
- WM_ACTIVATEAPP
- WM_WINDOWPOSCHANGING
- WM_WINDOWPOSCHANGED
此外,您可以使用Spy ++来确定哪些消息是发送时间。
Also you can use Spy++ to determine what messages are sent when.
这篇关于在MFC中最小化/最大化窗口时请求帮助以设置焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!