[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 575
  • Last Modified:

Adding scroll bar to Mainframe

hi,

Can anyone let me know how to add a scroll bar to Mainframe in MDI application?

Thanks
Madhavi
0
likhita
Asked:
likhita
  • 3
  • 2
1 Solution
 
Amritpal SinghCommented:
can't u derive ur child view from CScrollview and use the scrollbar on the child view
0
 
likhitaAuthor Commented:
Hi amrit_82,

My Child views are derived from Cformview. I am able to get scroll bars for child windows. My requirement is that I need scroll bar for mianframe, so that when I resize my Mainframe, I can use its scrooll bar to scroll up and down and see the child windows..Can you please give some inputs?

Thanks
Madhavi
0
 
Amritpal SinghCommented:
hi madhavi i,ve finally found the answer

just override the oncreateclient in the mainframe class

i.e

CMainFrame::OnCreateClient(createstruct lpcs, *pContext)
{
    lpcs->style |= WS_VSCROLL;
    return CMainframe::ONCreateClient(lpcs,pcontext);
}

howevr these lines are not copied so u better write urself and don't copy from here the function definition part

and can u plz increase the points to the qs :)
thanx
0
 
likhitaAuthor Commented:
Hi amrit_82  

Many thanks for your help.

My problem got solved.

Bye
Madhavi
0
 
Amritpal SinghCommented:
my proposed answer was accurate
shud be accepted
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now