|
LiYS wrote: But in order to use message pump you have to have a window created already
No, you don't.
Can you explain your problem in more detail?
Steve
|
|
|
|
|
Stephen Hewitt wrote: No, you don't.
Sorry, I was jump to the conclusion, your method works, Thanks again.
|
|
|
|
|
How should I quit from
while (GetMessage(&msg, NULL, 0, 0))<br />
{<br />
TranslateMessage(&msg);<br />
DispatchMessage(&msg);<br />
}<br />
After KillTimer()? Does PostQuitMessage() appropriate?
|
|
|
|
|
Calling PostQuitMessage from the same thread that contains the message loop will do the trick.
Steve
|
|
|
|
|
Dear all,
i have an application where i need to convert a floating-point to double precision using c program. i am not sure how to implement it and was wondering if anybody can help. an example with source code can help. Thanks.
|
|
|
|
|
morocco212 wrote: convert a floating-point to double precision using c program
float x;
double y;
y = x;
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
|
Floating-point to hex and floating-point to double are two different things.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
in my appliction, i have a floating point that i need to convert to double precision so i can transmitted over can bus.
|
|
|
|
|
That's fine. I was just pointing out that the subject of your post differed from its body.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi all,
How can I clear garbage from my buffer char buffer[100]; .
The last element in the buffer contains the following:
For example:
Text DataÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌt
// Most of this string is garbage ...
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Put a '\0' character where your string should end.
|
|
|
|
|
|
That is usually what you see in an uninitialized string in the debugger.
You can flush the whole thing by calling ZeroMemory( buffer, sizeof(buffer) ); if you want to.
|
|
|
|
|
You can initialize your buffer to all zeroes when you declare it by using = {0}
char buffer[100] = {0};
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
|
hi,
I need a function for string reverse and string concat.
not with strrev and strcat.
a user defined function
can anybody help me in this
|
|
|
|
|
Smells like homework to me. If it's not homework, you should never write your own where a standard version exists. If it is homework, you should try to do it yourself, and post here only when you're stuck. We're not here to do your course for you, most of us have done that already.
If you think about it, both are pretty easy. Think about what they do, how strings are stored in memory, and what is the *only* way that these functions can alter memory to achieve what they need to do.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can some kind soul tell me how to insert a char imediately after every occurance of another char in a string.
|
|
|
|
|
Isn't there a std::string.replace ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you use a CString you can use the Find and Insert methods. If you use a plain old character buffer then you can use a loop to scan every character in the string and memmove to shift the end of the buffer down and just an assignment to stick the new one in.
I think it is best that you figure out the rest of the algorithm for yourself. Good luck with it.
|
|
|
|
|
I think you can do this with a combination of string::find() and string::insert() in a loop
You might also be able to do it with a call to std::transform()
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
I was planning on doing it in a loop. Basically I need to iterate through a sub-document extracted from an XML file and before every "<" insert a 0x09 i.e. a tab char \t, also ensuring that I am not directly infront of a "
|
|
|
|
|