By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,503 Members | 1,608 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,503 IT Pros & Developers. It's quick & easy.

How to add scroll bar in the child windows in MDI with Visual c++ 6.0

P: n/a
I tried to add scroll bar to the child window in a MDI.

In the mother window I modify code as below:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
It works well.

However in the child windows.
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
///////////Mewly added/////////////////////////// =WS_CHILD|WS_OVERLAPPEDWINDOW|WS_VSCROLL|WS_HSCROL L;
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;

The scroll bar will appear when running the program, however it doesn't
function. I can't scroll the child window at all.

I also tried the method recommended by MSDN---- "derive a new class
from CMDIChildWnd and replace all references to CMDIChildWnd in your
project with references to the new class." The scroll bar wont even
come out. Where did I make mistake?

Anybody can help me with the simple question?

Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Ti*********** wrote:
I tried to add scroll bar to the child window in a MDI.
[Win32 API Question redacted]

What's a "scroll bar"? What's a "child window"? What's an "MDI"?
The ISO C++ Standard discusses none of these.

In other words, you're OT. May I suggest a newsgroup with "microsoft"
or "visual" in its name? A good starting point might be:
Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.