Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Why I can not display the subclass wnd of CExtTabPageContainerOneNoteWnd as a child wnd of the View? Collapse All
Subject Author Date
Fietiger Kisinger Nov 3, 2008 - 10:40 PM

My code like this:


class CInTopView : public CExtWRB < CExtTabPageContainerOneNoteWnd >

{

.....


}


class CTopView : public CView

{


...


public:

 CInTopView m_wndView;

...}


int CTopView::OnCreate(LPCREATESTRUCT lpCreateStruct)

{

 if (CView::OnCreate(lpCreateStruct) == -1)

  return -1;

 

 // TODO: Add your specialized creation code here

 if( ! m_wndView.Create(

  this,

  CRect( 0, 0, 0, 0 ),

  UINT( IDC_STATIC ),

  WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN

  )

  )

 {

  TRACE0("Failed to create view window\n");

  return -1;

 } 

 m_wndView.SetFocus();


 


 return 0;

}

Technical Support Nov 4, 2008 - 9:04 AM

A One Note tab page container window should be created successfully inside your view window. But you have specified the CRect( 0, 0, 0, 0 ) rectangle in its creation parameters. This rectangle should be the view window client rectangle instead of empty rectangle with all zero properties. Besides, your view should handle the WM_SIZE message for resizing its child One Note tab page container window and WM_SETFOCUS message for forwarding focus into it.