Author: Bob MastaBob Masta
Date: Feb 23, 2008 05:11
Tool Tips don't normally appear for disabled controls.
As a fall-back, I normally provide for right-click to pop up Help on
all controls, including disabled ones, but sometimes that's overkill:
A simple Tool Tip could tell a new user what the control does, and
that may be enough for them to understand why it's disabled at the
time.
There are good reasons why the Tool Tip mechanism can't deal with
disabled controls, and I've seen some work-arounds discussed.
Here is a dead-simple one I've come up with: Just create a static
control with no text that has the same coordinates, and give it the
SS_NOTIFY style. Put it ahead of the target control in the resource
order, so the target control will be drawn over it. (If you put it
later, it will erase the target control.) Then set the Tool Tip to
that static control instead of the true target. That's it!
Hope this helps...
Bob Masta
|