applied win32 notebook patch from Vincent

git-svn-id: trunk@3698 -
This commit is contained in:
mattias 2002-12-16 09:02:27 +00:00
parent 4130ccb02e
commit 4356dd7165
8 changed files with 189 additions and 104 deletions

View File

@ -100,8 +100,23 @@ begin
end; end;
procedure TForm1.Button1Click(Sender : TObject); procedure TForm1.Button1Click(Sender : TObject);
var
NewPageIndex: integer;
NewPage: TPage;
PageLabel: TLabel;
begin begin
Notebook1.Pages.Add(Format('[Page %d]', [Notebook1.Pages.Count])); NewPageIndex := Notebook1.Pages.Add(Format('[Page %d]', [Notebook1.Pages.Count]));
NewPage := Notebook1.Page[NewPageIndex];
PageLabel := TLabel.Create(Self);
with PageLabel do
begin
Left := 20;
Top := 10 + NewPageIndex * 20;
Width := 500;
Height := 20;
Caption := Format('This is page [%d]',[NewPageIndex]);
Parent := NewPage;
end;
end; end;
procedure TForm1.Button2Click(Sender : TObject); procedure TForm1.Button2Click(Sender : TObject);

View File

@ -114,9 +114,11 @@ begin
else else
// deleting last page // deleting last page
NewPageIndex:=-1; NewPageIndex:=-1;
end;
if NewPageIndex>=0 then
fNoteBook.PageIndex:=NewPageIndex; fNoteBook.PageIndex:=NewPageIndex;
end; end;
end;
if (FNoteBook.HandleAllocated) and (TPage(fPageList[Index]).HandleAllocated) if (FNoteBook.HandleAllocated) and (TPage(fPageList[Index]).HandleAllocated)
then begin then begin
Msg.Parent := fNotebook; Msg.Parent := fNotebook;
@ -734,6 +736,9 @@ end;}
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.28 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.27 2002/11/18 17:06:29 mattias Revision 1.27 2002/11/18 17:06:29 mattias
improved designer rubberband improved designer rubberband

View File

