unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 =
class(TForm)
procedure FormShow(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function ClientWindowProcNoSB(wnd: HWND; msg: Cardinal; wparam, lparam: Integer): Integer;
stdcall;
begin
if msg = WM_NCCALCSIZE
then
SetWindowLong(wnd, GWL_STYLE,
GetWindowLong(wnd, GWL_STYLE)
and not (WS_HSCROLL
or WS_VSCROLL));
Result := CallWindowProc(Pointer(GetWindowLong(wnd, GWL_USERDATA)),
wnd, msg, wparam, lparam);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
If ClientHandle <> 0
Then
If GetWindowLong( ClientHandle, GWL_USERDATA ) = 0
Then
SetWindowLong( ClientHandle, GWL_USERDATA,
SetWindowLong( ClientHandle, GWL_WNDPROC,
integer( @ClientWindowProcNoSB)));
end;
end.