Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to Hide Scroll Bar

Status
Not open for further replies.

wcall

Programmer
Oct 9, 2003
2
US
I am unable to hide the horizontal and vertical scroll bars for a window that is too large to fit the screen area. My goal is to hide the scroll bars, however, when I attempt to hide the scroll bars using the ShowScrollBar method, the scroll bars immediately appear again. The view has been created using the CFormView Class. If I shrink the window [dialog resource] using the resource editor so that the runtime window fits on the screen, the scroll bars do go away. However, I do not want to shrink the window. Is there a way to hide the scroll bars when the window is larger than the screen size? Or does the Windows OS always try to display the scroll bars? Who is control?

Wayne
 
in MFC you can use CWnd::ShowScrollBar

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
in WinAPI:
BOOL ShowScrollBar( HWND hWnd,
int wBar,
BOOL bShow
);

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
I have attempted to use the CWnd::ShowScrollBar feature. In fact, I put the CWnd::ShowScrollBar routine in a timer interrupt routine. The timer triggers each second. This causes the scroll bars to flicker. My code, using the CWnd::ShowScrollBar routine, hides the scroll bars once a second, and then some other code or maybe the Windows OS shows the scroll bars. The scroll bars flicker. I just don't understand what is causing the scroll bars to re-appear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top