Files
TestEGr/TestEgrView.cpp
T
2014-02-05 11:02:57 +00:00

38 lines
1.1 KiB
C++

// TestEgrView
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "TestEgrView.h"
#include "resource.h"
//----------------------------------------------------------------------------
TestEgrView::TestEgrView( void)
{
}
//----------------------------------------------------------------------------
bool
TestEgrView::Create( CWnd* pParent, int nID)
{
if ( pParent == nullptr ||
pParent->GetDlgItem( nID) == nullptr)
return false ;
CString className = AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW | CS_OWNDC,
AfxGetApp()->LoadCursor( IDC_POINTER), NULL, NULL) ;
CRect rectWin ;
pParent->GetDlgItem( nID)->GetWindowRect( rectWin) ;
pParent->ScreenToClient( rectWin) ;
if ( CreateEx( 0, className, L"TestEgrView",
WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rectWin, pParent, nID) != 0) {
SetWindowPos( &wndTop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE) ;
return true ;
}
else
return false ;
}