Not receiving MouseWheel message because focus is removed from control

I am trying to implement some mousewheel interaction as can be seen in e.g. Visual Studio. When the mouse is over a control and the mousewheel is scrolled the control under the mousewheel is scrolled instead of the control that has focus. I do this by adding
a MessageFilter (but also tried a WH_CALLWNDPROC hook) and detecting the WM_MOUSEWHEEL message as it passes and pass it to the control under the mouse cursor. This all works as expected when at least one of the form controls have focus, however sometimes the
focus is lost fi when a control in a container is disabled and there are no other enabled controls in that container. In that case the WM_MOUSEWHEEL event is never send and it doesn't work anymore.
To test this behavior I created a test application that contains a message filter and a control that is derived from UserControl. That control contains a button that will have focus. Then the button Click event will disable the button itself. After
that the focus is lost and WM_MOUSEWHEEL isn't received by my filter anymore.
So how can I make sure that the WM_MOUSEWHEEL is always send by a) always have a focused control (how do I do this)? b) is there another way to intercept WM_MOUSEWHEEL even when no control is focused?

I agree with you that is an issue we need to deal with...
Is this a bug in .NET? Why is the keyboard focus set to a control (as we can use TAB to navigate) but Windows doesn't know it has a focused control?
...I added a line inside that method to get the control's parent focused, you could have a try.
Your idea does work, however this application is just for reproducing the problem. The real application is much more complicated, but I have implemented a workaround. It is something like:
void UpdateControls()
    var hadFocus = containerControl.ContainsFocus;
    containerControl.Controls.UpdateVisualState();
    if (hadFocus && !containerControl.ContainsFocus)
        containerControl.Focus();
