[erledigt]Listview Flat darstellen
hallo,
ich denke das thema hatten wir schon, aber irgendwie krieg ich das nicht hin, wie kann ich den Header auch auf flat stellen? ratschläge und info's gerne willkommen. danke raik edit:
Delphi-Quellcode:
gefunden im internet, gibt mir aber fehlermeldung bei lvm_first
const
LVM_GETHEADER = LVM_FIRST + 31; var hHeader: THandle; style: dWord; begin {to get the header handle for the listview} hHeader := SendMessage(ListView1.Handle, LVM_GETHEADER, 0, 0); {to get the current style attributes for the header} style := GetWindowLong(hHeader, GWL_STYLE); {to toggle the HDS_BUTTONS style} style := style xor HDS_BUTTONS; {to apply the new style} SetWindowLong(hHeader, GWL_STYLE, style); {to invalidate the listview} SetWindowPos(ListView1.Handle, Form1.Handle, 0, 0, 0, 0, SWP_NOZORDER or SWP_NOSIZE or SWP_NOMOVE or SWP_DRAWFRAME) end; |
Re: Listview Flat darstellen
Zitat:
|
Re: Listview Flat darstellen
hallo, war in dem artikel nicht
habe jetzt nochmals gesucht und das gefunden
Delphi-Quellcode:
also es ist eine message, ich denke einer user message,oder?
Private Const LVM_FIRST = &H1000 '// ListView messages
raik |
Re: Listview Flat darstellen
Zitat:
Was is denn das für eine Fehlermeldung? Ähm... Zitat:
Hat das nicht irgendetwas mit "höherwertigen Byte" zu tun? :arrow: das kenn ich aber nur aus Assembler, geht das überhaupt in Delphi? *ausprobier* [Edit] Nee, geht natürlich nicht. Müsste also so aussehen
Delphi-Quellcode:
[/Edit]
LVM_FIRST = $1000;
|
Re: Listview Flat darstellen
Hallo,
so könnte es klappen
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
const HDS_BUTTONS = $2; LVM_FIRST = $1000; LVM_GETHEADER = LVM_FIRST + 31; var hHeader: THandle; style: dWord; begin {to get the header handle for the listview} hHeader := SendMessage(ListView1.Handle, LVM_GETHEADER, 0, 0); {to get the current style attributes for the header} style := GetWindowLong(hHeader, GWL_STYLE); {to toggle the HDS_BUTTONS style} style := style xor HDS_BUTTONS; {to apply the new style} SetWindowLong(hHeader, GWL_STYLE, style); {to invalidate the listview} SetWindowPos(ListView1.Handle, Form1.Handle, 0, 0, 0, 0, SWP_NOZORDER or SWP_NOSIZE or SWP_NOMOVE or SWP_DRAWFRAME) end; |
Re: Listview Flat darstellen
hallo jens,
auch das war wieder der richtige tip, kannst du mir mal die LVM_First erklären. danke raik |
Re: Listview Flat darstellen
Moin Raik,
LVM_FIRST ist in der commctrl.h deklariert. Es ist der erste Wert der ListView Messages. |
Re: Listview Flat darstellen
moin chris,
danke , aber was hat es mit dem wert auf sich? raik |
Re: Listview Flat darstellen
Moin Raik,
er bildet die Basis für die anderen LVM_xxx Messages. Beispielweise wird LVM_GETBKCOLOR als LVM_FIRST+0 deklariert (ist also mit LVM_FIRST identisch). |
Re: Listview Flat darstellen
Zitat:
Visual Basic: &H1000 Delphi: $1000 Zitat:
|
Re: Listview Flat darstellen
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:38 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz