wince: port some win32 notebook changes

git-svn-id: trunk@18652 -
This commit is contained in:
paul 2009-02-13 05:50:45 +00:00
parent 54f86158d0
commit 84a9349117
2 changed files with 17 additions and 13 deletions

View File

@ -446,10 +446,10 @@ begin
TCI.pszText := PChar(AChild.Caption);
Windows.SendMessage(Handle, TCM_INSERTITEM, AIndex, LPARAM(@TCI));
{$endif}
// clientrect possible changed, adding first tab, or deleting last
// windows should send a WM_SIZE message because of this, but it doesn't
// send it ourselves
end;
// clientrect possible changed, adding first tab, or deleting last
// windows should send a WM_SIZE message because of this, but it doesn't
// send it ourselves
LCLControlSizeNeedsUpdate(ANotebook, True);
end;
end;

View File

@ -397,16 +397,20 @@ var
begin
with ANotebook do
begin
TCI.Mask := TCIF_TEXT or TCIF_PARAM;
{$ifdef Win32}
TCI.pszText := PChar(PWideChar(UTF8Decode((AChild.Caption))));
{$else}
TCI.pszText := PWideChar(UTF8Decode(AChild.Caption));
{$endif}
// store object as extra, so we can verify we got the right page later
TCI.lParam := PtrUInt(AChild);
Windows.SendMessageW(Handle, TCM_INSERTITEMW, AIndex, LPARAM(@TCI));
FreeMem(TCI.pszText);
AChild.HandleNeeded;
if ShowTabs then
begin
TCI.Mask := TCIF_TEXT or TCIF_PARAM;
{$ifdef Win32}
TCI.pszText := PChar(PWideChar(UTF8Decode((AChild.Caption))));
{$else}
TCI.pszText := PWideChar(UTF8Decode(AChild.Caption));
{$endif}
// store object as extra, so we can verify we got the right page later
TCI.lParam := PtrUInt(AChild);
Windows.SendMessageW(Handle, TCM_INSERTITEMW, AIndex, LPARAM(@TCI));
FreeMem(TCI.pszText);
end;
// clientrect possible changed, adding first tab, or deleting last
// windows should send a WM_SIZE message because of this, but it doesn't
// send it ourselves