The program I am trying to write will be started twice, the first time with a "-R", the next without. In WinMain, I need to trap the "registration" call to the program, and exit with a Task Id.

I have created the project with the MFC App Wizard, so how would I now override the WinMain function to test the Command Line Parameters?

All help appreciated.

Thanks