|
dooooooooooouuuuuuuuuuughhhhhhhhhhh !!!!!!!!!
Thanks for pointing my stupidity, that's an excellent proof for why you should not skip lunch.
Shay
|
|
|
|
|
Try using the LARGE_INTEGER data type. Text between asterisks is text quoted directly from the MSDN documentation on the data type
***********************
LARGE_INTEGER
The LARGE_INTEGER structure is used to represent a 64-bit signed integer value.
Note Your C compiler may support 64-bit integers natively. For example, Microsoft® Visual C++® supports the __int64 sized integer type. For more information, see the documentation included with your C compiler.
typedef union union
{ struct
{ DWORD LowPart;
LONG HighPart;
}; LONGLONG QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;
*************************************
hope this helped!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Darn. Beat me to it. I was going to suggest doing something similar and then using the standard CArchive operators on the smaller bits.
Steve S
|
|
|
|
|
well I'm glad to see I beat somebody to something for once
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Write your own operator<< and operator>> functions.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I once wrote an extension to the CArchive class that handled serialization of the __int64 type. I can send it to you if you'd like.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
First of all, you can send it, it never hurts to share someone elses wisdom.
Second, I already utilized the Write/Read functions of the archive.
Thanks!
|
|
|
|
|
I prefer to write a global operator>> and operator<< for datatypes like this, so that I can still use the syntax of a stream operator with the archive.
<br />
CArchive& operator<<( CArchive& archive, __int64 value )<br />
{<br />
archive.Write( &value, sizeof(__int64) );<br />
return archive;<br />
}<br />
<br />
CArchive& operator>>( CArchive& archive, __int64 value )<br />
{<br />
archive.Read( &value, sizeof(__int64) );<br />
return archive;<br />
}<br />
This works for simple data types. I use this for bool as VC6.0 doesn't implement serialization for bool, but this should also work fine for __int64.
Best regards,
John
|
|
|
|
|
Thanks for the tip! But don't forget to pass in the second parameter of operator>> by reference (__int64& value). Then it works perfectly!
Regards
Marcus
|
|
|
|
|
I finally beat you to an answer.... you're slacking off!!;P
onwards and upwards...
|
|
|
|
|
My apologies. I was working on an article that had me sidetracked.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have an empty Visual C++ 6.0 project that I use to build a bunch of projects (by setting them as dependant projects). But before I start building I want to update the build numbers in the resource files of these projects.
I created a little app. for this, but I can't seem to find a way to kick it off, because my empty project does not have a custum build step.
Anyone got a clue on how to do this?
|
|
|
|
|
Did you look at this [^] article here at CP?
onwards and upwards...
|
|
|
|
|
I just saw it and that is not exactly what I need: I want to increment the file and product version numbers and also have to do some version control stuff before I do this.
I just need to know how I can a Custom Build option/tab to an empty project.
Anyone got a clue on how to do this ?
|
|
|
|
|
I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE
Kind Regards
Kevin
|
|
|
|
|
CDialog* pDlg = &AnotherDialog;
please say more, and we'll be glad to help you more ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
What I'm trying to do is as follows: I've DialogA and DialogB. DialogA has a EDIT BOX (say EBOX1). Dialog B consists of a Button (say BUTTON1). When I press BUTTON1 on DialogB, I want a message to appear on EBOX1 of DialogA.
I would like to use the API SetDlgItemText
Suggestion very much appreciated.
|
|
|
|
|
you need to pass DialogA to DialogB to be able to access it.
something like this draft :
...
DialogB dlgB;
dlgB.SetOtherDialog( &dlgA );
...
DialogB::SetOtherDialog( DialogA* pDlgA )
{
m_pDlgA = pDlgA;
}
...
DialogB::OnButtonClick()
{
if ( m_pDlgA != NULL )
{
m_pDlgA->SetTextOnControl( );
}
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Haven't you asked this same question twice before? Are the responses you're getting not working? The ones I've seen look right on the money.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
also see my answer to 'MFC Dialog member sharing'. You should be able to see it by clicking 'next' at the bottom of this page
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Where have you defined the dialog classes? In MainFrame or directly in some function?
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
anybody have idea in creating a pie chart n bar chart (read data from file) with visual c++ n opengl programming?
|
|
|
|
|
I want print in MFC in a same document an horizontal and a vertical page !
How can I do ?
|
|
|
|
|
You'll need to set up a DEVMODE for each page orientation and call ResetDC to change the current orientation from/to Portrait or Landscape.
onwards and upwards...
|
|
|
|
|
This problem is often sent here. See my answer, that I posted a month ago.
Robert-Antonio
"Czech Railways discovered, that in case of disaster the most damaged wagons
were the first and the last. So they decided to create trains without them."
|
|
|
|