I was suggesting additional counters, not replacements. It's useful to monitor Private Bytes and Virtual Bytes, because how one changes relative to the other gives further clues about the nature of the leak.
I've written and SDI program. In this program I've created a dialogbar and added it to a rebar control in the OnCreate method in CMainFrame. I would like to have the ability to let this control appaer and disappaer with a click in the view menu but I don't know how to do this.
In a recent project I used WH_JOURNALRECORD to moniter certain events occur in a particular application window, but as MSDN said, as soon as the user press "CTRL+ESC" or "CTRL+ALT+DEL", all installed WH_JOURNALRECORD hooks will be wiped out by the OS... When this happens, my application does not know, so it would still wait for messages(which will never come anymore) from the target window.
My questions is that, is there any way to verify whether a HHOOK handle is still on a "valid" state, so I can reinstall the hook if needed? Thanks
When this happens, my application does not know, so it would still wait for messages(which will never come anymore) from the target window.
You actually can detect eviction of the hook by the OS. From this[^] article,
"Windows sends a WH_CANCELJOURNAL Windows message when it evicts the hook. The trouble is, the message doesn't have a Windows handle, i.e., it is not directed at any window, so how do we get to know about it? By now, the answer should be obvious, use another systemwide hook, this time a Windows Message Hook (idHook = WH_GETMESSAGE). This hook will get called whenever any Windows application calls GetMessage or PeekMessage, so we can catch WH_CANCELJOURNAL there and inform our UI that recording/playback has been interrupted."
If you want source code, you can take a look at the linked article.
One possibility is that some other app installed a GETMESSAGE hook and is not forwarding it to subsequent hooks in the chain.
I also realized that my code (the one in the article) is potentially buggy. According to MSDN, global hooks, except for journal hooks, need to reside in a DLL. But my GetMsgProc doesn't. Could you try making it a thread specific hook instead, by providing the current thread id as the last parameter?
The hook's thread identifier should be the same thread identifier as the thread containing the window that will receive the message. If you set the hook from some secondary thread, it might not receive the message.
Hi; you'll need to get an RGB (red, green, blue) colour for the element you wish to alter; and then once you have that RGB you'll need to run various algorithms on it to adjust contrast, colour etc.
One way of doing this is to convert the RGB colour into hue, saturation and value space (HSV - see link on wikipedia below). Once as an HSV value, adjusting the saturation is similar to adjusting the 'colour' on your TV. Adjusting the 'value' adjusts brightness, and if you apply a non-linear function (like raise-to-a-power) to the value, you can get a constrast effect. (more: on the Wikipedia)
Once you've adjusted the HSV value you'll need to convert it back to RGB, then set it back into your HDC.
I have made an application which can convert PPT slides to JPG images using powerpoint type library.
Now i want to port the application to MAC. I m not able to find any developing environment in which i can port it to mac. I have a MAC G4 iBook and Office 2004 for MAC .. Please help me...
Doxygen[^] is a usefull tool for that. I just used it once but it was working quite well. I think there is a tutorial (not sure anymore) on codeproject about how to use it and how to integrate it with VC++.