Solved

Adding scroll bar to Mainframe

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

21 Experts available now in Live!

Get 1:1 Help Now