04-19-2015, 05:30 AM
After SetTimer, the first WM_TIMER arrives after the timer period time, in this case 100 ms. But often we want it immediately. Then we can:
1. SendMessage, like here. It calls the dialog procedure.
2. Directly call the dialog procedure: TestExeDlgMenu hDlg WM_TIMER 1 0
3. goto gTimer. But then it must be the last statement under WM_INITDIALOG.
4. Put gTimer code in a function and call it on WM_TIMER and WM_INITDIALOG.
1. SendMessage, like here. It calls the dialog procedure.
2. Directly call the dialog procedure: TestExeDlgMenu hDlg WM_TIMER 1 0
3. goto gTimer. But then it must be the last statement under WM_INITDIALOG.
4. Put gTimer code in a function and call it on WM_TIMER and WM_INITDIALOG.