|
Insert-->Resource-->Menu..
Create your menu items.
ASdd this to the dialog by right clicking on the dialog..
Properties->General->Menu->IDR_MENU1
|
|
|
|
|
Its working!
Thank you for repling instantly.
|
|
|
|
|
Create a menu in the resource editor. Select dialog properties. there you will find an entry for Menu. Specify the resource id of the menu that you created. Compile and run. if everything is ok you should see the menu
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Yes its working! Thanks for replying instantly.
|
|
|
|
|
|
How to know a function/API is deprecated by Microsoft?
I am using midiOutGetDevCaps() to get list of MIDI output devices.
Is this function deprecated?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
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.
|
|
|
|