English
Forum

List view-Controls synchron scroll

 

Detlef
Jagolski
Hi,

have a problem:
I use two List view-Controls.
both should synchron scroll.
The Scroll bar moving itself too synchron. however More neither.

Perhaps white someone council.

Greeting
Detlef
CompileMarkSeparation
 $P+
Set("ErrorLevel",1)
Set("FastMode",1)
WINDOWS.PH
MESSAGES.PH
SHELLAPI.PH
STRUCTS.PH
COMMCTRL.PH
LISTVIEW_FUNKTIONEN.INC
var lvDll& = UseDll("Listview.dll")

Proc GridBox1

    Declare SortGridBox1#
    Declare ColorGridBox1#
    Dim SortGridBox1#,48
    Dim ColorGridBox1#,64
    Long SortGridBox1#,0=2
    Long SortGridBox1#,4=1
    Long SortGridBox1#,8=1
    Long SortGridBox1#,12=1
    Long SortGridBox1#,16=1
    Long SortGridBox1#,20=1
    Long SortGridBox1#,24=1
    Long SortGridBox1#,28=1
    Long SortGridBox1#,32=1
    Long SortGridBox1#,36=1
    Long SortGridBox1#,40=1
    Long SortGridBox1#,44=1
    Clear ColorGridBox1#    bereich# mit Nullen löschen, wichtig!
    Byte ColorGridBox1#,0=0
    Byte ColorGridBox1#,1=1
    Byte ColorGridBox1#,2=1
    Byte ColorGridBox1#,3=1
    Byte ColorGridBox1#,4=0
    Byte ColorGridBox1#,5=0
    Byte ColorGridBox1#,6=0
    Byte ColorGridBox1#,7=0
    Byte ColorGridBox1#,8=0
    Byte ColorGridBox1#,9=0
    Byte ColorGridBox1#,10=0
    GridBox1& = CreateListView(%hwnd,%hinstance,0,RGB(255,255,255),-1,$31)
    SetFont GridBox1&,ListViewFont3&
    var Headerh& = SendMessage(GridBox1&,$101F,0,0)
    SetFont Headerh&,ListViewFont&
    InsertColumn GridBox1&,"Artikel-Nr.",80,0
    InsertColumn GridBox1&,"Bezeichnung 1",200,0
    InsertColumn GridBox1&,"Bezeichnung 2",200,0
    InsertColumn GridBox1&,"Marke",100,0
    InsertColumn GridBox1&,"Artikel-Nr.",80,0
    InsertColumn GridBox1&,"Bezeichnung 1",200,0
    InsertColumn GridBox1&,"Bezeichnung 2",200,0
    InsertColumn GridBox1&,"Marke",100,0
    InsertColumn GridBox1&,"Artikel-Nr.",80,0
    InsertColumn GridBox1&,"Bezeichnung 1",200,0
    InsertColumn GridBox1&,"Bezeichnung 2",200,0
    InsertColumn GridBox1&,"Marke",100,0
    ASortListview(GridBox1&,SortGridBox1#,12)
    ShowListView(GridBox1&,20,20,832,252)
    RaiseColumns(GridBox1&,ColorGridBox1#,RGB(0,0,158),RGB(193,247,239))
    Dispose SortGridBox1#
    Dispose ColorGridBox1#
    SetLineNumbers(GridBox1&,1,0)

EndProc

Proc GridBox2

    Declare SortGridBox2#
    Declare ColorGridBox2#
    Dim SortGridBox2#,48
    Dim ColorGridBox2#,64
    Long SortGridBox2#,0=2
    Long SortGridBox2#,4=1
    Long SortGridBox2#,8=1
    Long SortGridBox2#,12=1
    Long SortGridBox2#,16=1
    Long SortGridBox2#,20=1
    Long SortGridBox2#,24=1
    Long SortGridBox2#,28=1
    Long SortGridBox2#,32=1
    Long SortGridBox2#,36=1
    Long SortGridBox2#,40=1
    Long SortGridBox2#,44=1
    Clear ColorGridBox2#    bereich# mit Nullen löschen, wichtig!
    Byte ColorGridBox2#,0=0
    Byte ColorGridBox2#,1=1
    Byte ColorGridBox2#,2=1
    Byte ColorGridBox2#,3=1
    Byte ColorGridBox2#,4=0
    Byte ColorGridBox2#,5=0
    Byte ColorGridBox2#,6=0
    Byte ColorGridBox2#,7=0
    Byte ColorGridBox2#,8=0
    Byte ColorGridBox2#,9=0
    Byte ColorGridBox2#,10=0
    GridBox2& = CreateListView(%hwnd,%hinstance,0,RGB(255,255,255),-1,$31)
    SetFont GridBox2&,ListViewFont3&
    var Headerh& = SendMessage(GridBox2&,$101F,0,0)
    SetFont Headerh&,ListViewFont&
    InsertColumn GridBox2&,"Artikel-Nr.",80,0
    InsertColumn GridBox2&,"Bezeichnung 1",200,0
    InsertColumn GridBox2&,"Bezeichnung 2",200,0
    InsertColumn GridBox2&,"Marke",100,0
    InsertColumn GridBox2&,"Artikel-Nr.",80,0
    InsertColumn GridBox2&,"Bezeichnung 1",200,0
    InsertColumn GridBox2&,"Bezeichnung 2",200,0
    InsertColumn GridBox2&,"Marke",100,0
    InsertColumn GridBox2&,"Artikel-Nr.",80,0
    InsertColumn GridBox2&,"Bezeichnung 1",200,0
    InsertColumn GridBox2&,"Bezeichnung 2",200,0
    InsertColumn GridBox2&,"Marke",100,0
    ASortListview(GridBox2&,SortGridBox2#,12)
    ShowListView(GridBox2&,20,280,832,262)
    RaiseColumns(GridBox2&,ColorGridBox2#,RGB(0,0,158),RGB(193,247,239))
    Dispose SortGridBox2#
    Dispose ColorGridBox2#
    SetLineNumbers(GridBox2&,1,0)

EndProc

Proc OnApplicationExit

     $I C:PROGRAMMEPRFELLOWLIBLISTVIEW_DISPOSE.INC
    SubClass GridBox1&,0
    SubClass GridBox2&,0
    Dispose HScrollInfo#
    Dispose VScrollInfo#
    Dispose ColumnUpdate#

EndProc

Declare appexit%
Declare GridBox1&
Declare GridBox2&
Declare GridScrollPos1&
Declare GridScrollPos2&
Declare HScrollInfo#
Declare VScrollInfo#
Declare ScrollPos&
Declare ColumnUpdate#
Struct ScrollInfo = ~SCROLLINFO
Dim HScrollInfo#,ScrollInfo
Dim VScrollInfo#,ScrollInfo
Dim ColumnUpdate#,768
var ListViewFont&     = Create("Font","MS Sans Serif",13,0,1,0,0)
var ListViewFont3&    = Create("FONT","Arial",16,0,0,0,0)

SubClassProc

    If SubClassMessage(GridBox1&, ~WM_HSCROLL)

        HScrollInfo#.cbSize& = SizeOf(HScrollInfo#)
        HScrollInfo#.fMask&  = ~SIF_ALL
        ~GetScrollInfo(GridBox1&,~SB_HORZ,HScrollInfo#)
        ~SetScrollInfo(GridBox2&,~SB_HORZ,HScrollInfo#,1)
        GetColumnUpdate(GridBox1&,ColumnUpdate#)
        SetColumnUpdate(GridBox2&,ColumnUpdate#)
        ~UpdateWindow(GridBox2&)
        Set("WinProc",1)

    ElseIf SubClassMessage(GridBox2&, ~WM_HSCROLL)

        HScrollInfo#.cbSize& = SizeOf(HScrollInfo#)
        HScrollInfo#.fMask&  = ~SIF_ALL
        ~GetScrollInfo(GridBox2&,~SB_HORZ,HScrollInfo#)
        ~SetScrollInfo(GridBox1&,~SB_HORZ,HScrollInfo#,1)
        GetColumnUpdate(GridBox2&,ColumnUpdate#)
        SetColumnUpdate(GridBox1&,ColumnUpdate#)
        ~UpdateWindow(GridBox1&)
        Set("WinProc",1)

    EndIf

EndProc

SetTrueColor 1
WindowStyle $003F
WindowTitle "DesignForm"
Window %maxX + 5,114 - 887,586
Cls ~GetSysColor(15)
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
GridBox1
GridBox2
Set("SubClassMode",1)
SubClass GridBox1&,1
SubClass GridBox2&,1
SetWindowPos %hwnd = 207,114 - 887,586;0

WhileNot appexit%

    WaitInput

    If %key=2

        appexit%=1

    ElseIf GetFocus(GridBox1&)

    ElseIf GetFocus(GridBox2&)

    ElseIf %key = 4

        Fenstergröße

    ElseIf %key = 5

        Hilfe

    EndIf

Wend

OnApplicationExit
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/03/08  
 



the put down the Message on The 2. Scrollable reicht (naturally) not from, The Scrollable self must the Parent naturally too yet The Info zukommen let as though it moving would.
 
09/03/08  
 




Detlef
Jagolski
Hello IF,

and How would The (Info) Appearance?

Greeting

Detlef
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/03/08  
 




Frank
Abbing
have you got already The Message LVM_SCROLL ausprobiert?
 
09/03/08  
 



about so, as Info on the hWnd looks, if a daraufliegende Scrollable moving watts. the against can You slight testing. Look you to z.B. [...]  or sooner [...]  on.

it may be the it ausreicht if you just wm_scroll on the List view send, so would I herantasten.
 
09/03/08  
 




Detlef
Jagolski
Hello Frank,
CompileMarkSeparation
SendMessage(GridBox1&,~LVM_SCROLL,HScrollInfo#.nPos& ,0)
>

have I, but isn't synchron.

Greeting

Detlef
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/03/08  
 



Hmpf now wished I it testing and must check, that obiger code not at all run isn't there complete.
 
09/03/08  
 




Frank
Abbing
Yes, too fixes. XPSE reports ditto yet tons on small Fehlern.
 
09/03/08  
 



press still W in the xpse (no rhyme!) , then have You The Warnings in the Notepad to that einfachen Rauskopieren.
 
09/03/08  
 




Detlef
Jagolski
by me runs it, without Error Message?

61 kB
Hochgeladen:09/03/08
Downloadcounter85
Download
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/03/08  
 




Jörg
Sellmeyer
but not so, How it supra standing! you have just windows.ph drinstehen and not $H windows.ph. the same with LISTVIEW_FUNKTIONEN.INC
instead of $I LISTVIEW_FUNKTIONEN.INC. then is the LISTVIEW_DISPOSE.INC yet with festem way eingebunden. are only Kleinigkeiten, make one Tester but the life unnecessary heavy.
only time as hint - You can also simply the following write:
CompileMarkSeparation
Long SortGridBox2#,0=2,1,1,1,...
>
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/03/08  
 




Frank
Abbing
Detlef, your .ph contains erweiterte Definitionen, The us are missing.
Error reports the Precompiler XPSE, the already almost to that XProfan-Standart heard.
 
09/03/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.645 Views

Untitledvor 0 min.
RudiB.01/14/22
Jörg Sellmeyer06/04/20
Member 154727709/23/18
Georg02/06/18
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