AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Nonvcl Listbox LB_SETTOPINDEX

Ein Thema von EWeiss · begonnen am 30. Jan 2009 · letzter Beitrag vom 30. Jan 2009
 
EWeiss
(Gast)

n/a Beiträge
 
#1

Nonvcl Listbox LB_SETTOPINDEX

  Alt 30. Jan 2009, 19:49
Wieder ListBox kommt noch einiges

Habe eine Function angelegt für MouseWeel.

Delphi-Quellcode:
type
  TSkinListBox = class
  private
    LStyle: DWORD;
    hFDefault: hFont;
    BColor,
    FColor: COLORREF;
    FHOwner: HWND;
    function DefaultFont: hFont;
    procedure SetCTLFont(hCtL: HWND; Font: hFont);
    procedure SubClass(WinHandle: HWND);
    procedure UnSubClass(WinHandle: HWND);
  public
    Handle: HWND;
    procedure DrawItem(lP: Integer);
    procedure ListSetTopIndex(hList: HWND; nTopIndex: Integer);
    function ListGetTopIndex(hList: HWND): Integer;
    constructor Create(hOwner: HWND; FullpathImageName: string; x, y, xW, yH,
      ListID: integer; Visible: Boolean; BackBitmap: string; AktForecolor: COLORREF;
      InAktForecolor: COLORREF; BackColor: COLORREF);
    destructor Destroy; override;
  end;
Delphi-Quellcode:
function TSkinListBox.ListGetTopIndex(hList: HWND): Integer;
var
  nGetTopIndex: Integer;
begin
    nGetTopIndex := -1;

    if hList <> 0 then
    begin
       nGetTopIndex := SendMessage(hList, LB_GETTOPINDEX, 0, 0);
       if nGetTopIndex > -1 then
         inc(nGetTopIndex);
    end;
    Result := nGetTopIndex;
end
Wenn ich nun in der ListBoxProc(nicht in der Classe implementiert) TSkinListBox.ListGetTopIndex aufrufe dann meckert der compiler !
Zitat:
[Pascal Error] uListBox.pas(286): E2076 This form of method call only allowed for class methods
Wie kann ich das abfangen ?

gruss Emil
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:54 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