|
CPallini wrote: interperabilty
Italish, Carlo?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Actually a typo (of a poor Italiansh guy... ).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks, that's a great link. It does have the unfortunate side effect of making me want to jab a fork in my eye. What a frigging mess
|
|
|
|
|
Jim Crafton wrote: Thanks, that's a great link. It does have the unfortunate side effect of making me want to jab a fork in my eye.
Pretty normal while working with COM if you ask me.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Mohammadj wrote: Can anyone help me in making it dual function button?!
Probably, but you'll need to post your code snippets here (i.e., only relevant code), rather than require someone to download your whole project from some other site. Some of us have soap operas to watch and Bonbons to eat so time is important.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Welcome to...
Well, you already know [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Here is the code snippet i wrote when the custom button clicked
void CHashiDlg::On_AddSubtract_action()
{
UpdateData( );
double numA ,numB ,result ;
numA = atof(m_num1) ;// edit control number1
numB = atof(m_num2) ;// edit control number2
if(m_two_actions_botn.OnRight()) { // check whether the mouse clicked right half
m_results = numA + numB ;
UpdateData(FALSE );
}
else {
m_results = numA - numB ;
UpdateData(FALSE );
}
UpdateData(FALSE );
}
it performs no action loll
|
|
|
|
|
The first thing I'd do is get rid of those unnecessary UpdateData() calls. They are a never-ending source of problems simply because most folks do not know how to use them.
You should then have something akin to:
void CHashiDlg::On_AddSubtract_action()
{
CString strNumA;
strNumB,
strResult;
m_num1.GetWindowText(strNumA);
m_num2.GetWindowText(strNumB);
double numA = atof(strNumA),
numB = atof(strNumB);
if (m_two_actions_botn.OnRight())
strResult.Format("%f", numA + numB);
else
strResult.Format("%f", numA - numB);
m_results.SetWindowText(strResult);
}
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
That tells us a lot.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
How could I, or anyone else, possibly know? What have you tried so far? What code do you currently have in place? Does it compile? Are you getting runtime errors (e.g., assertions, exceptions)? Have you used the debugger (and stepped through each line of code in question)?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
no errors
but it performs nothing
loll
|
|
|
|
|
Is On_AddSubtract_action() being called?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: Is On_AddSubtract_action() being called?
I don't know, but I really appreciate you patience, man.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi
Can you look at the codes i made?
in the project?
|
|
|
|
|
I am reading a huge .txt file which has data arranged in form of rows and columns.
There are 60 columns and 10000 rows and i have to read each data(which is integer or float type) from the file to use it for some purpose.
I am using scanf() to read. But this is taking long time and the program slows down.
how can i improve the speed of reading ??????????
Regards
raghav
|
|
|
|
|
|
You can get more speed if you're ready to use up more memory.
Read the entire file into a CString variable.
And then use CString::Tokenize to read each field.
The CString variable will use up enough memory to load the entire file.
Or you can logically divide the file into fixed size chunks and read one chunk at a time and do the same processing.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Split each line into fields and use atof[^] (to read floats) and atol[^] (to read integers). That should be quicker than scanf.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Raghav0710 wrote: how can i improve the speed of reading ??????????
By not reading one line at a time from disk.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Read the whole thing into memory and parse it. If it's too big, read it in in chunks.
You can make it go even faster by converting the data while parsing.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hello All,
Sorry in advance for the lengthy explanation...
I have two applications (a server and a client) that talk to each other via TCP/IP. (WinXP to WinXP) I've noticed that if the server runs on a relatively poor performing machine and the TCP/IP traffic is high, that TCP/IP will be smart and combined messages to save on network traffic. My server/client are able to handle that just fine; however, I've recently noticed that in certain circumstances, like over a VPN connection where the network performance is degraded, TCP/IP will not only combined packets, but will also split the packets. That is to say where one packet was sent, two are received. In reality what happens is that four are sent and two are received; the first 3 are combined with 1/2 of the fourth and the other half of the fourth is in the second packet. This wouldn't be a problem except I don't know how to know which packets need to be reconnected and in what order. This seems to only occur when a large number of packets are being sent in rapid succession. TCP/IP does not guarantee that the order sent is the order received. The data that is being sent must pieced together in the correct order for it to be useable.
Is this normal behavior and if so, how do you make the connection between packets?
Thanks in advance.
|
|
|
|
|