|
I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 and found the solution was to change the system header file string, so I'm trying to figure out how to make the change take effect (I suppose I have to recompile it somehow, but I'm having a lot of trouble figuring out just how to do that). If someone could tell me where to look to make the change take effect, I would appreciate it!
Thanks!
Richard Alley
Student/Software Engineer
|
|
|
|
|
What you are attempting is very risky, and hardly ever necessary. Even if you did manage to recompile the MFC DLLs, they would be incompatible with those on the target machine. Why don't you just derive a class from whatever class getline() belongs to? Then you can override the getline() method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
He isn't talking about the MFC dlls. He is referring to the old bug in the standard header file.
I don't recommend editting it yourself. You can download the patched library (it is just header files) from Dinkuware's site that fixes that issue and several others. Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
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
|
|
|
|
|
Zac Howland wrote: Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
Well, I have "#include string" (with string in the angled brackets), so I guess that's really the string file instead of string.h ....I never really thought there was a difference.
And could you give me a link to that site?
Richard Alley
Student/Software Engineer
-- modified at 9:49 Thursday 6th July, 2006
|
|
|
|
|
You should try to use #include <string> instead of #include <string.h> because the latter has been deprecated.
http://www.dinkumware.com/
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
|
|
|
|
|
Zac Howland wrote: He isn't talking about the MFC dlls.
My bad. I somehow read that into the problem.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CMas07 wrote: I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 a
if it C++ what about Function Overloading!
"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
|
|
|
|
|
If I have two processes connected via TCP (blocking), if one process writes data to the socket and then closes its end of the socket connection without any kind of handshake from the other process, will the other process still be able to read the data sent by the first process? Or will the data be thrown away when the first process closes the socket (in other words, is a handshake required)? In my situation, process A sends a large amount of data (perhaps a megabyte) and then needs to close to service other requests. Process B will always have a blocking read on the socket at the time that process A sends, but the read is specifically for a smaller number of bytes than the total number that process A sent. Process B has to read the header of the data to determine how long the rest of the message is, but by the time process B figures this out and posts another read, presumably process A will have closed its end of the socket.
It appears to me that process B is always getting all the data, but I cannot find any documentation that says that this is the expected behavior. I don't want it just to be a coincidence.
|
|
|
|
|
http://www.freesoft.org/CIE/RFC/1122/99.htm[^]
4.2.2.13 Closing a Connection: RFC-793 Section 3.5
"The normal TCP close sequence delivers buffered data reliably in both directions."
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
You are the best. Thanks.
|
|
|
|
|
Hello people,
I have a problem with Smartgraph,you can see the article about it here: http://www.codeproject.com/atl/SmartGraph.asp
I have added the object of Smartgraph and I wrote the lines that mentioned in the article:
<br />
m_Graph.SetParentWnd(this->m_hWnd);<br />
<br />
m_Graph.SetPlotType(0);
m_Graph.put_xLable("Time");<br />
m_Graph.put_yLable("Amplitude");<br />
m_Graph.put_Title("Graph Test");<br />
in the BOOL CMyGraphsDlg::OnInitDialog()
CMyGraphDlg is the general class of my dialog.
When i'm trying to build and run my project I'm getting the error i'll link you now:
http://img69.imageshack.us/img69/7199/untitled5xo.jpg
How can I fix it?
Thank you all for the help!
SnaidiS(Semion)
|
|
|
|
|
The error message in the task list should be descriptive enough... you are supplying the wrong data type to the function.
It should be
m_Graph.SetParentWnd(this);
Edit: I just looked at the article and I realised that you have failed to cut and paste properly as CWnd doesn't have a SetParentWnd() function and only has SetParent() and that SetParentWnd() belongs to the component...
m_Graph.SetParentWnd(this->m_hWnd);
-- modified at 9:38 Thursday 6th July, 2006
|
|
|
|
|
Thank you man!
SnaidiS(Semion)
|
|
|
|
|
I haven't understood one thing: How can I manage/control/edit the function of the graph?
for instance :line graph or Parabola?
SnaidiS(Semion)
|
|
|
|
|
|
here:
http://www.codeproject.com/miscctrl/pgllib.asp[^][^]
There are an instructions:
1 Install GDI+ (part of Microsoft SDK).
2 Download Gdiplus.dll and make sure it is in the path,
3 Recompile the source, it will build .lib in the lib directory and the .dll in the bin directory
4 Add the directory with PGL binaries to your path. (by default it is C:\Program Files\PGL\bin)
5 Add the include directory and lib directory to Visual C++ include/lib directories.
6 Make sure the headers are available
I dont really understand them
I downloaded the GDI dll but I dont understand which path(in 2).
which source(in 3)?
How can I recompile him?
4 I dont understand too 5 and 6
After that they want me to make the variable ULONG_PTR m_ulGdiplusToken; in the CWinApp-is this class is the Dialog class?
I mean if I made a dialog based project.
Because when I have tried to find this class I haven't found..
Thank you all for your wonderful answers!
SnaidiS(Semion)
|
|
|
|
|
I tried to use it for hours and...nothing... please help me
SnaidiS(Semion)
|
|
|
|
|
Semion_N wrote: I downloaded the GDI dll but I dont understand which path(in 2).
You just need to make sure the app can find the dll. Put it in windows/system32 or along with the app.
Semion_N wrote: which source(in 3)?
The source that comes with the article...
Semion_N wrote: I dont understand too 5 and 6
In your project settings add the path to the PGL headers to the Additional Include Directories under C/C++.
Add the lib directory under Linker/General. Add the .lib file to Additional Dependencies.
Semion_N wrote: is this class is the Dialog class?
I mean if I made a dialog based project.
No. This is the CWinApp derived class, usually named CXXXApp located in XXX.cpp where XXX is the name of your project.
These are pretty basic questions, it might be prudent that you go and get yourself a book on MFC otherwise you would find it difficult to continue.
|
|
|
|
|
I cant find the lib directory and the .lib file...
Can you please helo me?
Another thing I didnt find is the "Additional Dependencies" in my project properties.
SnaidiS(Semion)
|
|
|
|
|
Semion_N wrote: I cant find the lib directory and the .lib file...
You are supposed to build the .lib file from the source provided, and set whatever path you want to put the .lib file in.
Semion_N wrote: Another thing I didnt find is the "Additional Dependencies" in my project properties.
In VC7.1
Configuration Properties > Linker > Input : Additional Dependencies
|
|
|
|
|
I'm looking for a convenient little library that makes building HTML text easier
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
I am not sure, but this[^] might be what you are looking for.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
peterchen wrote: building HTML text easier
"easier", what do you mean? Easier than what?
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
easier than
body += FmtStr(_T("<a href=\"%s\">%s</a>"), url_urlescaped, title_htmlescaped);
|
|
|
|
|
I think I can't "see" your posted code completely. I guess the format string contained some HTML tags? One option would be to use an XML DOM like MSXML or something. That is an extreme improvement from string concatenation and formating.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|