//--------------------------------------------------------------------------- #include #pragma hdrstop USERES("WordFinder.res"); USERC("xpstuff.rc"); USEFORM("Unit1.cpp", Form1); //--------------------------------------------------------------------------- WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { try { if(!FileExists("wordlist.txt")){ MessageBox(NULL, "Could not find the word list file 'wordlist.txt'.\nThis program needs this file to run.", "Error", MB_ICONEXCLAMATION); return(0); } Application->Initialize(); Application->Title = "Word Finder"; Application->CreateForm(__classid(TForm1), &Form1); Application->Run(); } catch (Exception &exception) { Application->ShowException(&exception); } return 0; } //---------------------------------------------------------------------------