Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4054906
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:38:05+00:00 2026-05-20T14:38:05+00:00

I am trying to implement a classic Windows Explorer kind of Application, CpliterWnd has

  • 0

I am trying to implement a classic Windows Explorer kind of Application,
CpliterWnd has two panes : Left pane is CLeftTreeView : public CTreeView
Right pane is CRightPaneFrame: public CFrameWnd , CRightPaneFrame has a member variable m_pCustomView.

CustomView is a class i added to a dialog resource ( edited using Resource editor and Add class wizard)

class CustomView : public CFormView
{

DECLARE_DYNCREATE(CustomView)

public:  // Changed to public so that i can instantiate this view on heap
CustomView();           // protected constructor used by dynamic creation
virtual ~CustomView();
BOOL Create(LPCTSTR A, LPCTSTR B, DWORD C,
    const RECT& D, CWnd* E, UINT F, CCreateContext* G); // To override the protected specifier of CFormView::Create()

MainFrame.cpp has the following entry

if (!m_SplitterWnd.CreateView(0, 0, RUNTIME_CLASS(CLeftTreeView), CSize(125, 100),   pContext) ||  !m_SplitterWnd.CreateView(0, 1, RUNTIME_CLASS(CRightPaneFrame), CSize(100, 100), pContext))    
{
     m_SplitterWnd.DestroyWindow();
     return FALSE;
}

And later on in CRightPaneFrame

BOOL CRightPaneFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
    // TODO: Add your specialized code here and/or call the base class
    m_pCustomView = new CustomView;
    m_pCustomView->Create(NULL,NULL,0L,CFrameWnd::rectDefault,this,VIEW_CUSTOM, pContext);
    SetActiveView(m_pCustomView);
    m_pCustomView->ShowWindow(SW_NORMAL);
    RecalcLayout();
    return true;
}

I don’t know what I am doing wrong but the CustomView is not getting loaded in the right pane.

Any suggestions on changing the approach or What is wrong with the current approach ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:38:06+00:00Added an answer on May 20, 2026 at 2:38 pm

    You have to put the custom view directly into the splitter windows right side, and not inside a CFrameWnd.

    if (!m_SplitterWnd.CreateView(0, 0, RUNTIME_CLASS(CLeftTreeView), CSize(125, 100), pContext) 
    || !m_SplitterWnd.CreateView(0, 1, RUNTIME_CLASS(CCustomView), CSize(100, 100), pContext))
    
    {
        m_SplitterWnd.DestroyWindow();
        return FALSE;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an asp.net (classic) application trying to implement the MVP pattern using this
I'm trying to implement a REST interface under IIS5.1/ASP-classic (XP-Pro development box). So far,
I'm trying to find a good way to implement MVP in classic Winforms, and
im trying to implement the classic username availability checker with jquery and ajax. here's
I'm trying to implement a class in a Silverlight 4 RIA Services application that
I'm trying implement a custom login page to use in my JSF 2.0 application.
Trying to implement the following behavior on an iPad. I have a map-centric application
Trying to implement a rating system of users and postings. What is the best
Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
While trying to implement an MVC file upload example on Scott Hanselman's blog. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.