Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9037159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:10:52+00:00 2026-06-16T09:10:52+00:00

After created the window, i started a timer to do sth. the code like

  • 0

After created the window, i started a timer to do sth. the code like this:

SetTimer(hWnd, 1, 40, NULL);  //tick each 40 ms.

I traced the last error, which was 0. but i cannot receive wm_timer! code like this:

case WM_TIMER:
{
     //...
}

My IDE is VS2010, and OS is Windows7, so is there some speical case about my used environment?

P.S. okay i provide more code, it’s a win32 app so in WinMain:

HWND hWnd = CreateWindow(...);  //style : WS_POPUP | WS_VISIBLE , return is good
SetTimer(hWnd, 1, 40, NULL);    //return is good too.
while (GetMessage(&msg, NULL, 0, 0))
{
    TranslateMessage(&msg);
    DispatchMessage(&msg);
}

and the WndProc:

switch(message)
{
case WM_TIMER:
{
    DebugBreak();  //no reaction
}
break;
.......
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:10:53+00:00Added an answer on June 16, 2026 at 9:10 am

    WM_TIMER won’t fire if you’re failing to consume other messages, as they will take priority. One cause of that, for example, is not correctly processing WM_PAINT messages (you must BeginPaint() / EndPaint() )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I create a function that will close the window after 2 seconds?
When try to access site i created after 3 login attempts it gives unauthorised
Using Struts 2: when will the .tmp file - that gets created after uploading
I know that Matlab allows for you to format the graph after its created
I have two tables one called fs_note the other called dumy_fs_note I created after
I am using xCode 4.3.1. After i created a project, i build it and
A lot of JavaScript libraries have user interface widgets. Usually they are created after
After I have created a serious bunch of classes (with initialize methods), I am
should i after i have created a svn repo, import one project folder into
Can I avoid forwarding after content is created / saved ? I don't want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.