|
He asked to do that in C, not in C++
|
|
|
|
|
toxcct wrote: use ftoa() instead
Such as this implementation?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You have to display the number, HOW the systems wants to show the number.
If you have problems with it, can can also replace the "," with a string replace.
Greetings from Germany
|
|
|
|
|
This is controle by the LOCALE .
I'm not certain that you can force sprintf to a certain representation ( . instead of , ) ?
|
|
|
|
|
Maximilien wrote: I'm not certain that you can force sprintf to a certain representation ( . instead of , ) ?
Not until _sprintf_l() came along. That might not be an option for the OP, however.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ToughGuy9 wrote: If i run the sprintf (.., "%f", .. ) on any machine in which has decimal point as , (comma) instead of a . (dot) (like French) it is converting . to , in the string even if the double value is having .(dot) . I don't want it to happen.
If I understand you correctly, you want numbers formatted like 123,456.78 regardless of the locale. Is that correct?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David,
I want the double to be stored into the integer string as with decimal point as dot (.) but NOT as a , comma.
Regards,
Leela
|
|
|
|
|
But why would you want to do this for countries that format numbers differently?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
Thanks to One and all for trying to help me in this regard,,
As of now after copying the double to the string i.e., after sprintf statement Iam checking if string has , using strchr().. If i find a ,(comma) iam replacing it with a . (dot). But if can find some other alternative in which i can copy the value in the double variable as it is to a String..
Btw the double variable has value with .(dot)
- Leela
|
|
|
|
|
Hi, I am working on a remote controlled car that is controlled by a pc. I would like to know how to read from the midi port or gameport. I am using visual studio 2005 c++ and I am not really familiar with reading and writing to ports. I've only found one working code from microsoft but it only works on visual 6. The others don't even compile.
Thank you and good day.
|
|
|
|
|
Hello comunity,
is it posible to change the rowheight in CListCtrl, when i use them in my dialog they have only
standard rowheight, i like to change this!
For example, after every 10 items the 11 row should by not higher as 5px!
------
// row 1
------
// row 2
------
------ // <-- row 11
Is there any way to do this?
with best regards
break;
-- modified at 8:24 Wednesday 17th January, 2007
|
|
|
|
|
You need owner drawn list control for this.
I just reading this article[^] to get an idea.
|
|
|
|
|
Hello Prasad,
thanks very much for answer, i use already this
ON_NOTIFY ( NM_CUSTOMDRAW, IDC_MY_LIST, OnCustomdrawMyList )
to set my own text and background color in CListCtrl.
I seek for member which i have to change row heigth!
regards
break;
-- modified at 9:45 Wednesday 17th January, 2007
|
|
|
|
|
hi every body, salamou alaykom !
how are you ?
I have a question about dateTimePicker, normally this control display the current time of my system but I want that it diplay the time 00:00:00 by defaut and user can insert the time he wants.
is it possible ? thank's a lot and have a nice day
byyyyyyyyyye
zizzzzzzzzzzzzzzz
|
|
|
|
|
zizzzz wrote: ...I want that it diplay the time 00:00:00 by defaut...
So have you called the SetTime() method (with 0 for the time)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hai,
Please let me know what is the name of the library file needed for wWinmainCRTStartUP in EVC++ And what is the use of wininet.lib and corelibc.lib....Because i am having confusion while using in my coding.
Thanks And Regards
Harshadha
|
|
|
|
|
How do I change the height of the statusbar?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
There is a member variable for a status bar called m_nMinHeight;
If you have subclassed the status bar you can set it in the constructor;
Otherwise you can send the status bar a SB_SETMINHEIGHT message setting the WPARAM to the required height.
|
|
|
|
|
Many thanks.
BTW, after you send the message, you have to call UpdateWindow.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I need to convert the TCHAR value to string.
amit
|
|
|
|
|
this does mean much, but is this ok for you :
std::string str(CT2A(mytchar));
i'm not sure that will work, but as i don't know either what and why you want to do that, i cannot help much.
|
|
|
|
|
Well,thanks
i elborate ,
i have one value which is came from listview
<br />
TCHAR buff[MAX_PATH]={0}; <br />
hwnd = GetDlgItem(hwndParent,IDC_LISTVIEW);<br />
ListView_GetItemText(hwnd,0,0,(LPWSTR)&buff,MAX_PATH);<br />
string FileToUpload = util.ConvertWCHARToString(buff_input);//param is in WCHAR *
i want to use diretly buff converted value into FileToUpload string variable
suppose buff having
buff=_T("c:\xyz.wmv");
then how we will convert it into string.
if possible can you convert it into WCHAR *, it will ok.
otherwise if possible then string.
AMIT
|
|
|
|
|
What's wrong with:
TCHAR buf[256] = _T("Hello World");
wstring str = buf;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
how to find if a particular registry entry is present or not. In one of my project , when the application starts it need to check if a particular registry is present,if present it would follow a different course. Pls help.
Thanks..
vikram
|
|
|
|
|
Have a look at the CRegKey class in MSDN.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|