Click here to Skip to main content
15,898,988 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ^? Pin
PJ Arends13-Dec-04 6:51
professionalPJ Arends13-Dec-04 6:51 
GeneralGetting text from an edit box Pin
aaadetos13-Dec-04 6:25
aaadetos13-Dec-04 6:25 
GeneralRe: Getting text from an edit box Pin
Antony M Kancidrowski13-Dec-04 6:49
Antony M Kancidrowski13-Dec-04 6:49 
GeneralRe: Getting text from an edit box Pin
aaadetos13-Dec-04 7:15
aaadetos13-Dec-04 7:15 
GeneralRe: Getting text from an edit box Pin
Antony M Kancidrowski13-Dec-04 9:42
Antony M Kancidrowski13-Dec-04 9:42 
GeneralRe: Getting text from an edit box Pin
toxcct13-Dec-04 7:42
toxcct13-Dec-04 7:42 
GeneralRe: Getting text from an edit box Pin
Antony M Kancidrowski13-Dec-04 9:47
Antony M Kancidrowski13-Dec-04 9:47 
GeneralRe: Getting text from an edit box Pin
aaadetos13-Dec-04 14:45
aaadetos13-Dec-04 14:45 
[Perplexed!]
I already tried to do the following:
<br />
{<br />
...<br />
	CString strx;<br />
	CDialog *pDialog;<br />
<br />
	pDialog -> GetDlgItemText(IDC_WELLRAD,strx);	<br />
	x = atof((LPCTSTR)strx);<br />
...<br />
}

and toxcct's code as well. The first gave an ASSERT error while the other gave an unhandled exception in mfc42d.dll, in wincore.cpp ->C:\...\MFC\SRC\WINCORE.CPP at the line *** below:
<br />
		HWND hWnd = ::GetDlgItem(m_hWnd, nID);<br />
		if (hWnd != NULL)<br />
		{<br />
			int nLen = ::GetWindowTextLength(hWnd);<br />
			::GetWindowText(hWnd, rString.GetBufferSetLength(nLen), nLen+1);//***<br />
			rString.ReleaseBuffer();<br />
		}<br />

I'm trying to get the value of an edit box for use in a function outside CDialog, which would carry out computations on the value entered by a user. I don't understand why i get these errors.
GeneralRe: Getting text from an edit box Pin
*Dreamz13-Dec-04 19:50
*Dreamz13-Dec-04 19:50 
GeneralRe: Getting text from an edit box Pin
aaadetos13-Dec-04 20:27
aaadetos13-Dec-04 20:27 
GeneralRe: Getting text from an edit box Pin
*Dreamz14-Dec-04 19:05
*Dreamz14-Dec-04 19:05 
GeneralRe: Getting text from an edit box Pin
aaadetos15-Dec-04 10:23
aaadetos15-Dec-04 10:23 
GeneralRe: Getting text from an edit box Pin
*Dreamz15-Dec-04 17:07
*Dreamz15-Dec-04 17:07 
GeneralRe: Getting text from an edit box Pin
Antony M Kancidrowski14-Dec-04 6:51
Antony M Kancidrowski14-Dec-04 6:51 
GeneralRe: Getting text from an edit box Pin
toxcct14-Dec-04 4:48
toxcct14-Dec-04 4:48 
QuestionHow to generate human friendly product keys using asymmetric crypto? Pin
Jim Howard13-Dec-04 6:06
Jim Howard13-Dec-04 6:06 
AnswerRe: How to generate human friendly product keys using asymmetric crypto? Pin
Chris Losinger13-Dec-04 7:49
professionalChris Losinger13-Dec-04 7:49 
GeneralRe: How to generate human friendly product keys using asymmetric crypto? Pin
Jim Howard13-Dec-04 7:59
Jim Howard13-Dec-04 7:59 
GeneralRe: How to generate human friendly product keys using asymmetric crypto? Pin
Chris Losinger13-Dec-04 8:30
professionalChris Losinger13-Dec-04 8:30 
Generalend of sizing or moving windows Dialog Pin
Thierry Lebrun13-Dec-04 5:26
Thierry Lebrun13-Dec-04 5:26 
GeneralRe: end of sizing or moving windows Dialog Pin
Phil J Pearson13-Dec-04 5:48
Phil J Pearson13-Dec-04 5:48 
GeneralRe: end of sizing or moving windows Dialog Pin
toxcct13-Dec-04 7:48
toxcct13-Dec-04 7:48 
GeneralRe: end of sizing or moving windows Dialog Pin
Blake Miller14-Dec-04 4:37
Blake Miller14-Dec-04 4:37 
GeneralRe: end of sizing or moving windows Dialog Pin
Thierry Lebrun14-Dec-04 8:29
Thierry Lebrun14-Dec-04 8:29 
GeneralSome help please Pin
Tom Wright13-Dec-04 5:12
Tom Wright13-Dec-04 5:12 

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.