Home > Software engineering >  How mouse events to get the data value is sent to the superior text box?
How mouse events to get the data value is sent to the superior text box?

Time:10-08

 void CCustomMouseListener: : onm ouseEventSeries (CChartMouseListener: : MouseEvent MouseEvent, CPoint point, 
CChartSerieBase * pSerie, unsigned uPointIndex)
{
//double XValue=https://bbs.csdn.net/topics/0.0;
If (mouseEvent==CChartMouseListener: : LButtonDown & amp; &
UPointIndex!=INVALID_POINT)
{
TChartStringStream ssText;

SChartXYPoint Point=pSerie - & gt; GetPoint (uPointIndex);
XValue=https://bbs.csdn.net/topics/Point.X;
SsText & lt; <_T (" X "(value=https://bbs.csdn.net/topics/) <MessageBox (NULL, strText.
C_str (), pSerie - & gt; GetName (). C_str (), MB_OK);
//XXValue=https://bbs.csdn.net/topics/Point.X;
}
}

Get XValue values come up with a text box now

CodePudding user response:

No one is a top urgent request

CodePudding user response:

Get the parent dialog box handle, send a message to a dialog box

CodePudding user response:

 CWnd * pParent=GetParent (); 
If (pParent)
{
PParent - & gt; SetDlgItemText (IDC_EDIT1, strVal);
}

CodePudding user response:

The
reference 3 floor zgl7903 response:
 CWnd * pParent=GetParent (); 
If (pParent)
{
PParent - & gt; SetDlgItemText (IDC_EDIT1, strVal);
}


Don't know why don't use the CWnd * pParent=GetParent ();
Displays an error now use
The CWnd * pWnd=AfxGetMainWnd ();
PWnd - & gt; SetDlgItemText (IDC_EDIT1 strstrVal);
Ok thank you

CodePudding user response:

The CWnd * pParent=GetParent ();
If (pParent)
{
PParent - & gt; SetDlgItemText (IDC_EDIT1, strVal);
}
  • Related