Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to do this?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to do this?

 Post Reply Post Reply
Author
Message
wuyunpeng View Drop Down
Newbie
Newbie


Joined: 01 December 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote wuyunpeng Quote  Post ReplyReply Direct Link To This Post Topic: How to do this?
    Posted: 05 December 2005 at 9:49pm

I wrote a class CMyWnd which is derived from CWnd,and i created a docking pane to attach CMyWnd(shown as follows),but failed.

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
    if(wParam == XTP_DPN_SHOWWINDOW)
    {
        CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
        if(!pPane->IsValid())
        {
             if(!m_myWnd.GetSafeHwnd())
              {
                  m_myWnd.Create(NULL,NULL,
                        WS_CHILD | WS_VISIBLE,
                         CRect(0,0,0,0),this,0x106);
             }
             pPane->Attach(&m_myWnd);
        }
        return TRUE;
    }
    return FALSE;
}

Would you please tell me how to create a window manually and attach to a docking pane.

thanks.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2005 at 8:51am

I don't like that class name is NULL in your code.

Replace it to AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW))

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.