I have a thread to monitor a special event. if the event happens, the thread will send a message to my main program.
Then the program will creat a modal dialog. I hope this dialog displays at the top of all windows. I learned SetForegroundWindows can do it. I put this function in the dialog class( in OnInitdialog),but it can't work. What's wrong?