473,569 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with C++ Hook

Hello

I get a WM_USER+1010 via PostMessage sent to my window by another process.
I wanted to set a Hook to somehow catch this Message, so i did:
myHook = SetWindowsHookE x (WH_MSGFILTER , (HOOKPROC)(Desk topCallback),
NULL, GetCurrentThrea dId());

(instead of WH_MSGFILTER i also tried others)
in Spy++ i see that the message WM_USER+1010 is received by the window,
But it seems to never reach my callback function! When i change WH_MSGFILTER
to something else,
different Messages land in the DesktopCallback , but never a WM_USER+1010

What am i doing wrong?

Thank you
T.
Aug 5 '05 #1
1 1739
You will probably have better luck asking this question on one of the
microsoft Visual Studio newsgroups.

http://support.microsoft.com/default.aspx?pr=newswhelp

This newsgroup is geared towards standard c++ language questions only.
Your question is specific to the MS Windows API.

--John Ratliff
Aug 5 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2916
by: Kostatus | last post by:
I created a WH_KEYBOARD hook, it works with virtual keys but it does not seem to capture any WM_CHAR messages. Is there any way to override my default WM_CHAR event in the same way that the WH_KEYBOARD hook does it for WM_KEYDOWN and WM_KEYUP?
5
4732
by: murlbrown | last post by:
I am using a class library built by michael kennedy that creates a system wide hook on the WH_KEYBOARD_LL, but I wanted to changed it to become a hook for a RichEdit box in another application. I modified the class keeping a majority of his code, and built a c#(.net) front end to use this c++ built core library, passing it the hook type of...
5
7783
by: Arnold | last post by:
Hi, I want to make a Global CBT Hook, but the CallBack Method is never raised. SetWindowsHookEx return me a Handle to the Hook, but when i try to uninstall the hook the UnhookWindowsHookEx generate an error (1404: Invalid hook handle.). A part of code is this: Install Hook: .... CBTCallBack = new...
1
2641
by: murlbrown | last post by:
Basicly im trying to determine when a new line has been appended to the textbox of another application. Using spy++ I see that the msg (wm_user + 97) is being sent, which is the EM_SETTEXTEX msg(combination of wm_settext and em_replacesel). Below are a few lines of code of what im trying to accomplish: private const uint WM_USER = 0x0400;...
0
1695
by: murlbrown | last post by:
I am using a class library built by michael kennedy that creates a system wide hook on the WH_KEYBOARD_LL, but I wanted to changed it to become a hook for a RichEdit box in another application. I modified the class keeping a majority of his code, and built a c#(.net) front end to use this c++ built core library, passing it the hook type...
7
26523
by: jpierson | last post by:
Hi, I am tryin to create a keyboard hook that sends the keystroke ctrl + pause/break. I haven't used keyboard hooks before so I'm not too sure how to use them public int MyKeyboardProc(int nCode, int wParam, int lParam) {
0
2483
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form containing a Edit(textbox) and button to test at first. When I change text in Edit or press button to setText value, I want to monitor the change event. ...
3
2138
by: Sami | last post by:
Hello, I am new to Python. I tried to hook my own ExceptionPrintingFunction sys.excepthook but it does not work. This is what I wrote: ----------------------------------------------------------------------- import sys
22
6403
by: schneider | last post by:
I need to hook the system mouse down event. I'm trying to replicate how a context menu hides when the mouse clicks outside of the control. Thanks, Schneider
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.