|
maximum value an unsigned long can store is 4 294 967 296 .
you try to insert a bigger valu in it, so the behavior is not what you expect...
|
|
|
|
|
Try __int64 for storing big numbers.
Chris
|
|
|
|
|
chris175 wrote: Try __int64 for storing big numbers.
1. i'm not the OP
2. __int64 is not a portable solution
|
|
|
|
|
Is there any alternate way?
Thanks
Raji
|
|
|
|
|
RajiRaghu wrote: Is there any alternate way?
not standard one...
otherwise, find a bigger type library.
|
|
|
|
|
RajiRaghu wrote: CTime time1("20060708121212");
This is not possible. Your compiler should have indicated such. Try:
CString strTime("4294967295");
DWORD dwTime = strtoul(strTime, &pEnd, 10);
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
RajiRaghu wrote: CTime time1("20060708121212"); // Time as CSting format as a CString variable
CTime is not a CString.
Last time I checked, CTime did not have a constructor that accepted a string parameter.
If you have a string that is formatted as YYYYMMDDHHmmSS (Y = year, M = month, D = day, H = hour, m = minute, S = second), then you could grab the correct parts and put them into a CTime variable:
CString str = _T("20060708121212");<br />
long year = atol(str.Mid(0, 4));<br />
long month = atol(str.Mid(4, 2));<br />
long day = atol(str.Mid(6, 2));<br />
long hour = atol(str.Mid(8, 2));<br />
long minute = atol(str.Mid(10, 2));<br />
long second = atol(str.Mid(12, 2));<br />
CTime time(year, month, day, hour, minute, second);
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
RajiRaghu wrote: But the CString is not converted correctly to unsigned long.
Is there any other solutions please.
why you want unsigned long with SystemDate! any specific reason?
"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
Support CRY- Child Relief and You
|
|
|
|
|
Now I let a have a docking toolbar on the left edge of the MainFrame. I want to let the toolbar stay there always,without being changed the size.That is the user can't drag it or maximize it or close it.
I have try a few methods,but no success.I'm anxtious for the answer.
Thank every one who care this question.
|
|
|
|
|
Hope I understood your question
Remove this style CBRS_GRIPPER from m_wndToolBar.CreateEx(...)
|
|
|
|
|
|
hi all,
i need to show tool tip in my application.
i am having point with me CPoint.
all my calculation's are done.
i have all the data with me.
i am at end point onlt thing remained is to show it in tooltip.
so by having CPoint can i show that data as tooltip?
Thanks in advance
|
|
|
|
|
|
See
<br />
m_tooltip.Create(this);<br />
SetToolTip(_T("ADAD"));<br />
<br />
void CAnswerView::SetToolTip(LPTSTR ToolTip)
{
TOOLINFO ti;
ti.cbSize = sizeof(TOOLINFO);
ti.lpszText = ToolTip;
ti.hinst = AfxGetInstanceHandle();
ti.hwnd = m_Edit2.m_hWnd;
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
ti.uId = (UINT) m_Edit2.m_hWnd;
m_tooltip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
}
|
|
|
|
|
hey all,
I want to create a combobox and create a member variable of type int. But when I try to include the member variable using the "classwizard" option, I get to create a variable of type "string" only and not "int".
How do I add a member variable of type int.?
Iam using VC++6.0.
Thanks in advance.
|
|
|
|
|
U can't create variable of type int. U must create of type CString.
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
if you have a variable CString but you need to values from integer you can use From CString::Format for convert to int.
|
|
|
|
|
Hi all,
I have made a simple client-server(tcp/ip) Progamme in VC++ for file transfer, And it is successfully transfering the file in my LAN.
My Question is Whether i can use this programmes in internet.
That is I have installed my server programme in web server whose name is "www.something.com" ,
I have started my client programme in my local machine connected to internet, in which I mentioned "www.something.com" as the server name ie "gethostbyname("www.something.com");"
will this work
will my server and client communicate
Please Help me
Thanks in Advance
George K Jolly
|
|
|
|
|
yes if the DNS u r using canregonise ur webServer
never say die
|
|
|
|
|
Hi!Everybody
Actually i m trying to make a project in VC++ to recover password of Ms Access files here i have some information about it like. But it is not sufficent to recover the password is ther any code or any information that helps me to complete the project.If anybody know somthing or have some information about it try to help me.
thankYou
Krrish
Krrish
|
|
|
|
|
hi all,
i am having a small dout regarding Ellipse/Circle.
while drawing cdc::Ellipse(x1,x2,y1,y2);
how can i get the Radius of the Circle.
please let me know
uday.
|
|
|
|
|
U should know the basics of Maths.
Jubin Almighty
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
Exactly how is that a helpful answer? Who are you to judge what a person should or should not know?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hey man...C'mon...
you know x1,x2 and y1,y2. from this, can't you calculate radius? if you dont know, please reply. I shall help you
|
|
|
|
|
uday kiran janaswamy wrote: Radius of the Circle
Mathematically sqrt((x2-x1)^2+(y2-y1)^2) should give you the distance between the two points.Calculate the distance between two points and then divide by two to get the radius.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|