|
Did you check these?[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
hi, I have checked all these and done the required tweaking operations
Can This slow down be because of any memory leaks in my software?
What I found is the kill focus from an Edit Control to a Button
in a dialog is slow.
Between button and button it is faster.
Also all the mathematical operations/Calculations are so fast.
Only resource i.e dialogs are slow.
It seems to be an unusual bug and unable to resolve.
Can you please suggest.
B.s.siva kumar.
|
|
|
|
|
Thanks for Reply.
We are using DDE Communication between 2 applications.
can this cause any slow down in vista?
B.s.siva kumar.
|
|
|
|
|
I suggest you measure a single communication operation (if possible the most relevant one), then:
- either measure same on non-Vista;
- and/or multiply it by the estimated number of such communications and compare with the total time the app takes.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
How can I display a flash file in dialog control?
I am using VS 2003
|
|
|
|
|
What about our wonderful article search engine? [^]
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]
|
|
|
|
|
Step1[^]
Step2[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I am trying to read the Unicode output from an application.
the application writes strings out to a .txt file using :
L"Date, Time, 150"
I am trying to read the value of the number, but since it is unicode, this is not a straight ReadFile operation. Is there any way in MFC to do this nice and clean. I know C# has some built in functionality to make a conversion to interpret the text.
Thanks,
|
|
|
|
|
Every (or at least most) text-file read operations have their widechar (unicode) versions, like for fgets there is fgetws. Did you try using those?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
You just need to specify the number of bytes to read in the ReadFile API.
Unicode and non-unicode is decided based upon how it is interpreted.
So you're probably not giving the correct number of bytes to read.
Try doubling it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You mentioned MFC so I suggest you use CStdioFile to read text files. You have to set the flag CFile::typeBinary in order to read Unicode strings and of course your app has to be Unicode enabled.
|
|
|
|
|
When you say that the app has to be Unicode enabled, do you mean building it as Unicode as opposed to release?
|
|
|
|
|
You have to define _UNICODE and UNICODE and you have to set the Entry-Point symbol in the Linker output options to wWinMainCRTStartup
That's for both configurations, Release and Debug.
|
|
|
|
|
Oh i see... So if i just do this:
"You have to define _UNICODE and UNICODE and you have to set the Entry-Point symbol in the Linker output options to wWinMainCRTStartup"
Is that equivalent to building as unicode or does that serve a totally different purpose relating to the output of the application?
|
|
|
|
|
LCI wrote: Is that equivalent to building as unicode
Yes.
The output of your app depends entirely on the functions/classes you use for writing to files.
|
|
|
|
|
LCI wrote: do you mean building it as Unicode as opposed to release?
Unicode is not 'opposed' to Release. You can build unicode enabled applications both in debug and release modes.
|
|
|
|
|
|
Hi,
Im reading one .dat file which contains lots of data.
Im using vc++ console application.
I that i have to read particular 3rd line,27th line like this.
SO i planned to use fseek but we can give starting character number only..not line number.
How can i do that..
My code
if((stream = fopen( "D:\\phylib.dat", "r" )) == NULL )
printf( "The file 'data' was not opened\n" );
else
{
fseek( stream, 23L, SEEK_SET);
while(fgets(list, 500, stream)!=NULL)
{
....
}
My file look like this
$
/DATA
/DID = 1
/TLIQ= -100.00 400.00
/TVAP= -100.00 400.00
/TSOL= 0.00 0.0
.
.
.
./DATA
/DID = 2
/TLIQ= -100.00 400.00
/TVAP= -100.00 400.00
/TSOL= 0.00 0.00
I want to read particular /DID line to get the value in right side.Pls help me...
Anu
|
|
|
|
|
You will have to read the file line-by-line and count, you can speed this up by pre-caching some amount of the file and search for line endings in memory.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Couldn't understand.Can u give any sample code for this.
Anu
|
|
|
|
|
The rough approach:
- Read the whole file in a memory buffer.
- Scan the buffer searching for newlines.
- Stop at
n -th newline found.
It doesn't look like a daunting task to me.
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]
|
|
|
|
|
As far as I know, there's no way to go to a particular line without reading the file. An end of file is a character like any other so to be able to go to a particular line, you need to read those characters.
There would be a way if each line contained always exactly the same number of characters (then you multiply the line number by the number of characters in one line) but it doesn't seem to be the case in your example.
So, the best solution would be to read line by line using fgets and keep the interesting one.
|
|
|
|
|
Read from the file one line at a time using getline .
Then check if the first 4 characters are /DID.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
How do some of you _C.P members_ include a snip of other members' quotation in gray into your comments to reffer to?
Thank you masters!
|
|
|
|
|
When replying
- select in the OP the text you intend to quote.
- use the 'Quote Selected Text' button.
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]
|
|
|
|