Click here to Skip to main content
15,893,337 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to recognize a MutliTouch Input Event ? Pin
Member 1406801918-Jan-19 3:11
Member 1406801918-Jan-19 3:11 
AnswerRe: How to recognize a MutliTouch Input Event ? Pin
Victor Nijegorodov18-Jan-19 5:14
Victor Nijegorodov18-Jan-19 5:14 
AnswerRe: How to recognize a MutliTouch Input Event ? Pin
k505418-Jan-19 5:18
mvek505418-Jan-19 5:18 
QuestionToolbar for bottom split window - CSplitterWnd Pin
Anu_Bala15-Jan-19 23:31
Anu_Bala15-Jan-19 23:31 
AnswerRe: Toolbar for bottom split window - CSplitterWnd Pin
Victor Nijegorodov15-Jan-19 23:44
Victor Nijegorodov15-Jan-19 23:44 
GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Anu_Bala16-Jan-19 0:09
Anu_Bala16-Jan-19 0:09 
GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Victor Nijegorodov16-Jan-19 1:02
Victor Nijegorodov16-Jan-19 1:02 
GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Anu_Bala16-Jan-19 1:39
Anu_Bala16-Jan-19 1:39 
I saw that one show CFrameWnd. My window is CMDIChildWnd. So i didnt try first. I tried now. i create CSPlitFrame as CFrameWnd and i coded like below. But when i want my particular window , it shows error on calling that view in Mainframe.cpp.

C++
BEGIN_MESSAGE_MAP(CSplitFrame, CFrameWnd)
	ON_WM_CREATE()
END_MESSAGE_MAP()

BOOL CSplitFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{

	CTrendListView *pview;

	// Create a context.
	CCreateContext context;
	pContext = &context;

	// Assign custom view.
	pContext->m_pNewViewClass = RUNTIME_CLASS(CTrendListView);

	// Create the view.
	pview = (CTrendListView *) CreateView(pContext, AFX_IDW_PANE_FIRST);
	if (pview == NULL)
		return FALSE;

	// Notify the view.
	//pview->SendMessage(WM_INITIALUPDATE);
	SetActiveView(pview, FALSE);

	return TRUE;
}

int CSplitFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  Add your specialized creation code here
	

	if (!m_wndWindowTool.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
		| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
		!m_wndWindowTool.LoadToolBar(IDR_MAINFRAME))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

	m_wndWindowTool.EnableDocking(CBRS_ALIGN_ANY);
   m_wndWindowTool.SetBorders(3, 3, 3, 3);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndWindowTool);	
	return 0;

}


CChildFrame.cpp OnCreateClient()
C++
if (!m_wndSplitter.CreateStatic(this, 2, 1))
		return FALSE;

	if(!m_wndSplitter.CreateView(0,0, RUNTIME_CLASS(CTrendView),CSize(cr.Width(), cr.Height()-200),pContext)||		
		!m_wndSplitter.CreateView(1,0, RUNTIME_CLASS(CSplitFrame),CSize(cr.Width(), cr.Height()-550),pContext))
	{
		m_wndSplitter.DestroyWindow();
		return FALSE;
	}


But it shows error in calling TrendView()

C++
if( pTrendDisplayFrame == NULL )
	{
		iWindowNumber = 4;
		CDocTemplate *pTemplate = theApp.pTrendViewTemplate;
		CCS3OprDoc* pDoc = new CCS3OprDoc;
		pTrendDisplayFrame = (CMDIChildWnd *)pTemplate->CreateNewFrame( pDoc ,NULL ); //It shows error in creating new MDIChhildWnd
		if( pTrendDisplayFrame == NULL )
		{
			MessageBox( "Unable to Create Trend Display" );
			return;
		}
		pTemplate->InitialUpdateFrame( pTrendDisplayFrame,NULL );
	}
	else
		MDIActivate( pTrendDisplayFrame );


When i create SplitFrame as MDICHildWnd, it shows assertion error. If my main view (TrendView is MDICHildWnd) and TrendListVIew also MDICHildWnd.
Anu

GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Victor Nijegorodov16-Jan-19 3:41
Victor Nijegorodov16-Jan-19 3:41 
GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Anu_Bala16-Jan-19 17:26
Anu_Bala16-Jan-19 17:26 
GeneralRe: Toolbar for bottom split window - CSplitterWnd Pin
Victor Nijegorodov17-Jan-19 8:47
Victor Nijegorodov17-Jan-19 8:47 
QuestionAre there programmers that are currently using machine code and Assembly? Pin
Quantum Robin13-Jan-19 7:53
Quantum Robin13-Jan-19 7:53 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
HS_C_Student13-Jan-19 10:56
HS_C_Student13-Jan-19 10:56 
GeneralRe: Are there programmers that are currently using machine code and Assembly? Pin
HS_C_Student13-Jan-19 11:11
HS_C_Student13-Jan-19 11:11 
GeneralRe: Are there programmers that are currently using machine code and Assembly? Pin
Quantum Robin13-Jan-19 16:39
Quantum Robin13-Jan-19 16:39 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
leon de boer13-Jan-19 16:34
leon de boer13-Jan-19 16:34 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
CPallini13-Jan-19 21:26
mveCPallini13-Jan-19 21:26 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
Joe Woodbury14-Jan-19 6:25
professionalJoe Woodbury14-Jan-19 6:25 
JokeRe: Are there programmers that are currently using machine code and Assembly? Pin
Quantum Robin14-Jan-19 13:52
Quantum Robin14-Jan-19 13:52 
Questionerror: expected identifier before string constant Pin
Vaclav_13-Jan-19 6:28
Vaclav_13-Jan-19 6:28 
AnswerRe: error: expected identifier before string constant Pin
Richard MacCutchan13-Jan-19 6:49
mveRichard MacCutchan13-Jan-19 6:49 
GeneralRe: error: expected identifier before string constant Pin
Vaclav_13-Jan-19 7:21
Vaclav_13-Jan-19 7:21 
GeneralRe: error: expected identifier before string constant Pin
Richard MacCutchan13-Jan-19 22:29
mveRichard MacCutchan13-Jan-19 22:29 
GeneralRe: error: expected identifier before string constant Pin
Stefan_Lang16-Jan-19 23:28
Stefan_Lang16-Jan-19 23:28 
GeneralRe: error: expected identifier before string constant Pin
Richard MacCutchan16-Jan-19 23:56
mveRichard MacCutchan16-Jan-19 23: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.