|
how to deselect all the previous selected item in listctrl .
Bankey Khandelwal
Software Engineer
Solversa TechnologiesPvt.Ltd.
15,Yeshwant Nagar
Range Hill Road
Ganeshkhind,Pune-03
bankey.khandelwal@solversa.com
Mobile: +91-9850432990
Office : +91-20-25521888
|
|
|
|
|
|
|
|
I have a unicode app with a CEdit where I can display as well as paste japanese characters.
The problem is that the IME does not show Japanese as an option and, therefore, I cannot type japanese characters directly. How does one go about enabling an app to use IME?
I should say that my IME does have Japanese and it works fine with IE or Word.
Thank you all.
|
|
|
|
|
I am working with conversions, I am getting a integer value i want to convert to hexa decimal value.
|
|
|
|
|
Hum I think this is a very strange question because you don't have decimal values or hexadecimal values. The thing that is decimal or hexadecimal is the REPRESENTATION of the number (in a string or something like that). Your number is still stored the same in memory.
So now, what do you want to do exactly ? You have a string representing a number in hexadecimal and you want to convert that string into a string representing the number in decimal ? Or you have a number and you want to convert it into an hexadecimal string ? If yes, then use strtol (as pointed in one of the previous tread)
|
|
|
|
|
Hello Cedric Moonen,
Yes your point is definatly right.
& if so then you can do the thing by just taking CString Object & use mehod Format.
which work same as printf funcion.
|
|
|
|
|
|
I'd use STL like this:
cout << hex << 100;<br />
Or if you want it in a string:
stringstream ss;<br />
ss << hex << 100;<br />
string s = ss.c_str();<br />
Steve
|
|
|
|
|
Is their any function which do the same in C++ just as Convert.ToInt32(string*,int base) does.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
|
I don't know Convert.ToInt32(string*,int base) but I suppose it converts a string into an integer. Maybe you are looking for the atoi[^] function ?
|
|
|
|
|
atoi only converts into integer of base 10 as far I know.I want it to convert to any base like 16(hexa) etc.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Ok sorry. strtol[^] then, as pointed in the FAQ by Michael
|
|
|
|
|
I would use a std::stringstream . Michael mentions it in his article but I couldn't see a hex example. Something this would do it:
stringstream ss("10");
int num;
ss >> hex >> num;
I think that in general using the STL is cleaner and more maintainable then using the cryptically named CRT functions.
Steve
-- modified at 20:19 Friday 20th January, 2006
ADDED:
But you only get oct , dec and hex so if you need more the CRT style functions may the the way to go.
|
|
|
|
|
How do i create multiple columns in ClistBox?
please call me back!
cb
|
|
|
|
|
Add the LBS_USETABSTOPS style to the control.
However, unless you have a specific need not to, you should use the list view control in report mode instead. These days, any app using a multi-column list box looks antiquated.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
but how will i add a string to a specific column? m_list.col(n)...?
|
|
|
|
|
You can't, per se. The concept of "real" columns in a listbox does not exist. The LBS_USETABSTOPS and LBS_MULTICOLUMN styles can simulate the effect, but it pales in comparison to an actual list control.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
why don't you use BLONDE CListCtrl!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow cheers, Alok Gupta VC Forum Q&A :- I/ IV
|
|
|
|
|
Michael is right use the CListCtrl (List Control)
There are a number of beginner articles here at code project to get you started and understand how to work with list control.
http://www.codeproject.com/listctrl/[^]
Here is a decent explanation on working with the list control.
Using the List Control[^]
Good Luck.
|
|
|
|
|
I saved some datas in test.txt...I want to copy or transfer the same datas to other .txt file.How can i do this..?Help me..
|
|
|
|
|
It is a very general question, difficult to answer precisely.
If you use the STL (or are familiar with), you can open an input stream ifstream, read the stream char by charfor example and by the same time outputing it to an output stream ofstream
std::ifstream InputStream("test.txt");<br />
std::ofstream OutputStream("AnotherTest.txt");<br />
<br />
char c;<br />
while(true)<br />
{<br />
InputStream>>c;<br />
if (InputStream)<br />
{ <br />
OutputStream<<c;<br />
}<br />
}<br />
<br />
OutputStream.close();<br />
InputStream.close();
-- modified at 5:10 Friday 20th January, 2006
Ooops, sorry, I forgot the "exit" of the loop
It should be:
if (InputStream)<br />
{ <br />
OutputStream<<c;<br />
}<br />
else<br />
break;
This will work better
|
|
|
|
|
Are you looking for something simple like CopyFile() ?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|