dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: WM_TIMER message

Threaded View

  1. #1
    Join Date
    Sep 2019
    Posts
    11

    WM_TIMER message's behavior

    Hello,

    I have a simple question regarding the WM_TIMER message. As I understand, messages for a certain Window Procedure are run one by one, as it is said in the book Programming Windows 5th ed. by Charles Petzold at page 55 (section Queued and Nonqueued Messages)


    Regarding the WM_TIMER message, it seems that it is an exception..if I have

    SetTimer(hWnd, 3, 500, NULL);

    at the end of the WM_CREATE message in a window procedure, so I set up the timer with Id 3 that is to be run each 0.5 seconds, and if

    WM_TIMER:
    if (wParam == 3)
    {
    MessageBox(hWnd, TEXT("3"), NULL, MB_OK);
    }
    break;

    then it seems that processing a WM_TIMER message for timer 3 is interrupted by the next WM_TIMER message for timer 3..and so on..


    Is WM_TIMER special, and if yes, are there also other special messages?


    Waiting for your valuable reply,
    Best,
    D Narcis
    Last edited by dnarcistrinca; January 15th, 2020 at 08:30 AM.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)