JCooper
01-10-2003, 18:12
Вот код:
uses
Windows,Messages,SysUtils;
var
wc:WNDCLASSEX;
h:HWND;
m:MSG;
procedure WndProc(h:HWND; uMsg:UINT; wp:WPARAM; lp:LPARAM);
begin
if uMsg=WM_DESTROY then PostQuitMessage(0) else
DefWindowProc(h,uMsg,wp,lp);
end;
begin
wc.cbSize:=SizeOf(WNDCLASSEX);
wc.style:=CS_HREDRAW or CS_VREDRAW;
wc.lpfnWndProc:=@WndProc;
wc.cbClsExtra:=0;
wc.cbWndExtra:=0;
wc.hInstance:=hInstance;
wc.hIcon:=0;
wc.hCursor:=0;
RegisterClassEx(wc);
h:=CreateWindowEx(WS_EX_LEFT,wc.lpszClassName,'',WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,200 ,200,
0,0,hInstance,nil);
ShowWindow(h,SW_SHOWDEFAULT);
UpdateWindow(h);
GetMessage(m,0,0,0);
repeat
TranslateMessage(m);
DispatchMessage(m);
until not GetMessage(m,0,0,0);
end.
end.
uses
Windows,Messages,SysUtils;
var
wc:WNDCLASSEX;
h:HWND;
m:MSG;
procedure WndProc(h:HWND; uMsg:UINT; wp:WPARAM; lp:LPARAM);
begin
if uMsg=WM_DESTROY then PostQuitMessage(0) else
DefWindowProc(h,uMsg,wp,lp);
end;
begin
wc.cbSize:=SizeOf(WNDCLASSEX);
wc.style:=CS_HREDRAW or CS_VREDRAW;
wc.lpfnWndProc:=@WndProc;
wc.cbClsExtra:=0;
wc.cbWndExtra:=0;
wc.hInstance:=hInstance;
wc.hIcon:=0;
wc.hCursor:=0;
RegisterClassEx(wc);
h:=CreateWindowEx(WS_EX_LEFT,wc.lpszClassName,'',WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,200 ,200,
0,0,hInstance,nil);
ShowWindow(h,SW_SHOWDEFAULT);
UpdateWindow(h);
GetMessage(m,0,0,0);
repeat
TranslateMessage(m);
DispatchMessage(m);
until not GetMessage(m,0,0,0);
end.
end.