English
Forum

JPEG in list view as Icon

 

Jac
de
Lad
The cover sagts already...does it?
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
12/03/07  
 




Frank
Abbing
as background? No prob. in lieu of Icon goes too - via Imagelist.
 
12/03/07  
 




Jac
de
Lad
Jaja, but How wars I the into Imagelist mere??
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
12/03/07  
 




Frank
Abbing
gives ne crowd API for Imagelisten. your friend is ImageList_Add().
 
12/03/07  
 




Jac
de
Lad
alas Come on Frank. I can on itself with Imagelisten bypass. but only with BMP/ICO and so. How wars I there one JPEG mere? Womit load I the...?
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
12/03/07  
 




Jörg
Sellmeyer
i'd time say, You beget with Create(hPic,...) a handle and commit the on The Image List.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/03/07  
 




Jac
de
Lad
hPic is not. I Have already gegooglet without end...I come not further.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
12/10/07  
 




Jac
de
Lad
Roland, have you got ne idea?
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
12/10/07  
 




GDL
Hi,

get Schützenhilfe of me.would be too gladly Jpeg as Iconbild in the 1sten slot of/ one row having.
have additional yet the Prob. that to Erstellzeit so ca. 1000 jpegs yet on Icogröße minimizes go must.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
12/10/07  
 




Frank
Abbing
some GDI-API desires free Bitmaps and some Bitmaps, The on a HDC yoked are. with SelectObject() can you Bitmaps on HDCs yoking and solve.
important: The Bitmaps first enable, if after You the List view destroy have.
here of/ one of my List view.dll-Source, the these engineering shows. You can whom Source slight on your needs adjust...
CompileMarkSeparation
Declare lvdll&,listview&,text$,x&,y&,z&,ilist&,bild1&,bild2&
Def GetSysColor(1) !USER32,GetSysColor
Def CreateBitmap(5) !GDI32,CreateBitmap
Def SelectObject(2) !GDI32,SelectObject
Def ImageList_Create(5) !comctl32.dll,ImageList_Create
Def ImageList_Destroy(1) !comctl32.dll,ImageList_Destroy
Def ImageList_Add(3) !comctl32.dll,ImageList_Add
 $I Listview_Funktionen.inc
lvdll&=usedll(Listview.dll)
Prozedure: Icons/Bilder zufällig setzen

Proc BildSetzen

    SetIconColumn(1)
    SetIcon(listview&,0,Rnd(4))
    SetIcon(listview&,1,Rnd(4))
    SetIcon(listview&,2,Rnd(4))
    SetIcon(listview&,3,Rnd(4))
    SetIconColumn(2)
    SetIcon(listview&,0,Rnd(4))
    SetIcon(listview&,1,Rnd(4))
    SetIcon(listview&,2,Rnd(4))
    SetIcon(listview&,3,Rnd(4))
    SetIconColumn(3)
    SetIcon(listview&,0,Rnd(4))
    SetIcon(listview&,1,Rnd(4))
    SetIcon(listview&,2,Rnd(4))
    SetIcon(listview&,3,Rnd(4))

EndProc

Windowtitle Listviews und Spielereien mit Bitmap-Grafiken
Windowstyle 26+512
Window 200,200-440,360
Cls GetSysColor(15)
Usefont MS Sans Serif,10,0,0,0,0
SetDialogFont 1
InitMessages(%hwnd)
Gewünsche Bildgrösse für dieses Demo: 64 x 64 Pixel
ilist&=ImageList_Create(64,64,33,0,0)
listview&=CreateListView(%hwnd,%hinstance,0,RGB(255,255,255),-1,$403)
Leere Bitmap erstellen
x&=CreateBitmap(64,64,1,1,0)
MCls 64,64
StartPaint -1
Speicherbitmap mit Grafik füllen
Speicherbitmap gegen leere Bitmap tauschen, um sie in Imageliste einfügen zu können
Bitmaps zurücktauschen
Cls RGB(255,255,255)
UsePen 1,4,RGB(0,0,255)
Ellipse 5,10-50,50
y&=SelectObject(%hdc,x&)
ImageList_Add(ilist&,y&,0)
x&=SelectObject(%hdc,y&)
Wiederholen für nächstes Grafikobjekt
Cls RGB(255,255,255)
UsePen 2,2,RGB(0,255,0)
Rectangle 5,10-50,50
y&=SelectObject(%hdc,x&)
ImageList_Add(ilist&,y&,0)
x&=SelectObject(%hdc,y&)
Wiederholen...
Cls RGB(255,255,255)
UsePen 3,3,RGB(255,0,0)
RoundRect 5,10-50,50;24,24
y&=SelectObject(%hdc,x&)
ImageList_Add(ilist&,y&,0)
x&=SelectObject(%hdc,y&)
Cls RGB(255,255,255)
UsePen 4,2,RGB(255,0,255)
Line 5,10-50,50
y&=SelectObject(%hdc,x&)
ImageList_Add(ilist&,y&,0)
x&=SelectObject(%hdc,y&)
EndPaint
Leere Bitmap zerstören
DeleteObject x&
SetImageList(listview&,ilist&)
Leere Listviewspalten- und zeilen erzeugen
BuildListview(listview&,4,4,128,0)
Erste Spalte unbrauchbar machen (wegen ungewünschter Selektierung)
SetColumnWidth(listview&,0,0)
BildSetzen
Spaltentexte
text$=Thema 1
SetColumnName(listview&,Addr(text$),1)
text$=Thema 2
SetColumnName(listview&,Addr(text$),2)
text$=Thema 3
SetColumnName(listview&,Addr(text$),3)
Itemtexte generieren
x&=0
y&=0

Whileloop 12

    text$=Bild +Str$(&loop)
    SetItemText(listview&,addr(text$),x&+1,y&)
    x&=x&+1

    If x&>=3

        x&=0
        y&=y&+1

    EndIf

EndWhile

ShowListView(listview&,16,16,400,300)
SetTimer 150

While 1

    waitinput
    Case %key=2:BREAK
    BildSetzen

EndWhile

KillTimer
ImageList_Destroy(ilist&)
DestroyWindow(%hwnd)
freedll lvdll&
End
 
12/10/07  
 




Thomas
Freier
Frank, you have still the example: Grosse_Bitmap-Icons.prf,
so can still too *.jpg and *.gif verwenden; *.png went not.

88 kB
Hochgeladen:12/10/07
Downloadcounter92
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/10/07  
 




Frank
Abbing
Yes, Thomas. The code demonstrating it yet rather. though go for entscheidenen things List view.dll-functions uses, during the others code the manually Done.
ImageList_Add() can PNG not loading. but dank OLE go JPG, GIF and Co but accepted. Jac, I said you already, ImageList_Add is your friend...
 
12/11/07  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.221 Views

Untitledvor 0 min.
Uwe Lang04/28/20
Ernst07/23/16
Michael W.07/07/16
Tommy01/03/14
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie