program Project1;
uses
Windows, SysUtils, Dialogs;
var
WindowClass: TWndClassEx;
Handle: Word;
function WndProc(hWnd: HWND; uMsg: UINT; wParam: wParam; lParam: LParam):lresult;
stdcall;
begin
Result := 0;
Result := DefWindowProc(hWnd, uMsg, wParam, lParam);
{vereinfacht, da Fehlerunabhängig ... oder ?}
end;
begin
WindowClass.cbSize := SizeOf(TWndClassEx);
WindowClass.Style := CS_HREDRAW
or CS_VREDRAW;
WindowClass.lpfnWndProc := @WndProc;
WindowClass.cbClsExtra := 0;
WindowClass.cbWndExtra := 0;
WindowClass.hbrBackground := COLOR_APPWORKSPACE;
WindowClass.lpszMenuName :=
nil;
WindowClass.lpszClassName := '
WndClass';
WindowClass.hIconSm := 0;
WindowClass.hInstance := hInstance;
WindowClass.hIcon := LoadIcon(hInstance, MAKEINTRESOURCE(100));
WindowClass.hCursor := LoadCursor(0, IDC_ARROW);
SetLastError (0);
Handle := RegisterClassEx(WindowClass);
showmessage (SysErrorMessage (GetLastError));
UnregisterClass (PChar (
Handle), HInstance);
end.