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

C / C++ / MFC

 
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 
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 
Thanks a lot Dreamz...
I actually decided to add a member function to my dialog's class, viz:
<br />
double CKuchukDlg::getrw(double x)<br />
{<br />
	//Get Data from the edit box<br />
	CString strx;<br />
<br />
	GetDlgItemText(IDC_WELLRAD,strx);<br />
	x = atof(strx);<br />
	<br />
	return x;<br />
}


i then used the function in my math function, to get the value of the edit box:
<br />
	void bessk0(double *x,double *k0,int nSize);<br />
	void bessk1(double *x,double *k1, int nSize);<br />
	void ei(double *x, double *expi, int nSize);<br />
<br />
void unbound(double *unbd, int nSize)<br />
{<br />
	enum{nSize = 100};<br />
	double A[nSize],B[nSize],k0[nSize],k1[nSize],s[nSize],expi[nSize],a[nSize],b[nSize];<br />
	<br />
	<br />
	double x=0;<br />
	s[0] = 1;<br />
	a[0] = x*sqrt(s[0]);<br />
	b[0] = 2*sqrt(s[0]);<br />
<br />
	bessk0(a,k0,nSize);<br />
	bessk1(a,k1,nSize);<br />
	ei(b,expi,nSize);<br />
<br />
	A[0] = k0[0]/(x*sqrt(s[0])*k1[0]);<br />
	B[0] = (1-exp(-2*sqrt(s[0])))/(2*sqrt(s[0]));<br />
	<br />
	unbd[0]=0.5*(A[0]-B[0]-expi[0]);<br />
<br />
	//double CKuchukDlg::getrw(double x);<br />
	//x = getrw(x);<br />
	<br />
	CKuchukDlg MyClass;<br />
	MyClass.getrw(x);<br />
	x = MyClass.getrw(x);<br />
<br />
	//trial: K0(x) --> x = rw*sqrt(s), as per A-32<br />
	for (int t=1;t<nSize;t++)<br />
	{<br />
<br />
		s[t] = 2*t*PI;<br />
		a[t] = x*sqrt(s[t]);<br />
		b[t] = 2*sqrt(s[t]);<br />
<br />
		bessk0(a,k0,nSize);<br />
		bessk1(a,k1,nSize);<br />
		ei(b,expi,nSize);<br />
<br />
		A[t] = k0[t]/(x*sqrt(s[t])*k1[t]);<br />
		B[t] = (1-exp(-2*sqrt(s[t])))/(2*sqrt(s[t]));<br />
	<br />
		unbd[t]=0.5*(A[t]-B[t]-expi[t]);<br />
	}<br />
}


While the code compiles without error, i still obtain a debug assertion failure in wincore.cpp!!

Is there a better way of calling my getrw(double x) in my math fxn without having this problem?

Thank you.
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 
GeneralRe: Some help please Pin
Phil J Pearson13-Dec-04 5:46
Phil J Pearson13-Dec-04 5:46 
GeneralRe: Some help please Pin
Tom Wright13-Dec-04 6:02
Tom Wright13-Dec-04 6:02 
GeneralRe: Some help please Pin
Maximilien13-Dec-04 6:09
Maximilien13-Dec-04 6:09 
GeneralRe: Some help please Pin
Tom Wright13-Dec-04 6:12
Tom Wright13-Dec-04 6: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.