Неа, не получается. Выложу-ка код(вдруг ошибся где-нибудь)
program Project1;
uses
Windows,
Messages;
const
WndClass = 'TWinApiWnd';
WndCaption = 'Changen 1.0 ';
PnlClass='Static';
var
Wc:TWndClassEx;
Wnd:HWND;
Msg:TMsg;
Pc:TWndClassEx;
PanelS:HWND;
function WindowProc( Wnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM ): LRESULT; stdcall;
begin
case Msg of
WM_DESTROY: begin
PostQuitMessage( 0 );
Result := 0;
Exit;
end;
else
Result := DefWindowProc( Wnd, Msg, wParam, lParam );
end;
end;
begin
with Wc do
begin
cbSize := SizeOf( Wc );
style := CS_HREDRAW or CS_VREDRAW;
lpfnWndProc := @WindowProc;
cbClsExtra := 0;
cbWndExtra := 0;
hInstance := hInstance;
hIcon := LoadIcon( 0, IDI_APPLICATION );
hCursor := LoadCursor( 0, IDC_ARROW );
hbrBackground := COLOR_BTNFACE+1;
lpszMenuName := nil;
lpszClassName := WndClass;
end;
RegisterClassEx( Wc );
Wnd := CreateWindowEx( 0, WndClass, WndCaption, WS_MINIMIZEBOX,
10, 10, 345, 251, 0, 0, hInstance, nil );
ShowWindow( Wnd, SW_NORMAL );
//панелька
with Pc do
begin
cbSize := SizeOf( Pc );
style := CS_HREDRAW or CS_VREDRAW;
lpfnWndProc := @WindowProc;
cbClsExtra := 0;
cbWndExtra := 0;
//:= BDR_RAISEDOUTER;
hInstance := hInstance;
hCursor := LoadCursor( 0, IDC_ARROW );
hbrBackground := COLOR_BTNFACE+1;
lpszMenuName := nil;
lpszClassName := PnlClass;
end;
RegisterClassEx( Pc );
PanelS:=CreateWindowEx(0,PnlClass,nil,WS_VISIBLE or WS_CHILD or WS_BORDER ,0,0,145,251,
WND,0, hInstance, nil );
while GetMessage( Msg, 0, 0, 0 ) do
begin
TranslateMessage( Msg );
DispatchMessage( Msg );
end;
Halt( Msg.wParam );
end.