-
April 20th, 2009, 11:13 AM
#1
Tooltip on a rectangular area
Hello,
I'm trying to add a rectangular area as a tool to a tooltip control.
It's working without a problem...
When I tried to put a button inside this rectangular area and I hovered the mouse over the button - the tooltip disappear.
I read the whole documentation about tooltips, and I know I should relay the button messages to the tooltip control, but still it doesn't work.
How can I make the whole area including the button a tooltip dispatchable?
Thank you,
InfraRed.
Please rate my post, if it helped you.
-
April 20th, 2009, 12:00 PM
#2
Re: Tooltip on a rectangular area
If you are using MFC, create a CToolTipCtrl
-
April 20th, 2009, 01:39 PM
#3
Re: Tooltip on a rectangular area
InfraRed.
Please rate my post, if it helped you.
-
April 20th, 2009, 08:07 PM
#4
Re: Tooltip on a rectangular area
I would make a separate tooltip for the BUTTON, with the same information.
-
April 22nd, 2009, 03:49 AM
#5
Re:Forth Point Rectangle Point from Third point
POINT fn_drawRectangle(POINT P1,POINT P2,POINT P3);
double fn_getDistance(POINT P,POINT Q);
void fn_Reorder(POINT &P1,POINT &P2,POINT &P3);
POINT CRectanglePointerDlg::fn_drawRectangle(POINT P1,POINT P2,POINT P3)
{
fn_Reorder(P1, P2, P3);//reoder
POINT P4;
double distanceP1P2X,distanceP1P2Y,distanceP2P3X,distanceP2P3Y;
distanceP1P2X=abs(P1.x-P2.x);
distanceP1P2Y=abs(P1.y-P2.y);
distanceP2P3X=abs(P2.x-P3.x);
distanceP2P3Y=abs(P2.y-P3.y);
int intLengthP2P3,intLengthP1P3,intLengthP1P2;
intLengthP2P3 = fn_getDistance(P2,P3);//find distance b/n 2 point for middle point
intLengthP1P3= fn_getDistance(P1,P3);
intLengthP1P2= fn_getDistance(P1,P2);
if(intLengthP2P3>intLengthP1P3)
{
if(intLengthP2P3>intLengthP1P2)
{
if(P1.y<P2.y)
{
P4.x=abs(distanceP1P2X+P3.x);
P4.y=abs(distanceP1P2Y+P3.y);
}
else
{
P4.x=abs(distanceP1P2X+P3.x);
P4.y=abs(distanceP1P2Y-P3.y);
}
}
else
{
if(P3.y>P2.y)
{
P4.x=abs(distanceP2P3X-P1.x);
P4.y=abs(distanceP2P3Y-P1.y);
}
else
{
P4.x=abs(distanceP2P3X-P1.x);
P4.y=abs(distanceP2P3Y+P1.y);
}
}
}
else
{
if(intLengthP1P3>intLengthP1P2)
{
if(P2.y<P1.y)
{
P4.x=abs(distanceP1P2X-P3.x);
P4.y=abs(distanceP1P2Y+P3.y);
}
else
{
P4.x=abs(distanceP1P2X-P3.x);
P4.y=abs(distanceP1P2Y-P3.y);
}
}
else
{
if(P3.y>P2.y)
{
P4.x=abs(distanceP2P3X-P1.x);
P4.y=abs(distanceP2P3Y-P1.y);
}
else
{
P4.x=abs(distanceP2P3X-P1.x);
P4.y=abs(distanceP2P3Y+P1.y);
}
}
}
return P4;
}
double CRectanglePointerDlg::fn_getDistance(POINT P,POINT Q)
{
double dDistance;
dDistance = sqrt((Q.x - P.x)*(Q.x - P.x)+(Q.y - P.y)*(Q.y - P.y));
return dDistance;
}
void CRectanglePointerDlg::fn_Reorder(POINT &P1,POINT &P2,POINT &P3)
{
POINT arrayPoint[4];
arrayPoint[0]=P1;
arrayPoint[1]=P2;
arrayPoint[2]=P3;
for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{
//int ii=i+1;
if(arrayPoint[j].x>arrayPoint[j+1].x)
{
int inttempx,inttempy;
inttempx=arrayPoint[j].x;
inttempy=arrayPoint[j].y;
arrayPoint[j].x=arrayPoint[j+1].x;
arrayPoint[j].y=arrayPoint[j+1].y;
arrayPoint[j+1].x=inttempx;
arrayPoint[j+1].y=inttempy;
}
}
}
P1=arrayPoint[0];
P2=arrayPoint[1];
P3=arrayPoint[2];
}
-
April 22nd, 2009, 05:00 AM
#6
Re: Forth Point Rectangle Point from Third point
Originally Posted by softmuthu84
POINT fn_drawRectangle(POINT P1,POINT P2,POINT P3);
double fn_getDistance(POINT P,POINT Q);
void fn_Reorder(POINT &P1,POINT &P2,POINT &P3);
...
What does your post "Forth Point Rectangle Point from Third point" with an absolutely unreadable code have to do with the OP's problem "Tooltip on a rectangular area"?
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|