Winmain Cant Display Message in Autostart

77 views Asked by At

I have a win32 program, when run manually, it display a message in WinMain, but when I put the same program under registry (Run) so that when the PC reboots, it will run automatically, the message will never appear (but the program run normally).

Anyone knows why there is a difference between starting the program manually (by clicking the exe file) and automatically (via Windows Registry)?

Thanks

Clement

1

There are 1 answers

1
Joel Spolsky On BEST ANSWER

It's probably too soon to display a message at the top of WinMain because you don't have a window yet. Can you wait until you receive your first WM_CREATE message?