I think there could be a lot of other situations that could result in a loss of focus. I wouldn't like to write these kind of workarounds for each case. Isn't there a somewhat more robust solution to this problem? How does Visual Studio make sure that there
is always a control with focus? I mean I don't see any problems occur in the IDE of Visual Studio where the mousewheel isn't working because of focus loss.
Hello,
The workaround you shared works and I agree with you that we could be sure that usercontrol could get focus but it seems like that usercontrol doesn't get any focus.
To confirm whether there is any way to solve this issue and submit this issue to product team, I would recommend you submit a feedback in
http://connect.microsoft.com. 
You could share the link of your feedback here that we could help you vote it. I think that Microsoft engineers will evaluate them seriously and provide you better support. In addition, you can post the answer here once the issue is resolved.
Thanks for your sharing and understanding. 
Best regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Post CUPS 8.5(3) upgrade getting CUPC "did not receive your message because it could not be delivered".

    I upgraded CUPS from 7.0(2) to 8.5(3) and now CUPC 7.1(1a) clients can’t chat each other, they now get the following message.
    Rose, Bob did not receive your message because it could not be delivered. (3:14 PM)
    Wireshark shows response back from CUPS server ip as 408 Request Timeout.
    Only the server was upgraded, not the clients.

    After several hours with Cisco TAC we found CSCsl63971  (case-sensitivity on proxy domain causes CUPC problems) and were able to resolve the issue so users can continue to use CUPC 7.1(1)

  • I recently switched from an iPhone to an Android phone. I cannot receive text messages because Apple will not "release" my number from iMessage. I see others have had the same issue. How did you solve the problem, if you did?

    I recently switched from an iPhone to an Android phone. I cannot receive text messages because Apple will not "release" my number from iMessage. I see others have had the same issue. How did you solve the problem, if you did?

    This tech note addresses your problem: iOS: Deactivating iMessage

  • TS4268 I CAN NOT RECEIVE TEXT MESSAGES FROM PEOPLE USING IMESSAGE - I HAVE MY IMESSAGE TURNED OFF BECAUSE I DO NOT WANT TEXTS GOING TO ALL MY ACCOUNTS - HOW DO I RESOLVE THIS PLEASE HELP - MISSING SEVERAL IMPORTANT COMMUNICATIONS...

    I CAN NOT RECEIVE TEXT MESSAGES FROM PEOPLE USING IMESSAGE

    On an iPhone your iMessages will go to your phone number.
    You can select another email to use on iPod or iPad.
    Go to settings
    Messages
    Send and receive
    Check your phone number and uncheck the common Apple ID you share so your messages will not go to other devices.

  • IPhone 5 not receiving photo messages

    Help? My iPhone 5 is not receiving photo messages. Anyone trying to send me photos just gets the exclamation point. When I send photos they go through just fine. iMessage, SMS, MMS and Group Messaging are all switched on. This only started happening a few days ago and I have not recently changed any settings or downloaded an update. Advice?

    Hello ,
    Thanks for using Apple Support Communities.
    Please follow the troubleshooting steps to fix this issue of not being able to receive MMS.
    To resolve issues with sending and receiving MMS, follow these steps
    Go to Settings and turn airplane mode off.
    Go to Settings > Messages and turn MMS Messaging on.
    Go to Settings > Cellular and turn Cellular Data on.
    Go to Settings > Cellular and turn Data Roaming on if you're roaming on a cellular provider network that is different from your billing provider's network.
    Make sure that you have a cellular data connection in the status bar of your iPhone.
    Go to Settings and turn Wi-Fi off. Open Safari and navigate to www.apple.com to verify that you have a data connection. Turn Wi-Fi back on to continue using Wi-Fi for other features. If your cellular data connection isn't available, follow these steps.
    Make sure that you can send and receive SMS. If you can't send and receive SMS, see the "Issues with sending and receiving SMS" section, above. MMS might not be available while you're on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn more about which network your phone supports.
    Restart your iPhone.
    Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    Remove your SIM card and insert it again.
    If you still can't send or receive MMS, follow these steps
    Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    Go to Settings > Messages and turn on group messaging if you're sending a group message.
    Make sure that you're using the area code with the contact's phone number. When you send messages internationally, you also need the contact's international code.
    If you're using a "Pay as you go" MMS plan, make sure it has enough available balance. If you're unsure of your MMS plan or available balance, contact your carrier.
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and recreate the contact from the Contacts app. Send a new message to the new contact.
    Back up and restore your iPhone as new.
    If your carrier has recently ported your phone number, the porting process might not be complete. Contact your carrier to confirm that the porting process is complete.
    Contact your carrier to verify that you're provisioned to send SMS and are in an area with cellular coverage.
    Contact your carrier to verify that there aren't blocks or filters on your wireless account preventing you from sending SMS.
    Your carrier might require modified APN settings to use MMS.
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Take care,
    Alex H.

  • Unfortunately messaging has stopped and not receiving text messages

    I, am also having issues with "unfortunately messaging has stopped", AND, NOT receiving text messages. I also have 2 other Droid Ultra's on my account doing the same thing. This is totally unacceptable!!! I am not paying $600 for a piece of crap phone that does not work. I had my phone recently replaced because Verizon thought that was the problem. I can't even get the message screen to stay up long enough to type a message, if it opens at all!
    Also I am getting tired of NOT receiving messages sent to me! When I do get them, the icon tells me I have a message with a number usually no more than a designation of 2 but reverts back to a 1, and, when I open the message, read it, and close out of it, if it does not close out on its own because of stopped messaging, the number on the message icon does not clear out. I have to turn off the phone and restart it to clear it. This is not acceptable and I would expect better from Verizon, not the run around!! If I had to send an urgent message and get a reply, do to the fact I am disabled, and this is my only way to communicate, that this is extremely unacceptable!!!!
    I expect this to be resolved yesterday, not when you all get around to it, OR, issue me a Samsung!!! I am sure all of the others would agree!!!
    I look to hear from you ASAP!!

    Hello,
    I am using the messaging app that was preloaded with the phone, the green face icon. I do not have an "Android Keyboard" app, but I have cleared the cache on the "Messaging" app, several times. I have also gone to the Verizon store where an associate did a soft reboot, telling me that would work. A very short time later, the error message started appearing again--so this did not work either.
    The error message comes very sporadically. Sometimes several in a few minutes, other times not for hours.

  • Iphone5 MMS: older phones not receiving group messages

    This discussion was started here: https://discussions.apple.com/thread/5178260
    Iphone5, iOS6.1.4, Verizon. Brand-new phone I bought a couple weeks ago. So its brand-new, mint condition, untouched.
    My phone number was ported from AT&T to Verizon. No problems as far as I can tell.
    I've been sending group messages, not realizing more than half of my friends/family were not receiving them.
    1.My aunt lives on the other side of the country and has some kind of smartphone(not iphone) and she's been receiving them just fine.
    2.My mother has a normal cellphone that is several years old AT&T, but she has only being receiving the subject line of the message. When she tries to "retrieve" the message, it always says "failed to retrieve". She has no problem getting text messages from everyone except me.
    3.My brother has a different model of a normal phone and he is on the same AT&T plan with my mother and he is able to receive my group messages.
    4.Some other friends with older phones and AT&T are not receiving the messages at all.
    So it's been very hit 'n miss on who can receive these group messages.
    I turned off iMessages first, then I finally turned off MMS Messages, and my mother was finally able to receive a group message from me.
    She has always been able to receive an individual message from me with MMS and iMessages turned on. This is strictly a group message problem of some kind.
    I was only sending her messages with text content, but the group messages always say MMS at the top regardless of what you send. I'm assuming turning off MMS forces group messages to use SMS.
    Why is iphone not able to degrade gracefully with a group message? Why can't it detect older phones in a group message and say "hmm...maybe I should use SMS, especially since the iphone is sending a message with text-only content anyway."
    It's really irritating that I have to either, remember to send INDIVIDUAL messages to every single person, OR keep MMS turned off just so older phones can receive a group message.
    Has anyone else had these kinds of problems, and if so, what did you do?
    I feel like the problem is on my end(Verizon) rather than my friends' end since so many of them are not receiving MY messages. They are receiving everyone else's messages.
    Facts:
    1. INDIVIDUAL messages work. (MMS is turned on.)
    2. SMS-ONLY GROUP messages work. (MMS is turned off so SMS is forced.)
    3. MMS group messages, even with text-only content, are not being received by some people, others are receiving them just fine.

    iMessages is not the problem. None of my friends have an iphone so I haven't been using iMessages at all.
    The problem is SMS vs MMS on group messages. For some reason, the default for group messages is MMS, even though the contents I send are only text. My mother and some of my other friends cannot receive MMS messages, but they can receive SMS messages. (I don't know if its because their phones are too old or because of their specific txtmsg plan with their provider.)
    So she automatically doesn't receive messages when I send them as a group instead of individually because they always send as MMS simply because they are GROUP and not because of the contents of the message.
    Why do group messages always send as MMS instead of SMS?
    I turned MMS OFF, in order to force group messages to always use SMS, but then the MMS setting turns itself back ON the instant I send an individual MMS to a friend who can receive those types of messages. Once MMS setting is back on, I don't realize it and send out a GROUP message, which doesn't reach everyone because once again MMS is being used instead of SMS.
    If group messages would send as SMS when I am only sending text, then there would be NO problem. It shouldn't use MMS unless I'm sending a picture or something.

  • Thunderbolt is not receiving text messages

    I recently purchased a thunderbolt, approximately a month and a half ago.  It was working completely fine until about a week ago, when I started having issues with not receiving text messages.  It can be resolved by resetting the phone, but there's no way to know whether or not I need to do that unless I'm in the middle of a text conversation and I suddenly stop receiving messages.  I know my messages are going out because I can still communicate through facebook and other non SMS or MMS applications, and all other functions work properly, but this happens once or twice a day, and is extremely frustrating.

    I'm having the same problem.  My Thunderbolt is a refurb I received when my first Thunderbolt died this past fall.  I never had any SMS/MMS issues until very late February.  The problem is that I cannot receive any text messages.  Sending messages works fine, but I cannot receive any.  If my wife sends me a message, her phone will say it goes through, but I get nothing on my end.  This was a huge problem when I went 4-5 days without receiving any texts since I didn't know I wasn't receiving the messages.
    The problem resolves itself when I reboot/restart the phone, but I don't want to have to reboot my phone every night. The most recent time, I went 2 days without any texting problems before the "can't receive" issue came back.
    My Thunderbolt is STOCK (radio, ROM, etc.).  I have no 3rd-party texting apps -- I'm using the stock messaging app.

  • LG Revolution not receiving text messages from iphone user

    I am not receiving text messages from iphone user, sporatically.  The messages are showing as reveived on Verizon website in usage detail, but not being received on my phone.

        This issue needs fixed asap! I have a few suggestions that should help you get this resolved. If they are showing up in the usage details, that means they are hitting the Verizon network, but for some reason they are not showing up on the phone.   I recommend clearing the cache from your messaging/text messaging programs. Go to settings> applications> manage apps> all> Messaging/Text Messaging> Force Stop/Clear Cache/Clear Data. Erase the old text threads that you have saved and retry.
    If that doesn't work, please let us know the following:
    1) Do they come in delayed or not at all?
    2) Do you have any 3rd party messaging apps installed?
    3) Do they have any problems receiving messages from you?
    4) When they're sending messages, are they directly to you, or do you have this problem when the iPhone user sends to a group of people?
    Thanks for the additional info! I'm sure we can find a fix.
    Regards,
    MikeS_VZW
    Follow us on Twitter @VZWSupport

  • All of a sudden I can not receive text messages on my MOTOX. Does anyone know how to solve this problem. I can send them, but can't receive them.

    My MOTO X was working fine, then all of a sudden, I can not receive text messages. I have checked the settings and they look correct to me, and I have done everything the web site recommends, except wiping the phone and starting over, to try and fix it. Has anyone else had this issue, and how did you resolve it?
    Thanks so much.

        That's strange that your Moto X wont receive any text. Thank you for trouble shooting the issue. Let's see what's going on! Does your device have any physical or liquid damage? Does anyone else have an issue with calling or texting? What zip code are you in?
    VanetrisC_VZW
    Follow us on Twitter @VZWSupport

  • Not receiving automated messages correctly for Droid

    Is there a current problem with Droid not receiving automated messages correctly from short 5 digits numbers for example my dentist office sends out reminders for my appointments and  they are not sending correctly I have included an example below of what it looks like below. You will see that there no message. I have put the message below of what I should have received from my dentist. So you can understand why people are confused and calling our office back wondering when there appointment is . (Yes, I work at the office and a patient
    [10] 11 (Thu). Thanks! {edited for privacy}
    Sammie, Reply with "YES" to confirm your appt at 10:00AM on 3/24/11 (Thurs). Thanks! {edited for privacy}
    Is this something that can be fixed. Becasue I know that majority of ourpatients have Droids has it is a very popular phone and we are getting numerous complaints!
    I will be looking forwrd to a response!

    Well what's also weird is I'll send/receive other sms messages and there won't be any problems. But then, out of no where, my phone will get sms messages that are a few days old. I move around plenty in my area for work or other reasons so it's not like I stay in one location all the time. Also, I have Verizon and they have great coverage in my area anyway.

  • I have set up iMessages on my ipad but now I'm not receiving any messages on my iPhone how can I fix this.

    I have set up iMessages on my ipad in error now I'm not receiving any messages on my iphone, can anyone advise how to fix this or just undo everything I have done, don't necessarily need messages on my ipad

    Hi there Shwalks,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    -Griff W. 

  • Why does my iphone not receive group messages if there is a non iphone user in the group?

    I Have an iphone 4 with the latest update. Whenever anyone sends a group message to me when there is a non-iphone user in the group, my phone does not receive the message. I've tried restarting and it doesnt work. i have sms messaging turned on. Any help would be greatly appreciated

    iOS: Understanding group messaging
    http://support.apple.com/kb/HT3529
    http://support.apple.com/kb/ts2755

  • JMS consumer is not receiving any messages. am i missing something ?

    Hi bellow is the consumer code, my consumer is not receiving any messages even though there are messages in the queue. I have tried to debug the code. but the consumer is not calling the onMessage() method even though there are messages in the queue. Please guide me on the same. if i am missing something.
    package org.icrm.cons;
    import javax.jms.Connection;
    import javax.jms.Destination;
    import javax.jms.ExceptionListener;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import org.apache.activemq.ActiveMQConnectionFactory;
    public class JConsumer implements ExceptionListener,MessageListener{
         public static void main(String[] args){
              JConsumer consumer = new JConsumer();
              System.out.println("here 1");
              consumer.consumeMessage("MyQueue");
         public void consumeMessage(String queueName){
              try{
                   System.out.println("here 2");
                   ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
                   Connection connection = connectionFactory.createConnection();
                   connection.start();
                   connection.setExceptionListener(this);
                   Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                   Destination destination = session.createQueue(queueName);
                   MessageConsumer consumer = session.createConsumer(destination);
                   //ASync
                   consumer.setMessageListener(this);
                   //Sync
                   /*Message message = consumer.receive(1000);
                   TextMessage textMessage = (TextMessage)message;
                   String text = textMessage.getText();
                   System.out.println("Received : " + text);
                   consumer.close();
                   session.close();
                   connection.close();
              }catch(Exception e){
                   System.out.println("Caught: " + e);
                   e.printStackTrace();
         public void onException(JMSException arg0) {
              System.out.println("JMS Exception occured.  Shutting down client.");
         public void onMessage(Message message) {
              try{
                   TextMessage textMessage = (TextMessage)message;
                   String text = textMessage.getText();
                   System.out.println("Received: " + text);
              }catch(JMSException e){
                   e.printStackTrace();
    }

    Hey,
    I commented the following line of code. and i got all the messages.
    //consumer.close();
    //session.close();
    //connection.close();but then when should i close the consumer, session and connection object ???

  • Why is my iphone 5c not receiving text messages?

    My iphone 5c is not receiving text messages?  What should I check?

    Hi, sock888. 
    Thank you for visiting Apple Support Communities. 
    Here is an article that I would recommend going through when experiencing issues with Messages. 
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Cheers,
    Jason H.

Maybe you are looking for

  • How to find and add user's manager as approver for an action at runtime?

    Hi All, I am able to add logged in users to a role and initiate the process. But for 1st and 2nd level approval, I want to add supervisor and manger user id to the appropriate roles. How do I implement this? Thanks Sundar

  • How to create a custom quick time window size?

    I've been streaming all the video on my site with QT7 exported from Final Cut Express. The one thing that's bugging me is that I like to matte off the final video to creat a more widescreen image if possible but this results in black bars above and b

  • What is upcast/ narrowing cast and widening cast/downcast?

    Hi All SAPIENT, What is upcast/ narrowing cast and widening cast/downcast?Why we are using upcast and downcast?Please send me good reply to my mail id pankaj.sinhas2gmail.com. Regards Pankaj Sinha.

  • Copy Command Doesnt work in Premiere CS6!

    When you set your in and out points on your timeline, and then do the copy command, it will not paste your in and out to your selected timeline! I did some research and found a workaround: Set your in/out Lift Undo (cnrtl Z) Copy (cntrl C) Paste to s

  • Muse cc 2014 showing trial with membership

    I have a subscription to the Muse software that is current. It has been showing the trial countdown ever since I updated it through the desktop software app. I am afraid that in 4 days when the countdown is over, I will lose the use of my app. Thank