|
If a function is deprecated then typically compiler issues a warning. If you want to be sure then check MSDN.
-Saurabh
|
|
|
|
|
rp_suman wrote: How to know a function/API is deprecated by Microsoft?
by looking on the MSDN[^] web site !
|
|
|
|
|
Thanks for help from everybody!!
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi,
I have one edit box im my dialog.I have to get the value of that edit box for further processing.what i have done is , add memeber variable for that edit box and used var->GetWindowText() .
but this gives some error isn't this the way to access the value?im using vc++
|
|
|
|
|
var->GetWindowText(szVal);
AfxMessageBox(szVal);
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I still get the same error.what i have to do is ,when i click a button,I get another dialog with the edit box.when i enter the value i have to get in the mesagebox and also for further processing.
the error is left of '->GetWindowTextA' must point to class/struct/union
|
|
|
|
|
What is the type of var ? You probably have to use a "." instead of a "->".
|
|
|
|
|
var->GetWindowText(szVal);//szVal is a CString variable.AfxMessageBox(szVal);
This is wrong.
If 'var' is ur control variable, then you should call like this.
var.GetWindowText(szVal);
akt
|
|
|
|
|
Can you show your code and your declares?
|
|
|
|
|
If you want to call GetWindowText() you should add the member variable as "Control" not as value. Also after adding member variable you should call as follows.
CEdit m_Edit;
CString csTemp;
m_Edit.GetWindowText(csTemp);
Another way is add memeber variable as "value" and select appropriate type from "Variable Type" combo box. Abd Call UpdateData() for getting the data entered in edit box.
akt
|
|
|
|
|
the value is not being displayed in the message box.but the error has gone.any more ideas pls..........
|
|
|
|
|
How did you add member variable? Ads Control or as Value??
akt
|
|
|
|
|
use . instead of ->.
-@SuDhIrKuMaR@-
|
|
|
|
|
yes i have tried with . instead of ->
|
|
|
|
|
Hi Can you please paste your code snippet.
Regards,
Sandip.
|
|
|
|
|
Addcam c;<br />
c.DoModal();<br />
CEdit m_edit1;<br />
CString csTemp;<br />
m_edit1.GetWindowText(csTemp);<br />
AfxMessageBox(csTemp);
where Addcam is the class of the dialog which is invoked when the button is clicked.
|
|
|
|
|
Your m_edit1 is not associated with any editbox.
if you have your edit box on dialog pointed bye variable c
then you need to have a string variable in calss AddCam say strTemp.
When you press OK on dialog store the string from edit box to strTemp using GetDlgItemText(IDC_EDIT1,strTemp).
then use the strTemp for further processing using c.strTemp.
I hope it makes sense.
one more thing you cant access the control variables after the dialog is destroyed.
Regards,
Sandip.
|
|
|
|
|
Is the m_edit1 is in Addcam dialog?
akt
|
|
|
|
|
yes...its the edit box in Addcam dialog.have three more edit boxes there.
|
|
|
|
|
You cant access the control variables after the dialog is destroyed.
You need to store the values in strings and access them after the DoModal() call.
Regards,
Sandip.
|
|
|
|
|
sorry..this is not working at all..
|
|
|
|
|
what is not working paste your code
Regards,
Sandip.
|
|
|
|
|
Addcam c;<br />
c.DoModal();<br />
CString st;<br />
st=GetDlgItemText(IDC_EDIT1,c.strTemp);<br />
AfxMessageBox(st);
have added strTemp in Addcam class.
Addcam::Addcam(CWnd* pParent )<br />
: CDialog(Addcam::IDD, pParent)<br />
{<br />
CString strTemp;<br />
<br />
}
|
|
|
|
|
CString strTemp;
should be class member of AddCam
projectip wrote: st=GetDlgItemText(IDC_EDIT1,c.strTemp);
should be inside AddCam::OnOK()//
then just write
Addcam c;
c.DoModal();
AfxMessageBox(c.strTemp);
I hope its making sense to you..
Regards,
Sandip.
|
|
|
|
|
That is a very helpfull answer . Why can't you say what is not working ? How can we guess what the problem is ?
If you want an answer, you have to provide some information for us to be able to help you.
|
|
|
|