-
Notifications
You must be signed in to change notification settings - Fork 1
/
eml.pas
145 lines (127 loc) · 4.15 KB
/
eml.pas
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//e-mail: vladsch@lens.spb.ru
//Èñïîëüçîâàíèå: ïîäêëþ÷èòå ýòîò ìîäóëü â ôàéë ïðîåêòà (*.dpr) â ñåêöèþ uses
unit eml;
interface
uses
Windows, Messages;
procedure ShutDown;
function WindowProc(hWnd,__Msg,wParam,lParam:Longint):Longint; stdcall;
procedure emulator;
var
wClass,wclass2,wclass3,wclass4: TWndClass; // class struct for main window
hInst: HWND;
__Msg: TMSG; // message struct
implementation
procedure ShutDown;
begin
UnRegisterClass('TAppBuilder',hInst);
UnRegisterClass('TApplication',hInst);
UnRegisterClass('TPropertyInspector',hInst);
UnRegisterClass('TAlignPalette',hInst);
ExitProcess(hInst); //end program
end;
function WindowProc(hWnd,__Msg,wParam,lParam:Longint):Longint; stdcall;
begin
Result:=DefWindowProc(hWnd,__Msg,wParam,lParam);
end;
procedure emulator;
begin
hInst:=GetModuleHandle(nil); // get the application instance
with wClass do
begin
Style:= 0;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'TAppBuilder';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
with wClass2 do
begin
Style:= 0;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'TApplication';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
with wClass3 do
begin
Style:= 0;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'TAlignPalette';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
with wClass4 do
begin
Style:= 0;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'TPropertyInspector';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
RegisterClass(wClass);
RegisterClass(wClass2);
RegisterClass(wClass3);
RegisterClass(wClass4);
CreateWindow(
'TAppBuilder', // Registered Class Name
'Delphi', // Title of Window
WS_POPUP, // Make it Visible
-1, // Left
-1, // Top
0, // Width
0, // Height
0, // Parent Window Handle
0, // Handle of Menu
hInst, // Application Instance
nil); // Structure for Creation Data
CreateWindow(
'TApplication', // Registered Class Name
'Embarcadero RAD Studio 2010', // Title of Window
WS_POPUP, // Make it Visible
-1, // Left
-1, // Top
0, // Width
0, // Height
0, // Parent Window Handle
0, // Handle of Menu
hInst, // Application Instance
nil);
CreateWindow(
'TAlignPalette', // Registered Class Name
'Embarcadero RAD Studio 2010', // Title of Window
WS_POPUP, // Make it Visible
-1, // Left
-1, // Top
0, // Width
0, // Height
0, // Parent Window Handle
0, // Handle of Menu
hInst, // Application Instance
nil);
CreateWindow(
'TPropertyInspector', // Registered Class Name
'Embarcadero RAD Studio 2010', // Title of Window
WS_POPUP, // Make it Visible
-1, // Left
-1, // Top
0, // Width
0, // Height
0, // Parent Window Handle
0, // Handle of Menu
hInst, // Application Instance
nil)
end;
initialization
emulator
finalization
shutdown
end.