Click here to Skip to main content
15,890,399 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen19-Jan-10 8:13
baumchen19-Jan-10 8:13 
AnswerRe: MFC How to update CMDIChildWnd from CDocument Pin
Nelek18-Jan-10 21:21
protectorNelek18-Jan-10 21:21 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen19-Jan-10 8:10
baumchen19-Jan-10 8:10 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
Nelek19-Jan-10 20:52
protectorNelek19-Jan-10 20:52 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen20-Jan-10 11:09
baumchen20-Jan-10 11:09 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
Nelek20-Jan-10 12:47
protectorNelek20-Jan-10 12:47 
AnswerRe: MFC How to update CMDIChildWnd from CDocument Pin
Cliff Hatch19-Jan-10 9:29
Cliff Hatch19-Jan-10 9:29 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen19-Jan-10 11:33
baumchen19-Jan-10 11:33 
Cliff,

thanks for the clue, it is very useful.

BOOL	CChildFrame::OnCreateClient(LPCREATESTRUCT, CCreateContext* pContext)
{
	// create a splitter with 1 row, 2 columns
	if (!m_SplitterController.CreateStatic(this, 1, 2, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL))
	{
		return FALSE;
	}

	CRect		lRect;

	GetClientRect(lRect);

	// add the first splitter pane - the default view in column 0
	if (!m_SplitterController.CreateView(0, 0, pContext->m_pNewViewClass, 
		CSize(lRect.Width() >> 1, lRect.Height()), pContext))
	{
		return FALSE;
	}

	// add the second splitter pane - an input view in column 1
	if (!m_SplitterController.CreateView(0, 1, pContext->m_pNewViewClass, 
		CSize((lRect.Width() + 1) >> 1, lRect.Height()), pContext))
	{
		return FALSE;
	}

	// activate the input view
	SetActiveView((CView*)m_SplitterController.GetPane(0, 1));

	m_IsInitialized = TRUE;

	return TRUE;


however, it only partly works at here --- there is only one vertical scroll bar, but there are two horizontal scroll bars, did I miss anything?

and, how do you answer scroll message?

I added it to CChildFrame, which is a subclass of CMDIChildWnd, but it was never called.

    afx_msg void	OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
    afx_msg void	OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);

...

BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
	ON_WM_HSCROLL()
	ON_WM_VSCROLL()
	ON_WM_MOUSEWHEEL()
	ON_WM_SIZE()
END_MESSAGE_MAP()

...

void	CChildFrame::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
	CMDIChildWnd::OnHScroll(nSBCode, nPos, pScrollBar);
}


any idea?

many thanks!
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
Cliff Hatch20-Jan-10 9:39
Cliff Hatch20-Jan-10 9:39 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen20-Jan-10 11:16
baumchen20-Jan-10 11:16 
QuestionChecking for attached device ( A: drive? ) Pin
Peter Weyzen18-Jan-10 13:57
Peter Weyzen18-Jan-10 13:57 
AnswerRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster18-Jan-10 15:28
professionalGarth J Lancaster18-Jan-10 15:28 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Peter Weyzen18-Jan-10 17:30
Peter Weyzen18-Jan-10 17:30 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster18-Jan-10 17:33
professionalGarth J Lancaster18-Jan-10 17:33 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Rozis19-Jan-10 2:53
Rozis19-Jan-10 2:53 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster19-Jan-10 9:45
professionalGarth J Lancaster19-Jan-10 9:45 
QuestionRe: Checking for attached device ( A: drive? ) Pin
David Crow19-Jan-10 3:15
David Crow19-Jan-10 3:15 
AnswerRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster19-Jan-10 10:13
professionalGarth J Lancaster19-Jan-10 10:13 
QuestionMFC CScrollView update problem when scrolling Pin
baumchen18-Jan-10 13:03
baumchen18-Jan-10 13:03 
AnswerRe: MFC CScrollView update problem when scrolling Pin
Nelek18-Jan-10 20:53
protectorNelek18-Jan-10 20:53 
GeneralRe: MFC CScrollView update problem when scrolling Pin
baumchen19-Jan-10 8:01
baumchen19-Jan-10 8:01 
GeneralRe: MFC CScrollView update problem when scrolling Pin
Nelek19-Jan-10 21:00
protectorNelek19-Jan-10 21:00 
GeneralRe: MFC CScrollView update problem when scrolling Pin
baumchen20-Jan-10 11:12
baumchen20-Jan-10 11:12 
QuestionGetting Function Signatures from a DLL Pin
thatonegirl18-Jan-10 10:31
thatonegirl18-Jan-10 10:31 
AnswerRe: Getting Function Signatures from a DLL Pin
Stuart Dootson18-Jan-10 11:56
professionalStuart Dootson18-Jan-10 11:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.