Discussion:
Creating a CMainFrame Scrollbar
(too old to reply)
h***@gmail.com
2014-08-08 06:31:32 UTC
Permalink
在 1997年4月30日星期三UTC+8下午3时00分00秒,Dan Rhein写道:
I am currently using MSVC 1.52c, My application is a MDI 16 bit
application.
I need to know how to create a Scrollbar for my CMainframe when my
CFormview objects are off the screen so that the user can scroll to the
area they need to view.
Any help would be appreciated!
Dan
i had met such a issue before , this is my solution :
in MFC CMainFrame class find out the class member function
CMainFrame::PreCreateWindow(CREATESTRUCT& cs)

add following code lines :

cs.style|=WS_VSCROLL; // add the vertical scroll
cs.style|=WS_HSCROLL; // add the horizontal scroll

when your child windows engage the mainframe edge , the relative scroll bar would go work
Cholo Lennon
2014-08-19 16:47:40 UTC
Permalink
Post by h***@gmail.com
在 1997年4月30日星期三UTC+8下午3时00分00秒,Dan Rhein写道:
I am currently using MSVC 1.52c, My application is a MDI 16 bit
application.
I need to know how to create a Scrollbar for my CMainframe when my
CFormview objects are off the screen so that the user can scroll to the
area they need to view.
Any help would be appreciated!
Dan
in MFC CMainFrame class find out the class member function
CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
cs.style|=WS_VSCROLL; // add the vertical scroll
cs.style|=WS_HSCROLL; // add the horizontal scroll
when your child windows engage the mainframe edge , the relative scroll bar would go work
OMG! A new record in this newsgroup... an answer after 17 years! (the OP
was using a 16 bit version of VC!)

Regards
--
Cholo Lennon
Bs.As.
ARG
Loading...