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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Suppress user input

Suppress user input

Scheduled Pinned Locked Moved C / C++ / MFC
data-structurestutorialquestion
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I trying to figure out how to suppress all user input for a certain period of time (while a function executes). What's happening now is: I'm using PreTranslateMessage() to ignore all mouse and keyboard commands, but the mouse and keyboard messages are stored in the queue and my trapping misses them because they get executed after my function stops. Any way to flush the message queue after my function stops so all those click messages are ignored?

    M 1 Reply Last reply
    0
    • L Lost User

      I trying to figure out how to suppress all user input for a certain period of time (while a function executes). What's happening now is: I'm using PreTranslateMessage() to ignore all mouse and keyboard commands, but the mouse and keyboard messages are stored in the queue and my trapping misses them because they get executed after my function stops. Any way to flush the message queue after my function stops so all those click messages are ignored?

      M Offline
      M Offline
      Morozov Alexey
      wrote on last edited by
      #2

      You can directly dequeued all of messages by function GetMessage. You should call PeekMessage and GetMessage in iteration till queue will be empty IMHO. But may be some backside will occur, I don't know

      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