function WndProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM;
lParam: LPARAM): LRESULT; stdcall;
begin
Result := 0;
case uMsg of
WM_CREATE:
begin
IDLoad := createwindow('BUTTON', 'Load Container',
WS_VISIBLE or WS_CHILD, 10, 130, 150, 25, hwnd, 0, hInstance,
nil);
IDClb := createwindow('BUTTON', 'Save to Clipboard',
WS_VISIBLE or WS_CHILD, 160, 130, 150, 25, hwnd, 0, hInstance,
nil);
IDSav := createwindow('BUTTON', 'Save to File',
WS_VISIBLE or WS_CHILD, 310, 130, 150, 25, hwnd, 0, hInstance,
nil);
IDMemo := CreateWindow('Edit', '',
WS_VISIBLE or WS_CHILD, 10, 5, 450, 120, hwnd, 0, hInstance,
nil);
IDLab := createwindow('Static', 'Test',
WS_VISIBLE or WS_CHILD, 130, 190, 150, 25, hwnd, 0, hInstance,
nil);
end;
WM_DESTROY:
begin
PostQuitMessage(0);
end;
WM_COMMAND:
if hiword(wparam) = BN_CLICKED then
begin
Case loword(wparam) of
IDLoad : MessageBox(hwnd, 'Load Button gedrückt', 'Meldung', 0); //Hier hängts
IDClb : MessageBox(hwnd, 'Clipboard Button gedrückt', 'Meldung', 0);
IDSav : MessageBox(hwnd, 'Speichern Button gedrückt', 'Meldung', 0);
IDMemo : MessageBox(hwnd, 'Memo gedrückt', 'Meldung', 0);
else
Result := DefWindowProc(hWnd, uMsg, wParam, lParam);
end;
end;
end;
end;