@ -14,8 +14,8 @@
} }
{$IFOPT C-} {$IFOPT C-}
// Uncomment for local trace // Uncomment for local trace
{$C+} // {$C+}
{$DEFINE ASSERT_IS_ON} // {$DEFINE ASSERT_IS_ON}
{$ENDIF} {$ENDIF}
{*************************************************************} {*************************************************************}
@ -59,6 +59,19 @@ Var
R: TRect; R: TRect;
OwnerObject: TObject; OwnerObject: TObject;
WinProcess: Boolean; WinProcess: Boolean;
procedure ShowHideTabPage(NotebookHandle: HWnd; Showing: boolean);
var
NoteBook: TCustomNotebook;
PageIndex: integer;
PageHandle: HWND;
begin
Notebook := TObject(GetProp(NotebookHandle, 'Lazarus')) as TCustomNotebook;
PageIndex := SendMessage(NotebookHandle, TCM_GETCURSEL, 0, 0);
PageHandle := Notebook.Page[PageIndex].Handle;
if Showing
then ShowWindow(PageHandle, SW_SHOW)
else ShowWindow(PageHandle, SW_HIDE);
end;
Begin Begin
Assert(False, 'Trace:WindowProc - Start'); Assert(False, 'Trace:WindowProc - Start');
@ -312,6 +325,16 @@ Begin
Msg := LM_NOTIFY; Msg := LM_NOTIFY;
IDCtrl := WParam; IDCtrl := WParam;
NMHdr := PNMHDR(LParam); NMHdr := PNMHDR(LParam);
With NMHdr^ do
Begin
If code = TCN_SELCHANGING
Then ShowHideTabPage(HWndFrom, False);
If code = TCN_SELCHANGE Then
begin
ShowHideTabPage(HWndFrom, True);
idFrom := SendMessage(HWndFrom, TCM_GETCURSEL, 0, 0);
end;
end;
End; End;
End; End;
WM_PAINT: WM_PAINT:
@ -479,6 +502,9 @@ end;
{ {
$Log$ $Log$
Revision 1.21 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.20 2002/12/09 17:53:22 mattias Revision 1.20 2002/12/09 17:53:22 mattias
Patch from Martin for reszing windows Patch from Martin for reszing windows

View File

@ -86,7 +86,7 @@ Type
Procedure SetLimitText(Window: HWND; Limit: Word); Procedure SetLimitText(Window: HWND; Limit: Word);
Procedure ShowHide(Sender: TObject); Procedure ShowHide(Sender: TObject);
Procedure AddNBPage(Parent, Child: TObject; Index: Integer); Procedure AddNBPage(Notebook: TCustomNotebook; NewPage: TPage; Index: Integer);
Procedure RemoveNBPage(Parent: TObject; Index: Integer); Procedure RemoveNBPage(Parent: TObject; Index: Integer);
Procedure SetText(Window: HWND; Data: Pointer); Procedure SetText(Window: HWND; Data: Pointer);
Procedure SetColor(Sender : TObject); Procedure SetColor(Sender : TObject);
@ -187,6 +187,9 @@ End.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.25 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.24 2002/02/09 01:48:23 mattias Revision 1.24 2002/02/09 01:48:23 mattias
renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk

View File

@ -15,8 +15,8 @@
{$IFOPT C-} {$IFOPT C-}
// Uncomment for local trace // Uncomment for local trace
{$C+} // {$C+}
{$DEFINE ASSERT_IS_ON} // {$DEFINE ASSERT_IS_ON}
{$ENDIF} {$ENDIF}
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TWin32Object.Create Method: TWin32Object.Create
@ -182,18 +182,19 @@ Begin
Begin Begin
Assert(False, 'Trace:TWin32Object.GetText - csPage: Start'); Assert(False, 'Trace:TWin32Object.GetText - csPage: Start');
Ctrl := ((Sender As TPage).Parent As TNotebook); Ctrl := ((Sender As TPage).Parent As TNotebook);
Try Caption := StrAlloc(MAX_PATH);
Assert(False, 'Trace:TWin32Object.GetText - Filling TC_ITEM'); try
TCI.mask := TCIF_TEXT; TCI.mask := TCIF_TEXT;
TCI.cchTextMax := MAX_PATH; TCI.cchTextMax := MAX_PATH;
TCI.pszText := StrAlloc(MAX_PATH); TCI.pszText := Caption;
Assert(False, 'Trace:TWin32Object.GetText - Getting the text'); Assert(False, 'Trace:TWin32Object.GetText - Getting the text');
TabCtrl_GetItem(Ctrl.Handle, Ctrl.PageIndex, TCI); Result := (Windows.Sendmessage(Ctrl.Handle, TCM_GETITEM, (Sender as TPage).PageIndex, LPARAM(@TCI))<>0);
Data := String(TCI.pszText); if Result
then Data := StrPas(Caption);
Assert(False, Format('Trace:TWin32Object.GetText - Returning the text --> %S', [Data])); Assert(False, Format('Trace:TWin32Object.GetText - Returning the text --> %S', [Data]));
Except finally
StrDispose(TCI.pszText); StrDispose(Caption);
End; end;
Assert(False, 'Trace:TWin32Object.GetText - csPage: Exit'); Assert(False, 'Trace:TWin32Object.GetText - csPage: Exit');
End; End;
Else Else
@ -252,17 +253,29 @@ Begin
Begin Begin
SendMessage(Handle, WM_SETTEXT, 0, LPARAM(Data)); SendMessage(Handle, WM_SETTEXT, 0, LPARAM(Data));
End; End;
csPage: csNotebook:
Begin Begin
Assert(False, 'Trace: TWin32Object.SetLabel - Got csNotebook');
with TLMNotebookEvent(Data^) do
if Parent=Sender then
begin
TCI.mask := TCIF_TEXT;
Assert(False, Format('Trace:TWin32Object.SetLabel - label --> %S', [Str]));
TCI.pszText := PChar(Str);
Windows.SendMessage((Sender As TCustomNotebook).Handle, TCM_SETITEM, Page, LPARAM(@TCI));
end
End;
csPage:
begin
Assert(False, 'Trace: TWin32Object.SetLabel - Got csPage'); Assert(False, 'Trace: TWin32Object.SetLabel - Got csPage');
Assert(False, Format('Trace: TWin32Object.SetLabel - Class Name: %S', [Sender.ClassName])); // We can't set label of a page not yet added
if (Sender As TPage).PageIndex < Windows.SendMessage((Sender As TPage).Parent.Handle, TCM_GETITEMCOUNT,0,0) then
begin
Assert(False, Format('Trace:TWin32Object.SetLabel - label --> %S', [String(PChar(Data))]));
TCI.mask := TCIF_TEXT; TCI.mask := TCIF_TEXT;
TCI.pszText := Data; TCI.pszText := Data;
//Assert(False, Format('Trace: TWin32Object.SetLabel - Page Index: %N', [PTabInfo(Data)^.Index])); Windows.SendMessage((Sender As TPage).Parent.Handle, TCM_SETITEM, (Sender As TPage).PageIndex, LPARAM(@TCI));
//Assert(False, Format('Trace: TWin32Object.SetLabel - Page Index: %S', [StrPas(PTabInfo(Data)^.Caption)])); end;
SendMessage(Handle, TCM_SETITEM, ((Sender As TPage).Parent As TNotebook).PageIndex, LPARAM(@TCI));
//Assert(False, Format('Trace: TWin32Object.SetLabel - PTabInfo(@Sender)^.Index: %N', [PTabInfo(@Sender)^.Index]));
//Assert(False, Format('Trace: TWin32Object.SetLabel - PTabInfo(@Sender)^.Caption: %S', [StrPas(PTabInfo(@Sender)^.Caption)]));
End; End;
csToolButton: csToolButton:
Begin Begin
@ -279,10 +292,10 @@ Begin
UpdateWindow(HOwner); UpdateWindow(HOwner);
End; End;
Assert(False, Format('Trace:[TWin32Object.SetLabel] %S --> END', [Sender.ClassName]));
End; End;
Assert(False, Format('Trace:[TWin32Object.SetLabel] %S --> END', [Sender.ClassName]));
End; End;
{$C+}
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TWin32Object.IntSendMessage3 Method: TWin32Object.IntSendMessage3
Params: LM_Message - message to be processed Params: LM_Message - message to be processed
@ -309,6 +322,8 @@ Var
R, R2: TRECT; R, R2: TRECT;
SelectionMode: DWORD; // currently only used for listboxes SelectionMode: DWORD; // currently only used for listboxes
TBB: Array[0..1] Of TBBUTTON; // Limited to 2 buttons at present TBB: Array[0..1] Of TBBUTTON; // Limited to 2 buttons at present
WindowStyle: Integer; //used by LM_SETTABPOSITION
OldPageIndex: Integer; //used by LM_SETITEMINDEX of a csNotebook
Begin Begin
Result := 0; //default value just in case nothing sets it Result := 0; //default value just in case nothing sets it
Assert(False, 'Trace:IntSendMessage3 - Start, Received (' + GetMessageName(LM_Message) + ')'); Assert(False, 'Trace:IntSendMessage3 - Start, Received (' + GetMessageName(LM_Message) + ')');
@ -534,10 +549,7 @@ activate_time : the time at which the activation event occurred.
begin begin
With PRect(Data)^ do With PRect(Data)^ do
begin begin
R.Left:=Left; R := Rect(Left,Top,Right,Bottom);
R.Top:=Top;
R.Bottom:=Bottom;
R.Right:=Right;
{Get the width and height for the form} {Get the width and height for the form}
If TControl(Sender).FCompStyle = csForm Then If TControl(Sender).FCompStyle = csForm Then
begin begin
@ -545,11 +557,19 @@ activate_time : the time at which the activation event occurred.
R.Bottom:=Top + Bottom; R.Bottom:=Top + Bottom;
if (Sender is TCustomForm) and ((Sender as TCustomForm).Menu<>nil) then Windows.AdjustWindowRect(@R,WS_OVERLAPPEDWINDOW,true) if (Sender is TCustomForm) and ((Sender as TCustomForm).Menu<>nil) then Windows.AdjustWindowRect(@R,WS_OVERLAPPEDWINDOW,true)
else Windows.AdjustWindowRect(@R,WS_OVERLAPPEDWINDOW,false); else Windows.AdjustWindowRect(@R,WS_OVERLAPPEDWINDOW,false);
R.Right:=R.Right - R.Left; R := Rect(Left, Top, R.Right - R.Left, R.Bottom - R.Top)
R.Bottom:=R.Bottom - R.Top; end
else if TControl(Sender).FCompStyle = csPage then
begin
if (Sender As TWinControl).Parent.Handle<>0 then
begin
Windows.GetClientRect((Sender As TWinControl).Parent.Handle,@R);
Windows.SendMessage((Sender As TWinControl).Parent.Handle, TCM_AdjustRect, 0, LPARAM(@R));
R := Rect(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top);
end
end; end;
If TWinControl(Sender).HandleAllocated Then If TWinControl(Sender).HandleAllocated Then
ResizeChild(Sender, Left, Top, R.Right , R.Bottom); ResizeChild(Sender, R.Left, R.Top, R.Right , R.Bottom);
end; end;
end; end;
End; End;
@ -596,7 +616,7 @@ activate_time : the time at which the activation event occurred.
LM_ADDPAGE: LM_ADDPAGE:
Begin Begin
Assert(False, Format('Trace:[TWin32Object.IntSendMessage3] %S --> Add NB page: %S', [Sender.ClassName, TLMNotebookEvent(Data^).Child.ClassName])); Assert(False, Format('Trace:[TWin32Object.IntSendMessage3] %S --> Add NB page: %S', [Sender.ClassName, TLMNotebookEvent(Data^).Child.ClassName]));
AddNBPage(TControl(Sender), TLMNotebookEvent(Data^).Child, TLMNotebookEvent(Data^).Page); AddNBPage(Sender as TCustomNotebook, TLMNotebookEvent(Data^).Child as TPage, TLMNotebookEvent(Data^).Page);
End; End;
LM_REMOVEPAGE: LM_REMOVEPAGE:
Begin Begin
@ -610,27 +630,21 @@ activate_time : the time at which the activation event occurred.
End; End;
LM_SETTABPOSITION : LM_SETTABPOSITION :
Begin Begin
Case TTabPosition(TLMNotebookEvent(Data^).TabPosition^) Of // VS: not tested
With TLMNotebookEvent(Data^) Do
Begin
WindowStyle := Windows.GetWindowLong((Sender As TWinControl).Handle, GWL_STYLE);
Case TTabPosition(TabPosition^) Of
tpTop: tpTop:
Begin WindowStyle := WindowStyle and not(TCS_VERTICAL or TCS_MULTILINE or TCS_BOTTOM);
R.Top := 0;
TabCtrl_AdjustRect(Handle, True, Windows.RECT(R));
End;
tpBottom: tpBottom:
Begin WindowStyle := (WindowStyle or TCS_BOTTOM) and not (TCS_VERTICAL or TCS_MULTILINE);
R.Bottom := 0;
TabCtrl_AdjustRect(Handle, True, Windows.RECT(R));
End;
tpLeft: tpLeft:
Begin WindowStyle := (WindowStyle or TCS_VERTICAL or TCS_MULTILINE) and not TCS_RIGHT;
R.Left := 0;
TabCtrl_AdjustRect(Handle, True, Windows.RECT(R));
End;
tpRight: tpRight:
Begin WindowStyle := WindowStyle or (TCS_VERTICAL or TCS_RIGHT or TCS_MULTILINE);
R.Right := 0;
TabCtrl_AdjustRect(Handle, True, Windows.RECT(R));
End; End;
Windows.SetWindowLong((Sender As TWinControl).Handle, GWL_STYLE, WindowStyle);
End; End;
End; End;
LM_INSERTTOOLBUTTON: LM_INSERTTOOLBUTTON:
@ -754,7 +768,15 @@ activate_time : the time at which the activation event occurred.
csNotebook: csNotebook:
Begin Begin
Assert(False, 'Trace:Setting Page to ' + IntToStr(TLMNotebookEvent(Data^).Page)); Assert(False, 'Trace:Setting Page to ' + IntToStr(TLMNotebookEvent(Data^).Page));
SendMessage(Handle, TCM_SETCURSEL, LParam(Integer(Data)), 0); with TLMNotebookEvent(Data^) do
begin
OldPageIndex := SendMessage(Handle,TCM_GETCURSEL,0,0);
SendMessage(Handle,TCM_SETCURSEL,WPARAM(Page),0);
{ if (Page>=0) And ((Parent As TCustomNotebook).Page[Page].HandleAllocated)
then ShowWindow((Parent As TCustomNotebook).Page[Page].Handle, SW_SHOW);}
if (OldPageIndex>=0) and (OldPageIndex<>Page) and ((Parent As TCustomNotebook).Page[OldPageIndex].HandleAllocated)
then ShowWindow((Parent As TCustomNotebook).Page[OldPageIndex].Handle, SW_HIDE);
end;
End; End;
End; End;
End; End;
@ -877,7 +899,7 @@ activate_time : the time at which the activation event occurred.
End; // end of else-part of 1st case End; // end of else-part of 1st case
End; // end of 1st case End; // end of 1st case
End; End;
{$C-}
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TWin32Object.SetCallback Method: TWin32Object.SetCallback
Params: Msg - message for which to set a callback Params: Msg - message for which to set a callback
@ -1408,7 +1430,7 @@ Var
TM: TEXTMETRICA; TM: TEXTMETRICA;
Begin Begin
Handle := (Sender As TWinControl).Handle; Handle := (Sender As TWinControl).Handle;
If (TControl(Sender).Parent Is TCustomGroupBox) Or (TControl(Sender).Parent Is TPage) Then If (TControl(Sender).Parent Is TCustomGroupBox) Then
Begin Begin
DC := GetDC(Handle); DC := GetDC(Handle);
GetTextMetrics(DC, TM); GetTextMetrics(DC, TM);
@ -1957,45 +1979,10 @@ Begin
// TPage - Notebook page // TPage - Notebook page
csPage: csPage:
Begin Begin
Assert(False, 'Trace:TODO: Create a csPage component.'); Assert(False, 'Trace:Create a csPage component.');
Assert(False, 'Trace:Going to try it here. I''m guaranteeing nothing.'); Window := CreateWindow('STATIC', Nil, WS_CHILD, Left, Top, Width, Height, Parent, HMENU(Nil), HInstance, Nil);
Assert(False, 'Trace:csPage - class name is ' + Sender.ClassName); ShowWindow(Window, SW_HIDE);
With ((Sender As TPage).Parent As TNotebook) Do SetProp(Window, 'Lazarus', Sender);
Begin
StrDispose(StrTemp);
Try
Assert(False, Format('Trace:Page caption --> %S', [Page[PageIndex].Caption]));
StrTemp := StrAlloc(Length(Page[PageIndex].Caption) + 1);
StrPCopy(StrTemp, Page[PageIndex].Caption);
Except
On E: Exception Do
Begin
Assert(False, Format('Trace:TWin32Object.CreateComponent - could not create in csPage --> %S', [E.Message]));
//Exit;
End;
End;
With TCI Do
Begin
Mask := TCIF_TEXT;
PSzText := StrTemp;
End;
Try
Assert(False, Format('Trace:Number of pages: %D, current page: %D', [Pages.Count, PageIndex]));
Window := TabCtrl_InsertItem(Handle, PageIndex, TCI);
Except
Assert(False, 'Trace:csPage - Could not insert page');
Exit;
End;
{If PageIndex >= Pages.Count - 1 Then
TabCtrl_DeleteItem(Handle, Pages.Count)
Else}
If (PageIndex + 1 < Pages.Count) And (Pages.Count > 1) Then
PageIndex := PageIndex + 1
Else
TabCtrl_DeleteItem(Handle, Pages.Count);
SetProp(Handle, 'Lazarus', @Sender);
Self.SetName(Handle, StrTemp);
End;
End; End;
csPopupMenu: csPopupMenu:
Begin Begin
@ -2094,7 +2081,7 @@ Var
Handle: HWND; Handle: HWND;
Begin Begin
Handle := ObjectToHWND(Sender); Handle := ObjectToHWND(Sender);
If TControl(Sender).FCompStyle = csPage then exit;
If TControl(Sender).Visible Then If TControl(Sender).Visible Then
Begin Begin
Assert(False, 'Trace: [TWin32Object.ShowHide] Showing the window'); Assert(False, 'Trace: [TWin32Object.ShowHide] Showing the window');
@ -2111,16 +2098,41 @@ End;
{ ----------------------------------------------------------------------------- { -----------------------------------------------------------------------------
Method: TWin32Object.AddNBPage Method: TWin32Object.AddNBPage
Params: Parent - A notebook control Params: Notebook - A notebook control
Child - Page to insert NewPage - Page to insert
Index - The position in the notebook to insert the page Index - The position in the notebook to insert the page
Returns: Nothing Returns: Nothing
Adds a new page to a notebook Adds a new page to a notebook
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWin32Object.AddNBPage(Parent, Child: TObject; Index: Integer); Procedure TWin32Object.AddNBPage(Notebook: TCustomNotebook; NewPage: TPage; Index: Integer);
Var
TabControlItem: TC_ITEM;
PageCaption: string;
OldPageIndex: integer;
R: TRect;
Begin Begin
Assert(False, 'Trace:TWin32Object.AddNBPage - Start'); Assert(False, 'Trace:TWin32Object.AddNBPage - Start');
With Notebook, TabControlItem do
Begin
Mask := 0;
// Before adding, the page caption comes from TControl.FCaption.
// After adding, it is read from the TabControl,
// so we cache it temporarily for later use.
PageCaption := NewPage.Caption;
Windows.SendMessage(Handle, TCM_INSERTITEM, Index, integer(@TabControlItem));
// Set page caption in tabcontrol
SetLabel(NewPage, PChar(PageCaption));
// Adjust page size to fit in tabcontrol, no bounds needed.
IntSendMessage3(LM_SETSIZE, NewPage, @R);
// Do the page switch. The are no tabcontrol notifications so we have to
// do the hiding and showing ourselves.
OldPageIndex := SendMessage(Handle,TCM_GETCURSEL,0,0);
SendMessage(Handle,TCM_SETCURSEL,NewPage.PageIndex,0);
ShowWindow(NewPage.Handle, SW_SHOW);
if (OldPageIndex>=0) and (OldPageIndex<>NewPage.PageIndex)
then ShowWindow(Page[OldPageIndex].Handle, SW_HIDE);
End;
End; End;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -2575,6 +2587,9 @@ End;
{ {
$Log$ $Log$
Revision 1.33 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.32 2002/02/09 01:48:23 mattias Revision 1.32 2002/02/09 01:48:23 mattias
renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk

View File

@ -517,7 +517,7 @@ Function DeliverMessage(Const Target: Pointer; Var Message): Integer;
Begin Begin
If Target = Nil Then If Target = Nil Then
begin begin
WriteLn('[DeliverMessage] Nil'); WriteLn('[DeliverMessage Target: Pointer] Nil');
Exit; Exit;
end; end;
If TObject(Target) Is TControl Then If TObject(Target) Is TControl Then
@ -544,7 +544,10 @@ End;
Function DeliverMessage(Const Target: TObject; Var Message: TLMessage): Integer; Function DeliverMessage(Const Target: TObject; Var Message: TLMessage): Integer;
Begin Begin
If Target = Nil Then If Target = Nil Then
Assert(False, 'Trace:DeliverMessage --> got nil object'); begin
WriteLn('[DeliverMessage (Target: TObject)] Nil');
Exit;
end;
If Target Is TControl Then If Target Is TControl Then
TControl(Target).WindowProc(Message) TControl(Target).WindowProc(Message)
Else Else
@ -673,6 +676,9 @@ End;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.11 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.10 2002/12/04 20:39:18 mattias Revision 1.10 2002/12/04 20:39:18 mattias
patch from Vincent: clean ups and fixed crash on destroying window patch from Vincent: clean ups and fixed crash on destroying window

View File

@ -76,6 +76,12 @@ Const
{ Left-to-right reading text } { Left-to-right reading text }
WS_EX_LTRLEADING = 0; WS_EX_LTRLEADING = 0;
{ Tab Control Styles}
TCS_RIGHT = $0002;
TCS_BOTTOM = $0002;
TCS_VERTICAL = $0080;
TCS_MULTILINE = $0200;
{ Win32 API functions not included in windows.pp } { Win32 API functions not included in windows.pp }
{ Get the ancestor at level Flag of window HWnd } { Get the ancestor at level Flag of window HWnd }
Function GetAncestor(Const HWnd: HWND; Const Flag: UINT): HWND; StdCall; External 'user32'; Function GetAncestor(Const HWnd: HWND; Const Flag: UINT): HWND; StdCall; External 'user32';

View File

@ -871,6 +871,12 @@ begin
LM_SETFORMICON : Result :='LM_SETFORMICON '; LM_SETFORMICON : Result :='LM_SETFORMICON ';
LM_SETSHORTCUT : Result :='LM_SETSHORTCUT '; LM_SETSHORTCUT : Result :='LM_SETSHORTCUT ';
LM_SETGEOMETRY : Result :='LM_SETGEOMETRY '; LM_SETGEOMETRY : Result :='LM_SETGEOMETRY ';
LM_GETITEMS : Result :='LM_GETITEMS ';
LM_GETITEMINDEX : Result :='LM_GETITEMINDEX ';
LM_SETITEMINDEX : Result :='LM_SETITEMINDEX ';
LM_SORT : Result :='LM_SORT ';
LM_SETSELMODE : Result :='LM_SETSELMODE ';
LM_SETBORDER : Result :='LM_SETBORDER ';
LM_SCREENINIT : Result :='LM_SCREENINIT '; LM_SCREENINIT : Result :='LM_SCREENINIT ';
// additional for TNoteBook // additional for TNoteBook
LM_NB_UpdateTab : Result := 'LM_NB_UpdateTab'; LM_NB_UpdateTab : Result := 'LM_NB_UpdateTab';
@ -886,6 +892,9 @@ end.
{ {
$Log$ $Log$
Revision 1.42 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent
Revision 1.41 2002/12/01 22:00:34 mattias Revision 1.41 2002/12/01 22:00:34 mattias
fixed DeleteCriticalSection fixed DeleteCriticalSection