|
reen_haz wrote: i would like to ask how is the code 2 read INI files
reading ini files is Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
reen_haz wrote: ...how is the code 2 read INI files & how's d code if i want 2 save what i've edit to the existing INI...
Check out GetPrivateProfileString() , WritePrivateProfileString() , and related functions.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ooo..okies,thanx guyz..u helps me lot,i've done with INI,juz left the NUM files..i'll try my best..thanks again
|
|
|
|
|
Hi All
I want to customize ToolTip control on menu ToolBar so that i can change font of toolTip control to any desired font.I see number of example for ToolTip for dialogBox, but i want Menu ToolBar control. If anybody have some code and hint regarding this then plz forward me.
Thanks in Advance
Atul Mahajan
|
|
|
|
|
What is Menu ToolBar??
Confusing...
Anurag Gandhi.
|
|
|
|
|
Hi
Anurag
I want to customize ToolTips on ToolBar. so that I can change font of tooltips used in ToolBar.If u have any code to add customize ToolTip then plz forward me.
Thanks in Advance
Atul
|
|
|
|
|
You need to create your own window for tooltip.
When user mouseover the toolbar it showthe window and hide onmouseout event.
Anurag Gandhi.
|
|
|
|
|
Did you search on the codeproject?
|
|
|
|
|
It says that,network would trans u_long and u_shor values in different order.So when the value would be send and has been recieved,we'd better using such hotnl,htons,ntohs,ntohl fuucntion to convert the data.I relieve it. But another question puzzled me somedays.If the other datas,like string,"kcynic" for example,if each character holds two bytes long(Widechar),the reciever would get a string completely different string.In another words,the origin string is lost.
But it often does not so.Why?
Thanks.
|
|
|
|
|
Good point!
I find this http://en.wikipedia.org/wiki/UTF-16/UCS-2#Byte_order_encoding_schemes[^].
It supports your point of view (string should be scrambled on different encoding machines). I don't know why you, experimentally, found that often the string are not scrambled.
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.
|
|
|
|
|
but i could not open the linker
|
|
|
|
|
How can i make this :
i have this code : csText.Format("%d", nSum);
ok but my result is lets say 44,ok but if i have 22.3+22.3=44.6(nSum)
this is not working : csText.Format("%d", nSum);
How can i make this?(to have the result whit 44.6 lets say not 44)
Bravoone
|
|
|
|
|
nSum is an int value. So it truncates the value up to the decimal point. You need to take a float or a double variable.
// say nSum is float type
csText.Format("%f",nSum);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
%d is the type format specifier for signed decimal decimal, for floaing point numbers you can use, for instance, %g . see http://msdn2.microsoft.com/en-us/library/hf4y5e3w(VS.80).aspx[^]
(remember that CString::Format behaves like sprintf ).
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.
|
|
|
|
|
CPallini wrote: for floaing point numbers you can use, for instance, %g. see
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Don't you like %g ?
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.
|
|
|
|
|
"%g" is not working !How can i do that ?
Bravoone
|
|
|
|
|
On my system it works pretty well, anyway, see [^] or [^].
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.
|
|
|
|
|
Bravoone_2006 wrote: How can i do that ?
by reading the CString::Format() documentation !
|
|
|
|
|
toxcct wrote: by reading the CString::Format() documentation !
How can I do that?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
ok,but i need 2 digits 44.66 lets say... then what ?
Bravoone
|
|
|
|
|
Use this format tag: %.2f instead.
|
|
|
|
|
Don't you read documentation, do you?
try:
csText.Format("%.2f", nSum);
BTW nSum is a misnaming for a float if you are using Hungarian Notation.
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.
|
|
|
|
|
csText.Format("%.2f", nSum);
is not working why?
i have read documentation but is not working !any why ?
Bravoone
|
|
|
|