Solved

How to allow a disabled window to receive mouse messages

Posted on 2008-06-24
3
235 Views
Last Modified: 2013-12-03
I have a customised edit control - the non client area is modified to display what looks like a button (eg like a combo box).
This works perfectly with both dynamic creation and subclassing.

Now I would like to extend the functionality and allow an action based on this 'button' click even when the edit box is disabled.  Unfortunately the disabled window does not receive any mouse messages (at least I've not found where they are being filtered out) so the idea is shot down in flames.

Question.  (I think any of the following would be suitable.)
How can I force the disabled window to receive mouse messages?
Where are the mouse messages being filtered out - how to disable that filtering?
How can I disable the client area of a window but still leave the non client area enabled?
Any other alternative?
0
Comment
Question by:AndyAinscow
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 21856317
>>Any other alternative?

What about a message hook local to your process? See http://msdn.microsoft.com/en-us/library/ms997537.aspx ("Win32 Hooks")
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 21856359
Interesting idea.
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 21863232
OK, I can get that to work.  It isn't so elegant but...
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now