Hiding scrollbars in a formview 
Author Message
 Hiding scrollbars in a formview

** Is there a way to hide scrollbars in a CFormView?
** GetScrollBarCtrl for both SB_VERT and SB_HORZ
returns NULL, so I cant call GetScrollBarCtrl->ShowWindow(SW_HIDE).
** Also, CFormView.ShowScrollBar(SB_BOTH, FALSE) seems to Fail.

I am trying to call this is on CFormView::OnInitialUpdate.

I know it has something to do with Win Style of a CFormView
(WS_HSCROLL and WS_VSCROLL being true).  Is there a way
in Create or somewhere I can do something?

Thanks much.

San



Thu, 07 Dec 2000 03:00:00 GMT  
 Hiding scrollbars in a formview

Sanjay,

If you want to hide the scrollbars during the first showing of your
application then the best way is to
use the ResizeParentToFit() function in your OnInitialUpdate() handler:

void CMyFormView::OnInitialUpdate()
{
 CFormView::OnInitialUpdate();
 GetParentFrame()->RecalcLayout();
 ResizeParentToFit(FALSE);

Quote:
}

Of course the scrollbars will return if the user resizes your window, they
automatically appear in form views
if the view becomes smaller than the dialog template.

Hope this helps,

Jason.

Quote:

>** Is there a way to hide scrollbars in a CFormView?
>** GetScrollBarCtrl for both SB_VERT and SB_HORZ
>returns NULL, so I cant call GetScrollBarCtrl->ShowWindow(SW_HIDE).
>** Also, CFormView.ShowScrollBar(SB_BOTH, FALSE) seems to Fail.

>I am trying to call this is on CFormView::OnInitialUpdate.

>I know it has something to do with Win Style of a CFormView
>(WS_HSCROLL and WS_VSCROLL being true).  Is there a way
>in Create or somewhere I can do something?

>Thanks much.

>San



Fri, 08 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Hiding scrollbars in a formview

2. How can I hide scrollbars in FormView?

3. How can I hide scrollbars in FormView?

4. Removing scrollbars from a FormView...

5. Removing scrollbars from a FormView...

6. Remove scrollbars for FormView

7. formview sans scrollbars

8. Removing Scrollbars from a FormView?

9. FormView without Scrollbars

10. show or hide scrollbars?

11. hiding scrollbars of scrollview

12. how to hide scrollbars

 

 
Powered by phpBB® Forum Software