News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Superclassed Listbox's - Parallel Vertical Scrolling

Started by Ksbunker, November 02, 2009, 06:45:03 AM

Previous topic - Next topic

Ksbunker

I'm attempting to link two listboxes together sharing only one vertical scroll bar.

I've superclassed two Listbox's together, with the intent of vertical scrolling the contents of listbox 2 (IDC_LB2) whenever listbox 1 (IDC_LB1) is vertically scrolled - so they scroll in parallel.

I have processed for WM_VSCROLL but am uncertain about what to do next or in what direction to head. I read I can programmatically send the same scroll information from LB1 to LB2 using SendDlgItemMessage and lParam, but am uncertain.

ListBoxProc proc hWnd:DWORD, uMsg:UINT, wParam:WPARAM, lParam:LPARAM

.if uMsg == WM_VSCROLL
      int 3
invoke GetDlgCtrlID, hWnd
.if eax == IDC_LB1
invoke SendDlgItemMessage, IDC_LB2, [...]
.endif
    .endif

    invoke CallWindowProc, lpListBox, hWnd, uMsg, wParam, lParam
    ret

ListBoxProc endp


As always, cheers in advance...
Ksb

evlncrn8

might be easier to just use the syslistview32 ? just with 2 columns, which would also only have 1 scrollbar and have less overhead for you
as you wouldn't need to superclass etc..

jj2007