mfc 对话框两个定时器SetTimer(0,10,NULL);SetTimer(1,10,NULL);是同时响应两个case还是一个个响应

2025年04月21日 15:44
有2个网友回答
网友(1):

当然是 一个一个的 消息 进消息队列,排队等待 窗口过程处理
WM_TIMER

The WM_TIMER message is posted to the installing thread's message
queue when a timer expires. The message is posted by the GetMessage or PeekMessage function.

A window receives this message through its WindowProc function.
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_TIMER
WPARAM wParam, // timer identifier -----------------都是WM_TIMER消息通过wParam区分
LPARAM lParam // timer callback (TIMERPROC)
);

网友(2):

分别响应啊....