Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
Adam Roderick J18-Jan-10 18:56
Adam Roderick J18-Jan-10 18:56 
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 
I'm not sure if this exactly fits your requirement, but it is possible to place two views derived from CScrollView into different panes of a splitter window and scroll them together.

You need to specify WS_VSCROLL when you create the splitter, otherwise you get a scrollbar for each pane instead of one that works them both.

I used WS_HSCROLL and WS_VSCROLL in a recent application to scroll around a matrix and get the row and column headings to scroll along with the body of the matrix. Like this (CMatrixSplitterFrame derived from CMDIChildWnd):
BOOL CMatrixSplitterFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
	//Create a splitter with 2 rows and 2 columns
	if (!m_SplitterWnd.CreateStatic(this, 2, 2, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL))	//Specify WS_HSCROLL and WS_VSCROLL to get one set of horizontal and vertical scrollbars for the splitter window instead of both in each pane.
	{
		TRACE0("Failed to CreateStaticSplitter\n");
		return FALSE;
	}

	//Add column headings pane
	if (!m_SplitterWnd.CreateView(0, 1,	RUNTIME_CLASS(CKernelMatrixColHeadView), CSize(2000, CELL_YSIZE + CELL_INTER_GAP + CELL_INTER_GAP), pContext))
	{
		TRACE0("Failed to create second pane\n");
		return FALSE;
	}
        //etc..

Best Regards

Cliff Hatch
GeneralRe: MFC How to update CMDIChildWnd from CDocument Pin
baumchen19-Jan-10 11:33
baumchen19-Jan-10 11:33 
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 

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.