Forum | | | | - Page 1 - |
| Julian Schmidt | Hi, can somehow of/ one row one Listviews a designed Tooltip allocate? Greeting |
| | | | |
| | | | - Page 2 - |
| | | | | | | |
| | Julian Schmidt | there comes..
Error in structure- or Klassendefinition CBSIZE CompileMarkSeparationstruct LVSETINFOTIP=cbSize,dwFlags,pszText,iItem,iSubItem
declare m#
dim m#,20
long m#,0=20,0,"Test",0,0
sendmessage(listview&,LVM_SETINFOTIP,0,m#)
dispose |
| | | | |
| | | | | | | |
| | Julian Schmidt | shining nevertheless not To functions... CompileMarkSeparationDef GetSysColor(1) !"USER32","GetSysColor"
$I Listview_Funktionen.inc
var lvdll&=usedll("Listview.dll")
cls GetSysColor(15)
var listview&=CreateListView(%hwnd,%hinstance,0,GetSysColor(15),-1,$431)
whileloop 10
InsertColumn listview&,"Spalte"+STr$(&loop)-1,50,0
Endwhile
whileloop 30
SetItem listview&,"Text1","Text2","Text3","Text4","Text5","Text6","Text7","Text8","Text9"
Endwhile
ShowListView(listview&,0,0,width(%hwnd),height(%hwnd))
Declare m#
Dim m#,20
Long m#,0=20,0,"Test",0,0
Sendmessage(listview&,4096+173,0,m#)
Dispose m#
InitMessages(%hwnd)
While 1
waitinput
Endwhile
CloseMessages(%hwnd)
freedll lvdll&
$I Listview_Dispose.inc
end
|
| | | | |
| | | load time one complete proposition high (if you The listview.dll uses) or a View source the without DLL auskommt. |
| | | | |
| | Julian Schmidt |
| | | | |
| | Thomas Freier | with the List view.dll and TTIP.pcu can still right simply crazy Tooltips create.
or without TTIP.pcu CompileMarkSeparation $I Listview_Funktionen.inc
var lvdll&=usedll("Listview.dll")
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' (W) 2003 Frank Abbing
'
Declare bereich#,be#,erg&,erg2&,x&,y&,text$
Dim be#,8
Dim bereich#,1024
DEF GetCursorPos(1) !"USER32","GetCursorPos"
DEF WindowFromPoint(2) !"USER32","WindowFromPoint"
DEF ChildWindowFromPoint(3) !"USER32","ChildWindowFromPoint"
Def GetSysColor(1) !"USER32","GetSysColor"
Def ScreenToClient(2) !"USER32","ScreenToClient"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetTrueColor 1
cls GetSysColor(15)
var listview&=CreateListView(%hwnd,%hinstance,-1,9356944,-1,$20)
InsertColumn listview&,"1.Spalte",120,0
InsertColumn listview&,"2.Spalte",120,0
Whileloop 50
AddString(listview&,"mit|HERZ "+str$(&loop))
wend
'Liste Tooltips
vaR LB%=CreateListBox(%hwnd,0,0,0,0,0)
Whileloop GetCount(listview&)
AddString(LB%,"Tooltip "+str$(&loop))
wend
var ToolTip&=create("Tooltip",%hwnd,listview&,"")
' Zeilenhöhe im Listview festlegen oder ermitteln und in einer Variablen speichern
' für die spätere Berechnung: Curserposition ist in Zeile
var freelist&=SetLineHeight(listview&,20)
ShowListView(listview&,10,160,400,200)
Declare ZeileO&,ZeileU&,x%,y%,xold%
Usermessages 16
SubClass listview&, 1
while 1
waitinput
case %umessage=16 :BREAK
wend
SubClass listview&, 0
DestroyWindow(%hwnd)
DestroyImageList(freelist&)
dispose be#
dispose bereich#
freedll lvdll&
end
SubClassProc
Clear bereich#
GetVisibleLines(listview&,bereich#)
ZeileO&=Long(bereich#,0)'Obere sichtbare Zeile
ZeileU&=Long(bereich#,4)'Untere sichtbare Zeile
GetCursorPos(be#)
x&=Long(be#,0)
y&=Long(be#,4)
erg&=@WindowFromPoint(x&,y&)
If erg&<>0
ScreenToClient(erg&,be#)
x&=Long(be#,0)'Maus Position X
y&=Long(be#,4)'Maus Position Y
erg2&=@ChildWindowFromPoint(erg&,x&,y&)'Handle unter Mauszeiger
EndIf
x%= int((y&/21)-1+ZeileO&)'Zeile= Mausposition/ Zeilenhöhe+1(=Raster)
if x%<>xold%
settext ToolTip&,%hwnd,Listview&,""
If erg&=Listview&
settext ToolTip&,%hwnd,Listview&,getstring$(LB%,x%)
xold%=x%
EndIf
EndIf
Set("WinProc",1s=s2>)
ENDPROC
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 02/19/12 ▲ |
| |
| | Julian Schmidt | already, nevertheless is the lane over Subclassing umständlich |
| | | | |
| | Thomas Freier | is naturally too with GetMessage possible. CompileMarkSeparation $I Listview_Funktionen.inc
var lvdll&=usedll("Listview.dll")
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' (W) 2003 Frank Abbing
'
Declare bereich#,be#,erg&,erg2&,x&,y&,text$
Dim be#,8
Dim bereich#,1024
DEF GetCursorPos(1) !"USER32","GetCursorPos"
DEF WindowFromPoint(2) !"USER32","WindowFromPoint"
DEF ChildWindowFromPoint(3) !"USER32","ChildWindowFromPoint"
Def GetSysColor(1) !"USER32","GetSysColor"
Def ScreenToClient(2) !"USER32","ScreenToClient"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetTrueColor 1
cls GetSysColor(15)
var listview&=CreateListView(%hwnd,%hinstance,-1,9356944,-1,$20)
InsertColumn listview&,"1.Spalte",120,0
InsertColumn listview&,"2.Spalte",120,0
Whileloop 50
AddString(listview&,"mit|HERZ "+str$(&loop))
wend
'Liste Tooltips
vaR LB%=CreateListBox(%hwnd,0,0,0,0,0)
Whileloop GetCount(listview&)
AddString(LB%,"Tooltip "+str$(&loop))
wend
var ToolTip&=create("Tooltip",%hwnd,listview&,"")
' Zeilenhöhe im Listview festlegen oder ermitteln und in einer Variablen speichern
' für die spätere Berechnung: Curserposition ist in Zeile
var freelist&=SetLineHeight(listview&,20)
ShowListView(listview&,10,160,400,200)
Declare ZeileO&,ZeileU&,x%,y%,xold%
Usermessages 16
while 1
GetMessage
case %umessage=16 :BREAK
GetVisibleLines(listview&,bereich#)
ZeileO&=Long(bereich#,0)'Obere sichtbare Zeile
GetCursorPos(be#)
erg&=@WindowFromPoint(Long(be#,0),Long(be#,4))
If erg&=Listview&
ScreenToClient(erg&,be#)
y&=Long(be#,4)
x%= int((Long(be#,4)/21)-1+ZeileO&)
If x%<>xold%
settext ToolTip&,%hwnd,Listview&,getstring$(LB%,x%)
xold%=x%
EndIf
EndIf
wend
DestroyWindow(%hwnd)
DestroyImageList(freelist&)
dispose be#
dispose bereich#
freedll
end
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 02/20/12 ▲ |
| |
| | Julian Schmidt | naturally, though would find I the lane over LVM_SETINFOTIP rather. Schade the apparently none white Why these in the example not functions [...] . |
| | | | |
| | | shining neither To klappen if I pszText in the Unicode stature absende.
Try still time the Unicode-ListView-Control -
I faith Nico Madysa having that here at times different to put pictured -
z.B. here ( [...] ) . |
| | | | |
| | Julian Schmidt | Dass becomes though well hardly with List view.dll compatible his, there take I rather The Variante Thomas. Thx you all. Werds now simply install. |
| | | | |
|
AnswerTopic-Options | 28.521 Views |
Themeninformationenthis Topic has 6 subscriber: |