Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.13;
Скачать: CL | DM;

Вниз

MDI и scroll   Найти похожие ветки 

 
Furkan   (2003-10-27 13:35) [0]

есть fsMDIForm и fsMDIChild.
при перетаскивании fsMDIChild, за пределы fsMDIForm, на fsMDIForm появляются ScrollBar"ы


 
Игорь Шевченко ©   (2003-10-27 13:45) [1]

Свежее наблюдение. А вопрос в чем ?


 
dataMaster ©   (2003-10-27 14:04) [2]

>Игорь Шевченко © (27.10.03 13:45) [1]
Свежее наблюдение. А вопрос в чем ?

Наверное, как убрать.


 
Игорь Шевченко ©   (2003-10-27 14:10) [3]

А...убрать - это вот так:

{ Избавление от ScrollBar"ов в MDI-форме. (С) Peter Below (TeamB) }

unit MainForm;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus;

type
TfMain = class(TForm)
MainMenu1: TMainMenu;
Newchild1: TMenuItem;
Newchild2: TMenuItem;
procedure Newchild2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
fMain: TfMain;

implementation

uses ChildForm;

{$R *.DFM}

procedure TfMain.Newchild2Click(Sender: TObject);
begin
with TfChild.Create(Application) do
Show();
end;

function ClientWindowProc( wnd: HWND; msg: Cardinal; wparam, lparam: Integer ): Integer; stdcall;
var
f: Pointer;
begin
f := Pointer( GetWindowLong( wnd, GWL_USERDATA ));
case msg of
WM_NCCALCSIZE:
if ( GetWindowLong( wnd, GWL_STYLE ) and
(WS_HSCROLL or WS_VSCROLL)) <> 0 then
SetWindowLong( wnd, GWL_STYLE, GetWindowLong( wnd, GWL_STYLE )
and not (WS_HSCROLL or WS_VSCROLL));
end;
Result := CallWindowProc( f, wnd, msg, wparam, lparam );
end;

procedure TfMain.FormCreate(Sender: TObject);
begin
if ClientHandle <> 0 then begin
if GetWindowLong( ClientHandle, GWL_USERDATA ) <> 0 then
Exit; {cannot subclass client window, userdata already in use}
SetWindowLong(ClientHandle, GWL_USERDATA, SetWindowLong( ClientHandle,
GWL_WNDPROC, integer( @ClientWindowProc)));
end;

end;

end.



Страницы: 1 вся ветка

Текущий архив: 2003.11.13;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.092 c
7-42144
INTAARI
2003-09-03 13:19
2003.11.13
Помогите разобраться с модемом


1-41215
bug008
2003-10-29 20:16
2003.11.13
2 вопроса по Word в Delphi


3-40795
Sectey
2003-10-20 17:02
2003.11.13
Имеет ли смысл выбирать IB


1-41201
yozhik
2003-11-04 19:26
2003.11.13
Картинка на fsMDIForm


1-41284
uu
2003-10-31 14:08
2003.11.13
round