Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Frage zu UniCode-ListView (https://www.delphipraxis.net/11293-frage-zu-unicode-listview.html)

neolithos 3. Nov 2003 18:30


Frage zu UniCode-ListView
 
Delphi-Quellcode:
var sTmp : WideString;
...
sTmp := 'test';
lvc.pszText := PWideChar(sTmp);
lvc.cchTextMax := Length(sTmp);
ListView_InsertColumnW(hLvw, 0, lvc);
Warum wird nur das erste Zeichen 't' im Listenkopf dargestellt?

neolithos 3. Nov 2003 19:15

Re: Frage zu UniCode-ListView
 
Aha,

gar nicht mein Fehler sondern einer in der CommCtrl

Delphi-Quellcode:
function ListView_InsertColumnW(hwnd: HWND; iCol: Integer; const pcol: TLVColumnW): Integer;
begin
  Result := SendMessage(hWnd, LVM_INSERTCOLUMN, iCol, Longint(@pcol));
end;
sollte eigentlich

Delphi-Quellcode:
function ListView_InsertColumnW(hwnd: HWND; iCol: Integer; const pcol: TLVColumnW): Integer;
begin
  Result := SendMessage(hWnd, LVM_INSERTCOLUMNW, iCol, Longint(@pcol));
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz