Dear Timo,
after a long break due to healthy problems, I recently started VB6-programming again. Right now I work on several projects in which the ExplorerTreeView plays a major role. I would like to get rid of the horizontal scrollbar and tried it with following code (VB6/SP6, WinXP/SP1):
Private Sub Command1_Click()
Dim R As Rect
Dim Style As Long
'Toggle H-ScrollBar
Style = GetWindowLong(ETV.hWnd, GWL_STYLE)
If (Style And WS_HSCROLL) Then
Style = Style - WS_HSCROLL
Else
Style = Style Or WS_HSCROLL
End If
SetWindowLong ETV.hWnd, GWL_STYLE, Style
GetWindowRect ETV.hWnd, R
SetWindowPos ETV.hWnd, 0, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, SWP_FRAMECHANGED
ETV.SetFocus
End Sub
The Result is an empty ExplorerTreeView (Version 1.14.1/857), except the toolbox bitmap. Do you have any idea how to realize my wish?
Thanks in advance an best regards
aka
H-Scrollbar
Re: H-Scrollbar
Hi,
the toolbox bitmap is from the treeview's parent window (the UserControl window). I guess your call to SetWindowPos is wrong. Try this:
By the way, this code:
is bad style. You should use this instead:
HTH
TiKu
the toolbox bitmap is from the treeview's parent window (the UserControl window). I guess your call to SetWindowPos is wrong. Try this:
Code: Select all
SetWindowPos ETV.hWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED Or SWP_NOREPOSITION Or SWP_NOSIZE Or SWP_NOZORDER
Code: Select all
Style = Style - WS_HSCROLL
Code: Select all
Style = Style And Not WS_HSCROLL
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!