| |
|
|
Hans-Jürgen Trog | Hi,
I have one Imagelist (s. large-Bitmap-Icons.prf of Frank) laid out, around the Images one Folder Show To let. moreover should now but too The Filenames showing. my ask moreover:
1. how can I The Files one Folder into List view reading? After Possibility automatically. 2. at the same time should moreover too The Minibilder showing. 3. is it possible, with z.B. 3 Split too each boxes anzuklicken? D.h., that I as Return on one Image or. which Dateinamens as Return this Filenames sustain. means z.B. in the 3. row the 2. Image You can etc.
greetings Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/20/08 ▲ |
|
|
|
|
Hans-Jürgen Trog | small Zusatzfrage:
what means really the o.g. PRF at the beginning : {$iq} ? Profan reports moreover: commands uncharted!
Greeting Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/20/08 ▲ |
|
|
|
|
Jac de Lad | the isdt one XPSE-command and points XPSE on whom code to the reading into Interpreter To send and itself self subsequently To terminate. |
|
|
| 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 | 07/20/08 ▲ |
|
|
|
|
Thomas Freier | If because a Bildvorschau with the List view his should, go herewith any ask answers?
{$iq}
Declare lvdll&,listview&,Text$,x&,y&,z&,ilist&
Declare bild&[199]
Declare area#
Dim area#,512
Def GetSysColor(1) !"USER32","GetSysColor"
$I Listview_Funktionen.inc
lvdll&=usedll("Listview.dll")
Windowtitle "Unbegrenzt grosse Images in Listviews einbauen"
Windowstyle 26+512
Window 0,0-640,600
Cls GetSysColor(15)
Def ImageList_Create(5) !"comctl32.dll","ImageList_Create"
Def ImageList_Destroy(1) !"comctl32.dll","ImageList_Destroy"
Def ImageList_Add(3) !"comctl32.dll","ImageList_Add"
Usefont "MS Sans Serif",10,0,0,0,0
SetDialogFont 1
Profan-interne Listbox fill
Images in The Listbox
var way$ = @$ GetDir("@")
ClearList
ChDir way$ + "\lvdata"
AddFiles "*.JPG"
ChDir way$
Gewünsche Bildgrösse for this demonstration skaliert: 30 x 30 Pixel
ilist&=ImageList_Create(30,30,33,0,0)
listview&=CreateListView(%hwnd,%hinstance,0,GetSysColor(24),-1,$23)
SetImageList(listview&,ilist&)
x& = 1 + ((1+%GetCount) / 2) amount the erforderlichen Lines with 2 Split
BuildListview(listview&,2,x&,280,0)
text$="Spalte 1"
SetColumnName(listview&,Addr(text $),0)
text$="Spalte 2"
SetColumnName(listview&,Addr(text $),1)
Declare Nr%
Nr%= 0
x& = 0 row
While Nr% < %GetCount amount the Images in the Listbox
y& = 0 slot
While y& < 2
Text$= way$ + "\lvdata\" + @ListBoxItem$(Nr%)
bild&[Nr%] = Create("hSizedPic", -1,Text$, 30, 30, 1)
ImageList_Add(ilist&,bild&[Nr%],0)
Text$= " " + @ListBoxItem$(Nr%)
SetItemText(listview&,addr(text $),y&,x&)
SetIconColumn(y&)
SetIcon(listview&,x&,Nr%)
DeleteObject bild&[Nr%]
inc y&
inc Nr%
Case nr% > %GetCount : BREAK
EndWhile
inc x&
EndWhile
ShowListView(listview&,8,8,612,304)
text$="Registriert any Mausklicks (left, right, Double click) on a Itemtext.
"
text$=text $+"Auch left and rights Mausklicks on Spaltenbuttens go registered."
var status&=Create("TEXT",%HWND,Text$,8,464,600,72)
InitMessages(%hwnd)
While 1
waitinput
Case %key=2:BREAK
y&=GetControlParas(area #)
If y&=2
Text$="Der rights Mausknopf watts in slot "+Str $(Long(area#,4))+" / "+Str $(Long(area#,8))+" pressed.
"
SetText status&,Text$
ElseIf y&=1
Text$="Der left Mausknopf watts in slot "+Str $(Long(area#,4))+" / "+Str $(Long(area#,8))+" as Double click pressed.
"
SetText status&,Text$
ElseIf y&=3
Text$="Der left Mausknopf watts in slot "+Str $(Long(area#,4))+" / "+Str $(Long(area#,8))+" pressed.
"
SetText status&,Text$
GetItemText(listview&,area#,Str $(Long(area#,4)),Str $(Long(area#,8)))
Text$=trim$(String $(area#,0))
MessageBox "Mit Linksklick could the image
"+ Text$ +"
in Originalgröße displayed be ...","information",$40040
EndIf
EndWhile
Dispose area#
ImageList_Destroy(ilist&)
DestroyWindow(%hwnd)
freedll lvdll&
End
21 watch a Bilderordner gestestet. it comes to a Fehlanzeige and the construction lasts forever.
comes the Example of "Pascal" in question?
LoadFile-dialog with Bitmap-display (ex windows 2000 / XP)
(C) Uwe "Pascal" Niemeier
window 10,10-700,500
$H Messages.ph
$H windows.ph
proc OpenFileHook-------------------------------OpenFileHook----------------------------
parameters dlg&,msg&,wparam&,lparam&
case status%:return 1-----view must only once adjusted go
casenot msg&=~WM_NOTIFY:return 1
if long(lparam&,8)=-603---with Init existieren DefView and LV yet not!
status%=1
DefView&=~FindWindowEx(~GetParent(dlg&),0,"SHELLDLL_DefView","")
sendmessage(DefView&,~WM_COMMAND,$702D,0)--Undokumentierte Message
endif
return 1
endproc---------------------------------------------------------------------------------
proc LoadPicDialog------------------------------LoadPicDialog---------------------------
parameters way$,cover$,name$
declare ofn#,Result$,Result&
declare DefView&,status%------variables for Hook
name$=name$+"z*.bmp;*.jpe;*.jpeg;*.jpg;*.gifzz"--filter (with want adjust)
dim ofn#,88+256---------------structure (Win2000/NT/XP) + Puffer
clear ofn#
long ofn#,0=88----------------Size structure for GetOpenFileName (76 for Win9x)
long ofn#,4=%hwnd-------------übergeordnetes Window
long ofn#,12=addr(name$)------filter/type
long ofn#,28=ofn#+88----------Beginn Puffer
long ofn#,32=255--------------Puffergrösse
long ofn#,44=addr(way$)------Anfangspfad
long ofn#,48=addr(cover$)-----cover
long ofn#,52=$880024----------? Happen?
long ofn#,68=procaddr("OpenFileHook",4)
Result&=external("COMDLG32","GetOpenFileNameA",ofn#)
Result$=string $(ofn#,88)
casenot Result&:Result$=""
procaddr("OpenFileHook",-4)
dispose ofn#
return Result$
endproc---------------------------------------------------------------------------------
print LoadPicDialog("","Bitte Image wählen","Bild")
waitkey
|
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 07/20/08 ▲ |
|
|
|
|
Hans-Jürgen Trog | Hello Thomas,
the Code Pasqal is lovely. Runs
in the row long ofn#,68=procaddr("OpenFileHook",4) have I rausgefunden, that the 4 = with images and the 0 = without Image(list) means.
know You viell., whether one here The -4 too Change must, if one 0 (upper row) einsetzt? procaddr("OpenFileHook",-4)
thanks Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/21/08 ▲ |
|
|
|
|
| Autsch! The 2. Param of ProcAddr must The Number of To expected Parameter his - You must here on the 4 nothing Change...
what You watch have is a Fehlfunktion, means only apparently richtiges Result because of falser cause. |
|
|
| |
|
|
|
Hans-Jürgen Trog | Hello iF,
ok, but How or. what could one transfer, circa z.B. by exhaust between whom both mutants dial to? or does it not?
thanks Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/21/08 ▲ |
|
|
|
|
| |
|
| |
|
|
|
Hans-Jürgen Trog | I mean whom Code Pasqal (supra) with the Loadfile-dialog. in the shape becomes the Dialogue with Miniaturansichten opened. really very so, How I it me wish. but viell. can it too in the Listenansicht open? if so, then could I in my Progrämmchen dial let, whether with Miniaturen or whether as list the dialog appear.
I had Yes virtual, that with the the "4" or. "0" bewirkt becomes. unfortunately Yes wrong virtual
Greeting Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/21/08 ▲ |
|
|
|
|
Hans-Jürgen Trog | I habs with googlen found: [...]
there go The Messages for viewed and it works lovely!!
Greeting Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/21/08 ▲ |
|
|
|
|
| must only whom Sendmessage Change or. of these Konstanten feed:
How you see uses Pascal here $702D means SHVIEW_THUMBNAIL.
Ah, were ne second faster... |
|
|
| |
|
|
|
Hans-Jürgen Trog | Hello iF,
only time ne question, The of these recent only on the side To tuen has. in the RGH-Forum have I Andreas Miethe these question set: [...]
i don't know, whether it leave has or hopefully not sick is.
The code runs in the Mainwindow (%hwnd). I have already plenty probiert, get but the activities not one Window/dialog, the z.B. with @Create("Window",n,s,X1,Y1,X2,Y2) created watts.
can You, the adjust?
would be me very forward.
thanks Hans-Jürgen |
|
|
| Windows-Tablet mit Win11, XProfan X4 | 07/21/08 ▲ |
|
|
|