Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Hints

Status
Not open for further replies.

mironto

Programmer
May 12, 2001
26
SK
I would like to draw my own hits for the application. How can I acquire some "canvas" or other drawing surface on which I could output my custom hints instead of the default ones?
 
Well if you just want to write your hints, you should set the Showhint property to true and set the Hint property to your custom hint.
But if you want more complex hints, like drawing on a canvas, you should probably write the OnMouseMove event for your form like this:

void __fastcall TForm1::FormMouseMove(TObject*Sender,TShiftState Shift, int X, int Y)
{
if(X >= Button1->Left &&
X<= Button1->Left + Button1- >Width &&
Y >= Button1->Top &&
Y<= Button1->Top + Button1->Height)
{
_sleep(0.5);
//draw the hint here
}
}

Assuming it's a hint for a button. I am almost sure their
is a OnMouseIn event, but I didn't had time to find it. Hope this helps.
 
there's no problem in calling the function for hint, but what I need is the canvas for drawing the hint on. Since the hint must "float" over all components of the form and even overlap the font, I cannot use canvas from any component on the form but to create my own canvas. The question is how.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top