Solved

Adding scroll bar to Mainframe

Posted on 2004-09-30
8
504 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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