Autor Beitrag
Baumunk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

WinXP
Delphi 2005
BeitragVerfasst: Di 31.05.05 15:06 
Hallo,

Ich habe da versucht hintergrundbild für ListView einzuprogrammieren mit ListView_SetBkImage :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
VarA : TLVBKImage;
Begin
  FillChar (A, SizeOf (A), 0);
  OleInitialize(nil);
  A.ulFlags := LVBKIF_SOURCE_URL + LVBKIF_STYLE_TILE;
  A.pszImage := PChar('C:\\Windows\\Feder.bmp');
  A.cchImageMax := Length ('C:\\Windows\\Feder.bmp');
  If Not ListView_SetBkImage (LV.Handle, @A) Then ShowMessage ('No');
End;


Das functioniert nicht !!
Result ist zwar True, aber es ist keine anderung an bildshirm!

Weisst jemand warum?

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
Baumunk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

WinXP
Delphi 2005
BeitragVerfasst: Mi 01.06.05 07:52 
Danke selbst gefunden


Man muss Procedure WndProc und Message WM_ERASEBKGND an DefaultHandle leiten, dann tut's. :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
Case Message.Msg of
    WM_ERASEBKGND :
      DefaultHandler (Message);
  Else
    Inherited WndProc (Message);
  End;


Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.