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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.