|
=[ Abin ]= wrote: 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.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Well, for some odd reasons the GetMsgProc function in my application was never called, even though SetWindowsHookEx(WH_GETMESSAGE,GetMsgProc,m_hInstance,0) had succeeded... Weird isn't it?
It was an MFC dialog based application.
|
|
|
|
|
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?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
If he makes it a thread-specific hook, then it might still not receive the expected message notifying the journal hook was cancelled. Better to make it global and place it in a DLL.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
The MSDN[^] documentation does say that Windows sends the message to the application that set the journal hook, so I guess a thread hook should be okay.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
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.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
I have CDC* or HDC.
I want to change any color parameters such as contrast.
Please help me.
Dk_2000
|
|
|
|
|
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.
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
|
|
|
|
|
here's how you do a gamma adjustment:
double fGammaInverse = 1.0 / fGammaAdjust;
BYTE lut[256]
for each pixel, p
for each color component c in p
double ind = (double) c / 256.0;
c = (BYTE) (256 * pow (ind, fGammaInverse));
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
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...
my mail address is catbbs7@yahoo.com
Regards
Vishal
|
|
|
|
|
do any one know any good method or
have good tips for doing documentation
of VC++ code
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
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++.
|
|
|
|
|
Hi,
probably you might try this one?
GSte
|
|
|
|
|
seems that you forgot the link...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
|
I recommend doxygen as well.
Here[^] you find one of my articles how to get started
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
Thank you everyone
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I used AutoDuck about 10 years ago. Its author, Eric Artzt, used to work for Microsoft. Last I heard he left, so I'm not sure if his utility has been revised any more or not.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi
I am making a Slide-Show in PictureBox in Visual C++ 7.0 .
I have a statement "Controls->Add(PictBox)" in two different functions.
First: In constructor.....It shows the Tooltip like this
"__property enum System::Windows::Forms::System __gc *System::Windows::Forms::Control::Controls"
and works fine
while
as I put the time intervals....
Second: In "OnTimedEvent" function...It shows the tooltip like this
"__property System::Windows::Forms::Control::ControlCollection __gc *System::Windows::Forms::Control::Controls"
and gives error "left of ->Add must be poing to class/struct/union"
How can I solve this error? or Change the Property?
Thank you
Janak
|
|
|
|
|
Hi!
I have created 2 sound buffers.On first one I've set notyfication points and on the other i didnt.But even when I use second buffer for playing, my notification events still occur!!
Why this happens???Should it not whatch only my first buffer??
Thanks in advance!
|
|
|
|
|
I want to create graphical equalizer...
I want to redirect sound stream to internal speaker...
I use DirectShow.
Please, tell me, how can I do it or where can I find info about it.
Dk_2000
|
|
|
|
|
I can't answer specific questions about DirectShow here, but in general to create a graphic equaliser you'll need to take the input sound, and apply a Fourier Transform (often a Fast Fourier Transform, or FFT - see here or google for more details. This converts an input buffer from a set of sampled volumes into its component frequencies. You can then scale each frequency differently; lower and higher frequencies can be amplified for example, and mid-range frequencies could be reduced. After that, an inverse FFT converts the frequencies back into their equivalent samples, which can then be played out.
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
|
|
|
|
|
Hi all,
In my application of office automation, i add to my project object library(*.olb) of the version present on my system.
But in this case i will only be able to run my application only for that version of office whose library i have included.(In my case, it is office 2000).
in short, automation application developed using object library of office 2000 will run for office 2000 only which is actually not intended.
How should i solve this compatibility issue?
i may be asking a very naive Question. but i don't have any idea on this.
Kindly Guide.
Regards,
Ankush Mehta
|
|
|
|
|
Ankush Mehta wrote: in short, automation application developed using object library of office 2000 will run for office 2000 only which is actually not intended.
What kind of problems are you experiencing? I have some word automation in my app it compiles against Word 9 (office 2000). The target PCs all have Office 2003. Everything works just fine. I did have to modify the way I was doing some stuff but other wise all works well.
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|