CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2008
    Posts
    5

    WM_LBUTTONDOWN message doesn't work under vista.

    I have a COM application for managing WinAPI. Everything worked well for 2K, XP and even vista when suddenly I faced such a problem: the "Next" button in hardware installation dialog is not always clicked by my application.

    -It is always clicked if I use my PressButton method twice although.
    -Buttons are clicked in apps like Calculator etc..
    -My QA engineer says that messages are sent to right handles=)
    -My PressButton methods simply sends WM_LBUTTONDOWN/LBUTTONUP to handle of button control.
    -If send "Alt+N", the button is clicked.
    -Before we try to click, focus is set to "InstallationPath" ComboBox.

  2. #2
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: WM_LBUTTONDOWN message doesn't work under vista.

    It is always clicked if I use my PressButton method twice although.
    Hmm .. that almost sounds like the first click is activating a window?
    My hobby projects:
    www.rclsoftware.org.uk

  3. #3
    Join Date
    Aug 2008
    Posts
    5

    Re: WM_LBUTTONDOWN message doesn't work under vista.

    Well actually it looks like it "activates" the button - grey bar is drawed on it.
    Anyway it's strange that we have no such problems in other apps.

  4. #4
    Join Date
    Nov 2006
    Posts
    146

    Re: WM_LBUTTONDOWN message doesn't work under vista.

    WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN messages work under Vista. I actually was writing something last night that needed to process those messages.

    Might be some other issue causing it.
    If this post helps you out, please rate it!

  5. #5
    Join Date
    Aug 2008
    Posts
    5

    Re: WM_LBUTTONDOWN message doesn't work under vista.

    Quote Originally Posted by messycan
    WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN messages work under Vista
    Well did I say they don't work at all?
    I said that everything works well in Calculator and connect-to-ISP windows.

    The problem is with vista policies of focuses, I think.. But not sure.

  6. #6
    Join Date
    Jun 2002
    Location
    Colorado, U.S.A.
    Posts
    980

    Re: WM_LBUTTONDOWN message doesn't work under vista.

    It sounds like you are sending messages across process boundaries (I wasn't sure from your original post). In Vista, you can't send messages from a standard process to an elevated process unless specifically allowed by the receiving application. This is the reason drag and drop doesn't work from explorer to an elevated process (for example).

    I hope this helps - if I'm way off, ignore it!

    Kelly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured