|
I don't think nanosecond precession is possible with windows timers. But i believe with multimedia timers nanosecond precession is possible.
|
|
|
|
|
Mohammad Khodaea wrote: Do we have any timer with the nanosecond precision or no?
No, and anyway Windows is not a real-time operating system so you can't achieve that precision. I'm afraid you'll need to switch to a real-time operating system and I'm even not sure that you'll be able to reach that precision.
|
|
|
|
|
Mohammad Khodaea wrote: Do we have any timer with the nanosecond precision or no?
I think Yes! please check QueryPerformanceCounter
You can find C# code and details here[^]
|
|
|
|
|
see this
visualcsamples.blogspot.com/2009/01/microsoft-visual-c-timer-example.html
i made it...
|
|
|
|
|
Mohammadj wrote: i made it...
What ?
Is that a sample for QueryPerformanceCounter ? Or something related with Nano seconds ?
|
|
|
|
|
i made that example in my blog
|
|
|
|
|
Agreed that you made.. What is that it does?
|
|
|
|
|
press the left button start the timer ( start moving the rect )
press the the right mouse button stop moving
'
and WM_Timer to control moving
|
|
|
|
|
Please read what the OP has queried and then try to answer the query. His query and your answer does not match dear friend.
This is an example for Timer. I appreciate that. but what the OP wants is different.
|
|
|
|
|
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219208304 (LWP 3526)]
0x00ac315a in g_mime_message_get_body () from /usr/lib/libgmime-2.0.so.2
wat does dat mean???
what does the number 0x00ac315a signify..??
|
|
|
|
|
It probably means that you are trying to access that address (read or write) but do not have permission to do so. The best way to solve such issues is to use your debugger to track down the problem. This error is so generic that it is impossible to give you more information.
|
|
|
|
|
how do we use a debugger????
u mean gdb ???
for debugging we have to put debugging symbols in the program??? like ifdef DEBUG ???
|
|
|
|
|
shrims4u wrote: u mean gdb ???
I guess so, I never developped under linux a lot. The debugger let you set breakpoints in your code, inspect the different variables, inspect the call stack. I think you'll need to search a good tutorial on how to use gdb on the web. Without using your debugger you won't be able to good very far. It's not only for your current problem but also for the future. Learn to use your debugger properly and you'll see that it will save you a lot of hassles.
|
|
|
|
|
I am using the below tool tip code for showing a tooltip when mouse is moved over a row in CListBox.
Row in CListBox has a file name, I am showing the path of the file as a tool tip.
m_ExistingMap.Lookup(strText,strTipText);
int nLen = strTipText.GetLength(); // nLen is 120 characters
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, nLen+1 );
else
_mbstowcsz(pTTTW->szText, strTipText, nLen+1 );
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strTipText, nLen+1 );
else
lstrcpyn(pTTTW->szText, strTipText, nLen+1 );
#endif
I am not observing a crash when nLen =80
|
|
|
|
|
If you check out the documentation for the TOOLTIPTEXT[^] structure you will see that szText is defined as 80 chars long, you can't copy the 120 chars long string into the 80 char long buffer.
> 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. <
|
|
|
|
|
VKupunaram wrote: I am not observing a crash when nLen =80
So then what's the problem?
"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
|
|
|
|
|
i need convert tiff to pdf using pdflib ?. I wish your help. thanks very much.
nothing
|
|
|
|
|
Do you mean this pdflib[^], the commercial product, for which you've paid money, which should entitle you to some level of support...from that company?
Well, they do have a developer center with samples and a cookbook. A quick search of that[^] highlights this page[^]. It might be in Java, but it tells you how to drive the API to produce a PDF from a TIFF file...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Write a class Namelist that serves as a list of names. Each name is
up to 20 characters long. An object of the type Namelist can hold
up to 10 names. You work with a 2-dim array of char.
Member data and methods:
The class has an array of 10 arrays of 21 char:
char list[10][21];
(Because a name can be 20 char long).
It has a data member that keeps track of how many names are in the
list. You can add more data members to the class if you want.
* The class has a constructor that initializes the object to empty.
* It has a method void add(char name[]) that adds name to the list
? if name is not already in the list, otherwise it does nothing.
? Also,if the list as already full, it does nothing.
* It has a method int contain(char name[]) that checks if the name
? is in the list. If yes the method returns 1, otherwise 0.
* It has a method int numNames() that tells how many names are in
? the list.
* It has a method void input() that reads one name from stdin, then
? if the name is not in the list, it adds it, otherwise does nothing.
* It has a method void output(), that prints the whole list to stdout.
All data members must be private, all methods public.
You have to #include <string.h> and work with the function strcmp(),
to find if two strings are equal.
In main() declare a Namelist object, read several names from a
file using redirection and then print out the list. Make your own
input file so that some names in the input file occur more than once,
so that you can test if such names are read in only once. Also, make
the input file so long that the add() method will not add any more
names to Namelist.
Input through redirection:
The program code is written like reading from the keyboard. But
when you run the program you type after the executable: < "file",
"file" is the name of your data file. This replaces the keyboard
input with your file.
Turn in online of your program source
code, and your input file of names and a sample run with that file.
|
|
|
|
|
"hi i need this program immediately in c++"
Sure. My usual fee for doing someone else's homework for them is $500 US per hour with a 4 hour minimum.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
sonuchill wrote: Write a class...
I'm pretty sure that means you, not us.
"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
|
|
|
|
|
But your teacher didnt say anything to us for write this program?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Maybe he did - maybe progressive colleges are now teaching "How to get answers from CodeProject"...the OP's failed that course as well
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
sonuchill wrote: hi i need this program immediately in c++
Sorry, time is up.
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]
|
|
|
|
|
No man. *New* is always *New* as long as it is tagged.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|