aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/cdstartup/mainfrm.cpp
blob: 1f51c3928041343a2a037ea5d2c9df22c547699c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//---------------------------------------------------------------------------
#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", "fourlaws.html", NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------
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);
}
//---------------------------------------------------------------------------