Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

How to hide horizontal scroll bar in list box when it isn't necessary?

I have a quickwin application, in which there is a list box. I've added to the list box a horizontal scroll bar in the following way. I've included in the DoCallBackInit subroutine sending the following message to the list box                    

        retint=SendDlgItemMessage(dlg%hwnd, IDC_LIST_Who, LB_SETHORIZONTALEXTENT, ilenSTR, 0)

ilenSTR is maximal text length in pixels.

When the dialog is updated using dialog controls, the text length is changed. It is possible that in some cases the horizontal scroll bar isn't necessary. But it doesn't disappear.
How to hide the horizontal scroll bar in these cases?

0 Kudos
2 Replies
Highlighted
Valued Contributor III
11 Views

I have not used that message, In the resource editor for the control there are a number for scroll properties you can. You can enable or disable horizontal and vertical scroll etc. The scroll bar only appears usually when it is needed (and enabled).

0 Kudos
Highlighted
Beginner
11 Views

Thank you, Andrew. Unfortunately, I don't have the resource editor in vs2012. Just now I tried free ResEdit, but I didn't find how I can do it. Is there other solution of this issue?

0 Kudos