|Date:||April 5, 2007 / year-entry #119|
|Summary:||Here's a question that floated past my field of view some time ago: When the mouse hovers over a disabled window, the tooltip associated with that window does not appear. Why is this? Why isn't this documented in MSDN? Actually, you already know the answer, and it is documented. You just have to connect the...|
Here's a question that floated past my field of view some time ago:
Actually, you already know the answer, and it is documented. You just have to connect the dots.
When a window is disabled, it does not receive keyboard or mouse input. The documentation for
Next, how do tooltips know when to appear and disappear? Well, one way is to modify your window procedure so it takes all its input messages and forwards them to the tooltip control via the
Now put this all together. The tooltip control peeks at all the input destined for the tool window, either automatically via
This is also why you don't get tooltips for hidden windows and why you don't get tooltips when the mouse is captured to another window.
So you see, you knew the answer all along. You just didn't realize it.
<-- Back to Old New Thing Archive Index