Thread: Screen flickering while running

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Timer msgs use the OS msg queue (are queued).

    Quote Originally Posted by MSDN
    The WM_TIMER message is a low-priority message.

    The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue.

    <snip>
    messages are processed in the following order:

    Sent messages
    Posted messages
    Input (hardware) messages and system internal events
    Sent messages (again)
    WM_PAINT messages
    WM_TIMER messages


    <snip>
    the system always posts messages at the end of a message queue. This ensures that a window receives its input messages in the proper first in, first out (FIFO) sequence.

    The WM_PAINT message, the WM_TIMER message, and the WM_QUIT message, however, are kept in the queue and are forwarded to the window procedure only when the queue contains no other messages.

    In addition, multiple WM_PAINT messages for the same window are combined into a single WM_PAINT message, consolidating all invalid parts of the client area into a single area. Combining WM_PAINT messages reduces the number of times a window must redraw the contents of its client area.

    Last edited by novacain; 10-10-2010 at 09:30 PM.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [C] GDI: how to erase material drawn at an entire screen DC
    By pc2-brazil in forum Windows Programming
    Replies: 3
    Last Post: 01-24-2009, 07:24 PM
  2. Check number of times a process is running
    By linuxwolf in forum Windows Programming
    Replies: 6
    Last Post: 10-17-2008, 11:08 AM
  3. Largest screen buffer size?
    By Ash1981 in forum C Programming
    Replies: 2
    Last Post: 01-30-2006, 04:31 AM
  4. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  5. screen flickering in MFC
    By MrBurns in forum Windows Programming
    Replies: 3
    Last Post: 09-01-2001, 01:42 PM