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
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..
Check this thread (http://www.masm32.com/board/index.php?topic=11769.0), Farabi had the same question.