Skip to main content
gamedev.net
🔒 Locked

Static splitter

Started by Ottodisk ITA 0 replies 450+ views
Original Post
Ottodisk ITA
Ottodisk ITA
I''ve got some problem with static splitters. After reading Jon Huston''s tutorial (Creating 3d tool with MFC), i tried to implement the splitter but i can''t make it work Let me explain what i did. I made a SDI application named "Test", I added the CSplitterWnd variable in the CMainFrame class and modified the OnCreateClient like this: BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { // TODO: Add your specialized code here and/or call the base class if( !m_Splitter.CreateStatic(this, 1, 2) ) return FALSE; CRect cr; GetClientRect(&cr); if( !m_Splitter.CreateView(1, 1, RUNTIME_CLASS(CTestView), CSize(150, cr.Height()), pContext) ) return FALSE; //return CFrameWnd::OnCreateClient(lpcs, pContext); return TRUE; } now when i try to compile i get this errors: D:\Projects\Test\MainFrm.cpp(119) : error C2653: ''CTestView'' : is not a class or namespace name D:\Projects\Test\MainFrm.cpp(119) : error C2065: ''classCTestView'' : undeclared identifier Please help me, i''m really new to mfc and i know i''m probably doing some stupid error Thanks. ps: I use VC++ 6, and apologize my bad english but i''m italian
Stoffel
Stoffel
Your errors indicate that you haven''t #included "TestView.h" (or wherever you define CTestView) in MainFrm.cpp.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.