|
Hi Please make it calss member by declaring it in calss definition .h file.
//AddCam.h
class AddCam: public CDialog
{
public:
CString strTemp;
...
}
void Addcam::OnOK()
{
// TODO: Add extra validation here
GetDlgItemText(IDC_EDIT1,strTemp) //IDC_EDIT1 is supposed to be your EDIT box id.
CDialog::OnOK();
}
Are you getting me??
Regards,
Sandip.
|
|
|
|
|
Thank you sooooo much...now it works.....seems like i failed to explain my problem in a clear way..will correct it from next time onwards.
|
|
|
|
|
Hello all,
I want to get character value from an ASCII value. That is, if i pass 65 then I should get 'A' in return. So how could i easily accomplish this??
Please help me out..
Thanks & Regards,
Hemang
|
|
|
|
|
char c = 65;
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
That's crazy... You gave the same answer than me and you got downvoted while I got a 5
|
|
|
|
|
However, don't worry, I don't mind about down voters (and after all, I have a lot of friends).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
char c = 65;
It's as easy as that. Now your c character holds the 'A' letter.
|
|
|
|
|
printf("%c",i); // i could have any integer value
Put in other words you can simply typecast an int to a char to get its ASCII value
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
CString csTemp;
csTemp.Format( "%c", 65 );
Will result "A" in csTemp.
akt
|
|
|
|
|
If you want a function anyway:
char getCharEquivalent(int i)
{
char c = i;
return c;
}
void main()
{
int i = 65;
char cCharEquiv = getCharEquivalent(i);
}
Put a break point inside main and check cCharEquiv, it will be 'A'
ASCII is nothing but numeric value of the character.
--
"Programming is an art that fights back!"
|
|
|
|
|
Though my problem was of different sort but i got clue from all your answers. So i am very thankful to you guys as usual. I am really touched.
Cheers,
Hemang
|
|
|
|
|
char c= (char)65;
-@SuDhIrKuMaR@-
|
|
|
|
|
Why char c= (char)65; when we can use of char c = 65; ?
|
|
|
|
|
Hi all,
I m using OnInitDialog() for dialog box initialization and OninitialUpdate() use for Formview.
please what function is used for MainFrame initialization.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: what function is used for MainFrame initialization.
OnCreate
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
If you want to add remove differrent property of the MainFrame you can use MainFrame::PreCreateWindow() or OnCreate()fucntions.
akt
|
|
|
|
|
how to add a series of string in a list box horizontally??add string adds the strings on the next line of the listbox,but i need the srings to be added in the same line and need space between the strings,for example
"apple orange mango"
Raja
|
|
|
|
|
Just create a string that contains all your substring with whitespace in between and add that string to the list box. BTW, it doesn't really make sense because it will still be considered as one string in the list box, you won't be able to select "apple" only for example.
|
|
|
|
|
|
You can use a CListCtrl and hide the grid lines that are shown in the list [in case they are displayed]. You can then see all the three strings as if they were separated by a space.
Using custom edit control or a rich edit control would be another idea but a daunting task messing the things up.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you mean Horizontal scrollbar?
Hi why did you down vote me, I did not give you answer, but wanted to ask you or let you know one of the list box style.
I hope you get your doubt cleared.
--
"Programming is an art that fights back!"
modified on Monday, June 9, 2008 4:22 AM
|
|
|
|
|
Do you want to insert your strings like insert to a column?
|
|
|
|
|
if i do the following coding,i get error wha should be done???i need to add columns in a list box and add strings to it.
void ClistboxexDlg::OnBnClickedOk()
{
CListCtrl v;
v.InsertColumn(0, "One", LVCFMT_LEFT, -1, 0);
}
error C2664: 'int CListCtrl::InsertColumn(int,LPCTSTR,int,int,int)' : cannot convert parameter 2 from 'const char [4]' to 'LPCTSTR'
Raja
|
|
|
|
|
Try with
v.InsertColumn(0,_T("One"), LVCFMT_LEFT, -1, 0);
|
|
|
|
|
Hi,
How can I send e email but before sending It should check for user name and password?
|
|
|
|