Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

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

Sergiy_Y_
Beginner
214 Views

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
andrew_4619
Honored Contributor II
214 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
Sergiy_Y_
Beginner
214 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
Reply