|
They have other functionality in there too. not just replacing. there is a couple things in there that it can do beside that in function alone just using the macro as you say... but its available in there to do these things. but what i was trying to say is there has be programability for this thing. There is not way your going to get it to function without some custom programability.
|
|
|
|
|
See my further reply above.
|
|
|
|
|
Hello,
What is best way to communicate shell hook function with my service?
I want to send message that window get activated.
|
|
|
|
|
Create a named event using CreateEvent[^].
Create a thread in your service using CreateThread[^].
In the thread wait for the event to be signaled using WaitForSingleObject[^].
If you want multiple notifications, for example, one for window creation, another for window activation etc., create one event for each and use the WaitForMultipleObjects[^] in your service thread.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I am not sure about the best practice, how ever I guess message sending to the main window would be a bad mechanism, cause in windows vista, you cannot sent message from a process of low Integrity to high Integrity. check here [^]for details
|
|
|
|
|
Maybe, there is another way to do what I want, without using hooks. I use shell hook to detect that user change activated window to other application. It is not good for me that every process must load my hook dll and fire that hook. But at this time I dont have better idea.
Any tips?
|
|
|
|
|
i want to know how to send the input that i was write in rich edit to device??
the idea is simple...when i push the S key...the device also received s...
|
|
|
|
|
I recommend giving more details about your project, what kind of device, how is it connected to the computer, what protocol is it suposed to be using, otherwise don't expect any usefull answers. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
From your description it would seem that you need to capture key presses, so your program would need to respond to the WM_KEY type messages and then send each character to your device. However you do not specify what type of device you are interested in so it is impossible to know how to send it the character.
I do not understand what this has to do with rich edit!
|
|
|
|
|
<br />
IXMLDOMDocument *pDoc = NULL;<br />
BSTR bstr = NULL;<br />
...<br />
bstr = filename.AllocSysString();<br />
hr = pDoc->load (bstr, b_load);<br />
filename is a CString type,how can i slove this problem?
i 've tried ,then i have no regret
|
|
|
|
|
The load 's prototype is below, this is the reason.
virtual HRESULT STDMETHODCALLTYPE load(
VARIANT xmlSource,
VARIANT_BOOL *isSuccessful) = 0;
One solution is this.
#include <comdef.h>
...
bstr = filename.AllocSysString();
_variant_t file(bstr);
hr = pDoc->load (file, b_load);
|
|
|
|
|
Or you can use the ATL class CComVariant in a similar way.
CComVariant file(filename);
CComVariant success(false);
hr = pDoc->load(file, &success);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi,
I have two applications suppose AppA AppB. Application AppA is window class application and AppB is non windowbased application. AppA, I have a message loop which used to get all regular messages. But I want to know how from AppB I will know which message AppA got.?
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
To clarify, you want AppB to monitor AppA's messages?
"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
|
|
|
|
|
Yes, exactly.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
|
You know that you could also use Spy++[^]. Shows you window messages and even more.
|
|
|
|
|
Why do you need to do such a thing? What exactly are you writing? Can't you just have App A to send only relevant messages to App B instead?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
My Basic requirement is to monitor system standbay/shutdown message from window .But i need to do that in AppB (which is a non window based application). But application AppA is window based so i am receiving all these StandBy/shutdown messages.
So if there is a way to check when system goes shutdown from non-window based appliacations , than my need will be satisfied.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
why don't you add a window to your non-window app, so you can get window messages?
you could make it invisible, or locate it outside the desktop area.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
use SetWindowsHookEx Function,it can get the message which passed to the target thread you want to watch
|
|
|
|
|
Hi al
how to work on timer in vc++ in vs2005...
and how to go class wizard?
i remembr ctrl+w in vc++6.0,but in vs2005 it not works..can anyone sugest?
Regards
Gany
|
|
|
|
|
1. open the dialog in the resource editor.
2. open the 'Properties' window for the dialog
3. at the top of that window is an ugly little button called 'Messages', click it.
4. that will show a long list of messages. find "WM_TIMER" and click in the white space to its right. an "Add Handler" option will appear.
intuitive!
|
|
|
|
|
Right key to the class,click "attribute", --->"message"--->"WM_TIMER"
::Settimer()
|
|
|
|
|
Hi all
I am trying to a code a vc++ project where the xml data needed to be added in tree control.can any one help me on this?
I was earlier using vc++6.0 now changed to VS2005.Is there any difference in usign vc++ between thse two..?
Regards
Gany
|
|
|
|