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

C / C++ / MFC

 
GeneralRe: problem with trivial MFC app Pin
Anonymous13-Mar-03 10:55
Anonymous13-Mar-03 10:55 
Generalextracting flags from an integer Pin
Kuniva13-Mar-03 6:24
Kuniva13-Mar-03 6:24 
GeneralRe: extracting flags from an integer Pin
Hesham Amin13-Mar-03 6:54
Hesham Amin13-Mar-03 6:54 
GeneralRe: extracting flags from an integer Pin
Gary Kirkham13-Mar-03 6:55
Gary Kirkham13-Mar-03 6:55 
GeneralRe: extracting flags from an integer Pin
Hesham Amin13-Mar-03 7:11
Hesham Amin13-Mar-03 7:11 
GeneralRe: extracting flags from an integer Pin
Nitron13-Mar-03 8:11
Nitron13-Mar-03 8:11 
GeneralSystem Variables and PATH Pin
Brian Delahunty13-Mar-03 5:53
Brian Delahunty13-Mar-03 5:53 
GeneralDoubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 5:18
Brent Lamborn13-Mar-03 5:18 
I'm writing a graphing program that draws x- and y- axis in a picture box and I want to label some of the hash marks. I cheated a little and used read only edit controls for the labels. My problem is this - I need to convert the array of labels (doubles) to an array of strings so that I can send them to the edit controls for display in the picture box. I've tried the CString.Format function and ToString function and even _gcvt but I can't seem to get any of them to do what I want. Can anyone help?

Here my button click event that is supposed to handle this:

void CGraphView::OnBnClickedBtnplot()<br />
{<br />
<br />
	double* Labels;<br />
<br />
	GetDlgItem(IDC_PICT)->GetWindowRect(pictRect);<br />
	ScreenToClient(pictRect);<br />
<br />
	//Labels [1 - 26] (one for each hash mark)<br />
	//Don't use all of them though<br />
	Labels = GetLabelVals();<br />
<br />
	SetDlgItemText(IDC_EDITINTERSECT, "INT"); <br />
	SetDlgItemText(IDC_EDITX1, str); <br />
	SetDlgItemText(IDC_EDITX2, "x2"); <br />
	SetDlgItemText(IDC_EDITX3, "x3"); <br />
	SetDlgItemText(IDC_EDITX4, "x4");<br />
	SetDlgItemText(IDC_EDITX5, "x5"); <br />
	SetDlgItemText(IDC_EDITY1, "y1");<br />
	SetDlgItemText(IDC_EDITY2, "y2"); <br />
	SetDlgItemText(IDC_EDITY3, "y3");<br />
<br />
	InvalidateRect(pictRect);<br />
}



Instead of the "x1...y3" I want the label strings to go in.
Any help would be appreciated!

"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 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 
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 

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.