Solved

How to allow a disabled window to receive mouse messages

Posted on 2008-06-24
3
236 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ question 3 62
Detect file exist or not 3 132
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 74
How to print into std::string like sprintf using C++11? 12 49
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

910 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

19 Experts available now in Live!

Get 1:1 Help Now