Chapter 30 erratap1693-pdf
Paragraph 1 should not contain references to Form1.cpp
and Form2.cpp. The last sentence should be changed
such that the whole paragraph reads as follows:
Through the function parameters for WinMain(),
information, such as the current and previous instance handle of the present version
of the application and command-line strings, is passed. The main code to initialize
and run the application is enclosed within a try block,
so that any unhandled exceptions are caught and displayed. p1695-pdf Listing 30.5 is missing one line. The entire listing should be: Application->Initialize(); // New Code. SplashForm = new TSplashForm(static_cast<void*>(NULL)); // Create our Splash form. // New Code. SplashForm->Show(); // Show our Splash form. // New Code. Application->ProcessMessages(); // Force Display of SplashForm. // Creates our Mainform Application->CreateForm(__classid(TMainForm), &MainForm); // Application->CreateForm(__classid(TSplashForm), &SplashForm); // New Code - Next two lines. SplashForm->ProgressBar1->StepBy(1); // Increments the progresssbar by one. sleep(2); // Force a pause atherwise all happens to quickly. Application->CreateForm(__classid(TForm1), &Form1); // Creates Form1. // New Code - Next two lines. SplashForm->ProgressBar1->StepBy(1); // Increment progressbar by one. sleep(2); Application->CreateForm(__classid(TForm2), &Form2); // New Code - Next two lines. SplashForm->ProgressBar1->StepBy(1); sleep(2); Application->CreateForm(__classid(TForm3), &Form3); // New Code - Next two lines. SplashForm->ProgressBar1->StepBy(1); sleep(2); Application->CreateForm(__classid(TForm4), &Form4); // New Code - Next two lines. SplashForm->ProgressBar1->StepBy(1); sleep(2); Application->CreateForm(__classid(TForm5), &Form5); // New Code - Next three lines. SplashForm->ProgressBar1->StepBy(1); sleep(2); delete SplashForm; // Delete the SplashForm and free memory. Application->Run(); // Start the application. p1769-pdf Listing 30.41 is missing several lines from the code provided in the IBForm.cpp file on the CD-ROM and therefore some of the text explaining the listing (including the note on page 1771) will be confusing. The full listing should be: void __fastcall TForm1::Action1Execute(TObject *Sender)
{
HICON I;
Index = 0;
String Label = "";
if (OpenDialog1->Execute())
{
Limit = (long) ExtractIcon(HInstance, OpenDialog1->FileName.c_str(), -1);
Label += " Icons: ";
Label += String(Index+1);
Label += "\\";
Label += String(Limit);
Label1->Caption = Label;
if (Limit > 1)
Action3->Enabled = true;
else
Action3->Enabled = false;
I = ExtractIcon(HInstance, OpenDialog1->FileName.c_str(), Index);
if ((int)I > 1)
{
Image1->Picture->Icon->Handle = I;
Action2->Enabled = true;
}
else
{
Image1->Picture->Assign(Image2->Picture);
Action2->Enabled = false;
}
}
}
p1784-pdf Remove the word "socket" from the fourth last paragraph: Next we want to edit the server socket properties. |