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. Other Discussions
  3. Article Writing
  4. How to capture the mouse on the Topmost window?

How to capture the mouse on the Topmost window?

Scheduled Pinned Locked Moved Article Writing
2 Posts 2 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.
  • I Offline
    I Offline
    inforix
    wrote on last edited by
    #1

    I want to program a window, which like windows 98 Driver installation window. When it shows, you cannot click other window, and will beep once to warning. Anybody can help me or give me a tip? What I needed maybe you have, so let's help each other.

    T 1 Reply Last reply
    0
    • I inforix

      I want to program a window, which like windows 98 Driver installation window. When it shows, you cannot click other window, and will beep once to warning. Anybody can help me or give me a tip? What I needed maybe you have, so let's help each other.

      T Offline
      T Offline
      TomKat
      wrote on last edited by
      #2

      The ClipCursor function confines the cursor to a rectangular area on the screen. If a subsequent cursor position (set by the SetCursorPos function or the mouse) lies outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area. BOOL ClipCursor( CONST RECT *lpRect // pointer to structure with rectangle ); RECT r; POINT p; GetClientRect(hWnd,&r); p.x=r.left; p.y=r.top; ClientToScreen(&p); UINT w=r.right-r.left; UINT h=r.bottom-r.top; r.left=p.x; r.top=p.y; r.right=r.left+w; r.bottom=r.top+h; why am i doing this !? if you capture the mouse inside a window and you right click the title bar it gets free ! this way it doesn`t ! Make sure to make your window system modal ! because if you loose control of the locked mouse RESET helps you brother ! //ate me or hate me I am the mighty keeper of the book on knowledge . Contact me to get your copy .

      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