🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.nativeapi
1 messages
1 total messages Started by 유영제 Mon, 10 Dec 2012 07:28
TListView BackGround Image Insert ....after "Icon Transparent Area" are not transparent
#57
Author: 유영제
Date: Mon, 10 Dec 2012 07:28
51 lines
2441 bytes
1. ListView ..BackGround Image Insert

  TListView.. OnCustomDraw

  Code)
  BMP := TBitMap.Create; 
  Try
    BMP.LoadFromFile('배경.bmp');
    ListView.Canvas.Brush.Bitmap := BMP;

       ListView.Canvas.FillRect(Rect(0,0,ListView.ClientWidth,ListView.ClientHeight));

  finally
    (Sender as TListView).Canvas.Brush.Bitmap := nil;
    FreeAndNil(BMP);
  end; 
  SetBkMode(ListView.Canvas.Handle,TRANSPARENT);
  ListView.Perform(LVM_SETTEXTBKCOLOR,0,LongInt(CLR_NONE));
  ListView_SetBKColor(ListView.Handle,CLR_NONE);

  
2. OK - BackGround Image Insert...

3. ListView ...ListItem Add (file path)

   Code)
   SHGetFileInfo(PChar(edFileName.Text), 0, shInfo, SizeOf(shInfo),
        SHGFI_ICON or SHGFI_LARGEICON or SHGFI_SYSICONINDEX
        );

  Icon.Handle := shInfo.hIcon; //Icon := TIcon.Create;
  ListItem.ImageIndex :=  imageList.AddIcon(Icon); 
  // imageList > TImageList
  // TImageList Width, Height = 32;
  // BkColor, BlendColor = clNone
  // ImageType = itMask

4. ㅠ..ㅠ
   ItemList Add Succed..

5. But Fail. "Icon Transparent Area" are filled with black color.


What should I do?




Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads