制作主窗口显示前的版权窗口

在工程文件中选File->New Form新建一个窗口,设计好窗口的外观。
给窗口起名为AboutBox,源文件命名为AboutBox.Cpp
选Project->Options,将新建的窗口从自动建立中去掉。
选View->Project Source,打开工程文件的源文件,在下面字体加粗的句子。



#include "AboutBox.h"

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)

{

    DWORD lTime;

    try

    {

      Application->Initialize();

      AboutBox=new TAboutBox(AboutBox);

      AboutBox->Show();

      AboutBox->Update();

      lTime=GetTickCount();

      Application->CreateForm(__classid(TMainForm), &MainForm);

      while((GetTickCount()-lTime) / 1000 <3);

      AboutBox->Hide();

      AboutBox->Free();

      Application->Run();

    } 

    catch (Exception &exception) 

    { 

      Application->ShowException(&exception); 

    } 

    return 0; 

}