|
Hi,
For last 3 months i am looking for some one who can help me to get process wise cpu usage in NT (i have the procss ID). could anybody pls. tell me how to do that. it will help me alot.
* could u pls. tell me how to get process wise memory usage in win 9x?
pls. help me to get out of this problem.
pradip
|
|
|
|
|
thank's for getprocesstime() but from this time how will i get the cpu usage of that process.
pls. help me
pradip
|
|
|
|
|
thank's for getprocesstime() but from there how will i get the cpu usage of that process.
pradip
|
|
|
|
|
|
thank u for the code which u have posted, but could u pls. tell me how to calculate the process wise cpu usage if more than one instance of a process (i.e "MSAccess") is running.
if it is possible for u pls. send me some code.
pradip
|
|
|
|
|
My project configuration is debug, I am running my program under the debugger and I have included the following code (as doco suggests):
#define _CRTDBG_MAP_ALLOC<br />
#include <stdlib.h><br />
#include <crtdbg.h><br />
<br />
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );<br />
But still no line numbers!
Detected memory leaks!
Dumping objects ->
{4879} normal block at 0x00D02C78, 12 bytes long.
Data: <Up: -0.012 > 55 70 3A 20 20 2D 30 2E 30 31 32 00
.......
etc
Clearly I am doing something wrong.
Any advice will be a great help. I am running under VS .Net btw.
-A-
....now where does this plug in....
|
|
|
|
|
Why is it that C++ has header files while Java and C# don't?
|
|
|
|
|
It is for extending the programming language.. You can create a function which takes many lines to write and put it in a header file so when you need that code again you dont rewrite it but you just include the header file..
Well... I am a beginner ...
|
|
|
|
|
Because C++ has to be linked. Compilation units need to know about the declarations of types in other compilation units. Interpreted languages can wait until the VM is running to test whether all required compilation units are present.
C++ needs a way of not ending up with duplicate definitions, in multiple compilation units.
Header files generally contain just the declarations.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Rudyard Kipling is wrong; The Earth can never be yours, nor everything that is in it!
|
|
|
|
|
Actually I hated it when the first time I started to learn Java and C# and found out that they don't have header files, every function body reside in the class definition making the class definition so lengthy and hard to read, sometimes they look like a mess to me. I think I like C++ header files very much.
|
|
|
|
|
it make you clearer for your Class definition.
at the same time ,It is a good iead to protected your source code.
dupengfei
|
|
|
|
|
Hi,
I have a _non-MFC_ dialog-based app with a tree view. Everything is working very nicely (thanks to some great code examples by Bengi on this site). However, at the moment the only way of ending the label editing of a tree view item is to click elsewhere in the window. I would like it to behave like Windows Explorer, so that if the user presses Escape or Enter, the TVM_ENDEDITLABELNOW is sent to the treeview and the label editing is ended. However, I cannot get this to work at all. I have tried sending the message under WM_CHAR and WM_KEYDOWN with case VK_RETURN and VK_ESCAPE, but no joy. I have read elsewhere that it is difficult setting this up, but haven't been able to find a solution.
Could anybody tell me how I can go about doing this?
Many thanks to anyone who can help,
KB
|
|
|
|
|
Hi,
Okay, I found this article on MSDN that discusses this problem:
http://support.microsoft.com/default.aspx?scid=kb;en-us;130691
Unfortunately I'm relatively new to coding C++, and I don't know how to go about implementing the advice given in that article.
From the article:
"To work around this problem, subclass the edit control in response to the TVN_BEGINLABELEDIT notification that is sent by the tree view control when the tree view is about to start label editing for an item. To obtain the edit control's window handle, send the tree view control a TVM_GETEDITCONTROL message.
The subclass procedure should handle the WM_GETDLGCODE message by returning DLGC_WANTALLKEYS. This allows the tree view's subclass procedure to handle ESC and ENTER keystrokes."
So, if I understand correctly, I need to subclass my tree view control here:
<br />
if(((LPNMHDR)lParam)->code == TVN_BEGINLABELEDIT)<br />
{<br />
hEdit=TreeView_GetEditControl(hTree);<br />
}<br />
If anybody could tell me how to subclass this and handle the WM_GETDLGCODE message accordingly, I would be very grateful. (_NON-MFC_ ) Sorry if this is a really basic question.
Many thanks,
KB
|
|
|
|
|
Hi,
I have a listbox in my _non-MFC_ dialog-based app, and I need to have a horizontal scrollbar for when the text extends out of the listbox. I know that you have to set LB_SETHORIZONTALEXTENT to get this to work (why oh why didn't they make it as easy as the vertical scrollbar?), but I have had no joy in getting it to work. I guess that this is what I need to do:
1) Whenever items are added to the listbox, or the listbox is resized, find the longest string (using strlen()).
2) Calculate the width of that string in pixels.
3) Set LB_SETHORIZONTALEXTENT to the calculated number.
Steps 1 and 3 are easy, but it's step 2 I have problems with. How can I find the width in pixels of the longest string? The only examples I can find are all written in MFC, which doesn't help as I can't find the equivalent non-MFC functions (eg. CDC::GetTextExtent).
I anyone can tell me how to find the width of a string in a listbox in pixels without using MFC, or just tell me how to get the horizontal scrollbar working in a non-MFC listbox, I would be very grateful.
Many thanks,
KB
|
|
|
|
|
|
Thanks! That is exactly what I needed. I found a function using that API call along with LB_SETHORIZONTALEXTENT here:
http://www.catch22.org.uk/tuts/dirlist.asp
that does exactly what I needed, with a few minor qualifications.
Thanks again, your help is much appreciated,
KB
|
|
|
|
|
Hi
I have been looking at some of the examples that show how to use tabCrtl. The thing is that I found some where the dialogs were Cdialog instead of of being managed by a tabCtrl class. I now know how to do them (Thanks folks). One problem is that when using the key 'tab', I am not able to move to the different windows. Has anybody solve this problem?
Also tried one that was using stricly tabCtrl classes, but now don't know how to use the events when a button is pressed.
Could anybody share an example of a program that uses tabCtrl and has some buttons with a function behind?
Thanks.
rubencmos@hotmail.com
|
|
|
|
|
I have a dialog that is dll. This dll gets launched by a COM server control. For some reason, the dialog when it gets launched cannot be repositioned. The dialog's controls work, but I cannot move the dialog. I have tried to interrogate the dialogs "IsEnabled" accessor - it returns true. What is the atribute of the dialog that is controlling this behavior?
Thanks
|
|
|
|
|
Try MoveWindow() and/or SetWindowPos().
Kuphryn
|
|
|
|
|
I have alreay tried that. When the dialog comes up, it's controls are active - I just can't reposition the dialog by clicking on it and dragging the mouse. It seems that it is frozen over it's parent. This dialog is wrapped in a different dll than the parent.
Any additional help is certainly appreciated
Thanks!
|
|
|
|
|
Hi,
I was wondering if MFC has anything like a JTextArea in java swing which will allow me to have multiline text to show in that control, because in edit control I can't see the whole text.
Please let me know
|
|
|
|
|
The CEdit control has a multiline property that will allow you to display multiple lines.
Artificial intelligence is no match for natural
stupidity. small>
|
|
|
|
|
Hi,
I looking for a possibility to access (read and write) the information tags (like tilte, author, subject and so on) of a JPG file.
Thanks, Thorsten
|
|
|
|
|
Check Davide Pizzolato's Cexif[^] library.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|