Click here to Skip to main content
15,909,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 7:01
Gary Kirkham13-Mar-03 7:01 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 8:52
Brent Lamborn13-Mar-03 8:52 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 9:03
Gary Kirkham13-Mar-03 9:03 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 9:13
Brent Lamborn13-Mar-03 9:13 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 9:08
Gary Kirkham13-Mar-03 9:08 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 11:06
Brent Lamborn13-Mar-03 11:06 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 11:10
Gary Kirkham13-Mar-03 11:10 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 11:19
Brent Lamborn13-Mar-03 11:19 
The output on the screen shows -9255 for every string no matter what is in my dblLabels array when I use a for loop. If I put the literal index in it works but that would be too many lines of code.

Heres the whole thing again just in case:


void CGraphView::OnBnClickedBtnplot()<br />
{<br />
	GetDlgItem(IDC_PICT)->GetWindowRect(pictRect);<br />
	ScreenToClient(pictRect);<br />
<br />
	//Array of label strings<br />
	CStringArray strLabels;<br />
	strLabels.SetSize(26);<br />
<br />
	//Array of double labels [1-26] one for each has mark<br />
	//Don't use all of them though<br />
	double* dblLabels = GetLabelVals();<br />
<br />
	for (int i = 1; i < 26; i++)<br />
		strLabels[i].Format("%.2f\n", dblLabels[i]);<br />
<br />
	SetDlgItemText(IDC_EDITINTERSECT, "INT"); <br />
	SetDlgItemText(IDC_EDITY1, strLabels[3]);<br />
	SetDlgItemText(IDC_EDITY2, strLabels[6]); <br />
	SetDlgItemText(IDC_EDITY3, strLabels[9]);<br />
	SetDlgItemText(IDC_EDITX1, strLabels[12]); <br />
	SetDlgItemText(IDC_EDITX2, strLabels[15]); <br />
	SetDlgItemText(IDC_EDITX3, strLabels[18]); <br />
	SetDlgItemText(IDC_EDITX4, strLabels[21]);<br />
	SetDlgItemText(IDC_EDITX5, strLabels[24]); <br />
	<br />
	InvalidateRect(pictRect);<br />
}


"It has become appallingly obvious that our technology has exceeded our humanity."
- Albert Einstein (1879-1955)

"I think there is a world market for maybe five computers."
- Thomas Watson (1874-1956), Chairman of IBM, 1943

"640K ought to be enough for anybody."
- Bill Gates (1955-), in 1981

"Half this game is ninety percent mental."
- Yogi Berra
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 11:40
Gary Kirkham13-Mar-03 11:40 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 17:19
Brent Lamborn13-Mar-03 17:19 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham14-Mar-03 2:09
Gary Kirkham14-Mar-03 2:09 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham14-Mar-03 2:33
Gary Kirkham14-Mar-03 2:33 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham14-Mar-03 2:35
Gary Kirkham14-Mar-03 2:35 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn15-Mar-03 10:37
Brent Lamborn15-Mar-03 10:37 
GeneralRe: Doubles to Strings for Edit Box Output Pin
TomKat14-Mar-03 15:07
TomKat14-Mar-03 15:07 
GeneralProxy Authentication (again) Pin
thowra13-Mar-03 5:07
thowra13-Mar-03 5:07 
GeneralRe: Proxy Authentication (again) Pin
thowra21-Mar-03 22:38
thowra21-Mar-03 22:38 
Generallittle question by a Win32 starter Pin
indiocolifa13-Mar-03 5:05
sussindiocolifa13-Mar-03 5:05 
GeneralRe: little question by a Win32 starter Pin
Maximilien13-Mar-03 5:20
Maximilien13-Mar-03 5:20 
QuestionMarching Ants? Pin
luedi13-Mar-03 4:37
luedi13-Mar-03 4:37 
Generalvirtual function for a CToolbar derived class Pin
ns13-Mar-03 4:17
ns13-Mar-03 4:17 
GeneralRe: virtual function for a CToolbar derived class Pin
Joseph Dempsey13-Mar-03 7:48
Joseph Dempsey13-Mar-03 7:48 
Generalthanks!! Pin
ns13-Mar-03 8:01
ns13-Mar-03 8:01 
GeneralPlace region outside dialog Pin
AWebDude13-Mar-03 4:14
AWebDude13-Mar-03 4:14 
GeneralRe: Place region outside dialog Pin
Joseph Dempsey13-Mar-03 7:56
Joseph Dempsey13-Mar-03 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.