Solved

Adding scroll bar to Mainframe

Posted on 2004-09-30
8
492 Views
Last Modified: 2013-11-20
hi,

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

Thanks
Madhavi
0
Comment
Question by:likhita
  • 3
  • 2
8 Comments
 
LVL 6

Expert Comment

by:Amritpal Singh
ID: 12198416
can't u derive ur child view from CScrollview and use the scrollbar on the child view
0
 

Author Comment

by:likhita
ID: 12198707
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
 
LVL 6

Accepted Solution

by:
Amritpal Singh earned 30 total points
ID: 12206221
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
 

Author Comment

by:likhita
ID: 12210181
Hi amrit_82  

Many thanks for your help.

My problem got solved.

Bye
Madhavi
0
 
LVL 6

Expert Comment

by:Amritpal Singh
ID: 12572345
my proposed answer was accurate
shud be accepted
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 131
Expand to include initial dialog with two choices. 9 67
Process filename extension 3 172
ShiftLeft challenge 21 76
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now