Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retreiving Data from a dialog box

Status
Not open for further replies.

aaadetos

Programmer
Nov 21, 2004
54
US
How would one retreive data input from the keyboard into a dialog box, which the compiler would process at run-time? I thought that making an instance of the class object which contains the data would be enough; but this doesn't cut it. See the following code:
Code:
void unbound(double *unbd, int nSize)
{
	enum{nSize = 100};
	double A[nSize],B[nSize],k0[nSize],k1[nSize],s[nSize],expi[nSize],a[nSize],b[nSize];
	
	void bessk0(double *x,double *k0,int nSize);
	void bessk1(double *x,double *k1, int nSize);
	void ei(double *x, double *expi, int nSize);
	
	double x=0;
	
	s[0] = 1;
	a[0] = x*sqrt(s[0]);
	b[0] = 2*sqrt(s[0]);

	bessk0(a,k0,nSize);
	bessk1(a,k1,nSize);
	ei(b,expi,nSize);

	A[0] = k0[0]/(x*sqrt(s[0])*k1[0]);
	B[0] = (1-exp(-2*sqrt(s[0])))/(2*sqrt(s[0]));
	
	unbd[0]=0.5*(A[0]-B[0]-expi[0]);

	//trial: K0(x) --> x = rw*sqrt(s), as per A-32
	for (int t=1;t<nSize;t++)
	{
		CKuchukDlg MyClass;	
		x = 2;//MyClass.m_dWellRad; ****

		s[t] = 2*t*PI;
		a[t] = x*sqrt(s[t]);
		b[t] = 2*sqrt(s[t]);

		bessk0(a,k0,nSize);
		bessk1(a,k1,nSize);
		ei(b,expi,nSize);

		A[t] = k0[t]/(x*sqrt(s[t])*k1[t]);
		B[t] = (1-exp(-2*sqrt(s[t])))/(2*sqrt(s[t]));
	
		unbd[t]=0.5*(A[t]-B[t]-expi[t]);
	}
}
When line **** read
Code:
x=MyClass.m_dWellRad;
the compiler didn't process the variable m_dWellRad at run-time, but simply used x = 0(initialization). When I used x=2, it used the latter variable.

How then can I make the compiler use the value input from keyboard into my dialog box at run-time?
 
I am now aware that
Code:
WM_GETTEXT
for use in retreiving text from an edit box, could do the trick. Where should this syntax be used in the above code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top