我可以E-mail给你.*.ico,*.res
*.dpr
program TEST;
uses
windows,messages;
{$R *.RES}
const
exename
char='TEST';
var
wClass: TWndClass
//窗口类变量
Msg: TMSG
//消息变量
hInst, //程序实例
Handle, //主窗口句柄
hFont:integer
//字体句柄
procedure ShutDown;
begin
DeleteObject(hFont);
//取消窗口类的注册
UnRegisterClass(wClass.lpszClassName,hInst);
//结束主进程
ExitProcess(hInst);
end;
//这是主窗口的消息处理函数
function WindowProc(hWnd,Msg,wParam,lParam:integer):Longint
stdcall;
begin
Result:=DefWindowProc(hWnd,Msg,wParam,lParam);
case Msg of
WM_DESTROY: ShutDown;
end;
end;
//定义几个窗口创建函数
function CreateMain(name
char;x1,y1,x2,y2:integer):hwnd;
begin
//取得应用程序实例句柄
hInst:=GetModuleHandle(nil);
//初使化窗口类的信息
with wClass do
begin
Style:= CS_PARENTDC;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'MainClass';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
// 注册窗口类
RegisterClass(wClass);
// 建立主窗口
Result:=CreateWindow(wClass.lpszClassName,name,WS_OVERLAPPEDWINDOW or WS_VISIBLE,x1,y1,x2,y2,0,0,hInst,nil);
end;
//---------主过程,类似于 C语言 中的 WinMain()
begin
//建立主窗口
handle:=CreateMain(exename,10,10,320,135);
while(GetMessage(Msg,Handle,0,0))do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end.