|
Hi ...
Please tell me how to access the performance objects from perfmon. I am new to this.
I came to know that we can access the objects from the Provider classes. But please tell me how to access a single object i.e Pool NonPagedBytes.
Thanks in advance.
Suresh
SUresh
|
|
|
|
|
suresh_suryavanshi wrote: Please tell me how to access the performance objects from perfmon.
There are a few examples at the bottom (comments section) of this article.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi DavidCrow,
I saw the example. But i am newbie for this. If possible give me the exact steps and which functions to use. i gone through the msdn library... now i am totally confused.
I want to access the PoolNonPagedBytes of Win32_PerfFormattedData_PerfProc_Process for only one process. Please suggest me the steps.
I am very greatful if u help me out to sort this problem.
Thanks in Advance.
Regards,
Suresh
|
|
|
|
|
suresh_suryavanshi wrote: If possible give me the exact steps and which functions to use.
I provided you with actual code. Short of hand-delivering it to you, what more do you want?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hey there,
I would like to disable paint-updates to my tree control while i fill it with data using MFC, but cant
find the api to use.. can anybody help?
|
|
|
|
|
Have you tried using LockWindowUpdate() and UnlockWindowUpdate().
|
|
|
|
|
flippydeflippydebop wrote: I would like to disable paint-updates to my tree control while i fill it with data using MFC, but cant
find the api to use.. can anybody help?
To switch off painting call SetRedraw( FALSE ) . To turn painting on again SetRedraw( TRUE ).
|
|
|
|
|
cheers guys... I have just used lockWindowUpdate/UnlockWindowUpdate which works a treat..
thanks for your prompt replies...
|
|
|
|
|
flippydeflippydebop wrote: I have just used lockWindowUpdate/UnlockWindowUpdate which works a treat..
A locked window cannot be moved.
|
|
|
|
|
I'm completely new to VC++ but starting to learn.
How do I get an output in a dialog window. For example if I want to count every time the mouse cursor is moved within the dialog window. This integer should then be shown in the window. I want it to be displayed on the grey background and not in a textbox.
Thanks for any help!
|
|
|
|
|
You have an output and you want to show on dialog window and you dont want to show on an editbox do you want to show on screen ?
|
|
|
|
|
xkrja wrote: I want it to be displayed on the grey background and not in a textbox.
Take a look at CDC::TextOut , CDC::DrawText and CDC::SetBkMode .
|
|
|
|
|
Put a static or edit control on the dialog. Associate a CStatic or CEdit member variable with the control using ClassWizard (Ctrl+W). Update the control with whatever you want by using the SetWindowText() method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I had a date and time in CString format.
i.e CString dt("1980-10-10") and CString dt1("1970-09-19")
now i need to compare the dates.
is there any class/structure so that i can push the string values and compare the dates?
and i need to do the same for time also.
Please give me a solution.
Ramchandra
|
|
|
|
|
Why don't you just compare the two strings. If they are similar it means that the days match else they do not.
Other wise you can take all the values from the strings, tokenize them and then compare each one.
http://finance-old.bi.no/~bernt/gcc_prog/doc_date.pdf[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I need to check which one of them is latest. so string comparision dosent work.
Ramchandra
|
|
|
|
|
Are you sure a string comparison doesn't work?
I think it should, provided you have got the same format in both strings, i.e. YYYY-MM-DD, as you seem to have.
A string comparison starts from the first char in the strings, and you have got the most significant digit in the first char.
So the comparison starts at the most significant digit and moves towards the the least significant digit.
I think it should work. But it wouldn't work for the YYYY-DD-MM format.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
CTime t1( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999
CTime t2( 1999, 3, 29, 22, 15, 0 ); // 10:15PM March 20, 1999
CTimeSpan ts = t2 - t1; // Subtract 2 CTimes
int iDays = ts.GetDays();
Hope this is useful
|
|
|
|
|
thanks,
i can change my code to support this format.
Ramchandra
|
|
|
|
|
Most welcome...
|
|
|
|
|
Why aren't you using COleDateTime::ParseDateTime() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
i am working on a application so in that application i have to add a facility for sheduling.
problem: i have to run a exe at the given time such 11pm, weekly,monthly etc.
i am thinkin its not possible with ontimer event but idont know i am right or not.
please tell me how it is possible.
i want some such type of application for study so please help me.
thanks & Regards
Bankey
|
|
|
|
|
Banks K wrote: its not possible with ontimer event
You can of course do it in the OnTimer event but that won't be a good idea. You should use a thread which executes itself evey minute.
Banks K wrote: please tell me how it is possible
When the OnTimer event is fired, you can get the current system time and date using GetSystemTime.
If the values in the structure for GetSystemTime match with what you have, You can execute your exe.
Alternatively you can also use a dedicated thread for this task and check if the system time is according to the values that you need. If values match execute your application.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
actually i don't want to use ontime event,
i want to know how system clock is working because this clock is working also when system shutdown.
i want to make same application which match with system clock.
|
|
|
|
|
It sounds like you need a service instead. Otherwise, your applicaton would only be running when someone was logged in. In it, set a timer for every minute. When the timer event fires, check through the list of scheduled jobs to see if any need to be started.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|