Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

Christopher

@Christopher
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CFormView Throwing Exception
    C Christopher

    I am writing a program that has two windows in it (splitter). I want both sides to run a dialog. I have created the one for the right side, but when I try and run it I get a debug assertion error. Here is the code I am using: In CMainFrame: BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { if (!m_wndSplitter.CreateStatic(this, 1, 2, WS_CHILD) ) { AfxMessageBox("Error Creating Splitter Window. [CSplitter::CreatStatic]", MB_OK); AfxAbort(); //Failed To Create Splitter Window } SIZE wndSize; wndSize.cx=300; wndSize.cy=600; if ( (!m_wndSplitter.CreateView(0,0, RUNTIME_CLASS(CTestView), wndSize, pContext)) || (!m_wndSplitter.CreateView(0,1, RUNTIME_CLASS(CTagDlg), wndSize, pContext)) ) { AfxMessageBox("Error Creating Splitter Views. [CSplitter::CreateView]", MB_OK); AfxAbort(); //Check both views } return TRUE; } The error seems to come from viewform.cpp, in CFormView::Create it call this function: if (!_AfxCheckDialogTemplate(m_lpszTemplateName, TRUE)) { ASSERT(FALSE); // invalid dialog template name PostNcDestroy(); // cleanup if Create fails too soon return FALSE; } And that is what is throwing the exception. Anyone know how I can fix this?

    C / C++ / MFC

  • Where to put header files
    C Christopher

    I have just started to make my first MFC programs, and I am having a big problem. Whenever I alter the code and need to insert a heared file I recieve all kinds of errors. For example I am writing a program that contains a splitter window, with forms on both sides. In it I call splinterwnd.CreatView with a reference to the form class. But when I put the form header at the top I get errors (mainly c:\program files\microsoft visual studio\myprojects\temp\tempview.h(27) : error C2143: syntax error : missing ';' before '*') How do I know where to put the header file?

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups