//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "mainfrm.h"
#include <shellapi.h>
#include <dir.h>
#include <stdio.h>
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
char buf[2048];
char buf2[2048];
sprintf("SWORD_PATH=%s", getcwd(buf2, 2047));
putenv(buf);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
WinExec(".\\Disk Images\\disk1\\setup.exe", SW_SHOWNORMAL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn2Click(TObject *Sender)
{
/*
static char *file = ".\\Windows\\sword.exe";
static char dir[2048]; // = "\\";
SHELLEXECUTEINFO sei;
memset(&sei, 0, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.hwnd = this->WindowHandle;
sei.lpFile = file;
sei.lpDirectory = getcwd(dir, 2047);
MessageBox(0, sei.lpDirectory, "cwd", MB_OK);
sei.nShow = SW_SHOWNORMAL;
*/
WinExec(".\\Windows\\sword.exe", SW_SHOWNORMAL);
// ShellExecute(this->Handle, "open", ".\\Windows\\sword.exe", NULL, "\\", SW_SHOWNORMAL);
// ShellExecuteEx(&sei);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormShow(TObject *Sender)
{
ShellExecute(this->Handle, "open", "tract.html", NULL, NULL, SW_SHOWMAXIMIZED);
TColor transColor = Image1->Canvas->Pixels[0][0];
Image1->Transparent = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{
ShellExecute(this->Handle, "open", "http://www.crosswire.org", NULL, NULL, SW_SHOWNORMAL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn4Click(TObject *Sender)
{
ShellExecute(this->Handle, "open", ".\\", NULL, NULL, SW_SHOWNORMAL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn5Click(TObject *Sender)
{
WinExec(".\\fonts\\setup.exe", SW_SHOWNORMAL);
}
//---------------------------------------------------------------------------