Code executing during compilation, performing registration?
I have an MFC MDI application to which I've added a login screen. For privacy reasons the login needs to appear before any of the doc/view stuff is open, and prefereably before the main window is visible too.
As it is, I've created a CDialog based window C0Misc_Splash, constructed it and called DoModal in CRollersApp::InitInstance (derived from CWinApp::InitInstance), here:
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
LoadStdProfileSettings(0); // Load standard INI file options (including MRU)
//Load global variables from registry
//Connect to database
//Display login/splash screen
splash.DoModal(); // ***IMPORTANT BIT HERE***
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views
pDocTemplate = new CMultiDocTemplate(IDR_RollersTYPE,
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
Apart from that, there are no significant additions to InitInstance.
The problem I'm having is that when I compile the program in VC.NET, after the Linking stage it goes on to Performing registration, and at that point my login window opens in full working order, opens a connection to the database, forces me to enter my password before I can press the login button and it says build successful. If I press cancel at the login dialogue, which would normally quit the application, I get 'Rollers error PRJ0019: A tool returned an error code from "Performing registration"' and build failed, but the output (the exe) runs fine. If I use F5 (compile and run), I have to login once during performing registration, and again during the execution proper.
What does 'performing registration' do, and where can I put the code for a splash type screen so it wont be executed while I'm compiling(/building/whatever that bit after linking is)? Thanks for your help.