Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. window don't get focus but receiving mouse input

window don't get focus but receiving mouse input

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uniqueworld
    wrote on last edited by
    #1

    Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.

    B M 2 Replies Last reply
    0
    • U uniqueworld

      Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.

      B Offline
      B Offline
      bikram singh
      wrote on last edited by
      #2

      In the Window Procedure, do the following: case WM_NCACTIVATE: return DefWindowProc(hWnd, message, (WPARAM)0, lParam); case WM_CREATE: SetWindowPos(hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); Note: the first time the window is displayed, you would need to take away focus from it. after that, it should work as u need. HTH Bikram Singh

      1 Reply Last reply
      0
      • U uniqueworld

        Like On-Screen Keyboard,I want my app don't get focus but still receving mouse input. You can test On-screen keyboard in Windows XP,or 2k. Because I use SendInput function to act on Windows Media Player,I must activate it when i click button on my app.Otherwise,my program itself receive my commands.And it's not the result i expect. Please help me.I think much but i can't.

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Also try using the WS_EX_NOACTIVATE extended style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- #include "witty-quote.h"

        B 1 Reply Last reply
        0
        • M Michael Dunn

          Also try using the WS_EX_NOACTIVATE extended style --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- #include "witty-quote.h"

          B Offline
          B Offline
          bikram singh
          wrote on last edited by
          #4

          Thanks for the info! I tried to use it, but it does not seem to work. Also, when i try and drag the window around, its "jumpy" - like when your CPU utilization is very high and you're trying to move a window... Any idea about how to fix this problem? Bikram Singh

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups