|
// *********************************************************
// 拡張コンストラクタ
// *********************************************************
LboxCalendar::LboxCalendar( HWND hOwner, HWND hBase )
{
BaseEdit = new LboxEdit( hBase );
BaseEdit->Hide( );
BaseEdit->Disable();
RECT rt;
POINT pt;
GetWindowRect( hBase, &rt );
pt.x = rt.left;
pt.y = rt.top;
ScreenToClient( hOwner, &pt );
int nW,nH;
nW = BaseEdit->Width();
nH = BaseEdit->Height();
this->hWnd =
CreateWindowEx(
0,
MONTHCAL_CLASS,
"",
WS_BORDER | WS_CHILD | WS_VISIBLE,
pt.x, pt.y, nW, nH,
hOwner,
NULL,
LboxGetInstance( hOwner ),
NULL
);
}
LboxCalendar::LboxCalendar( HWND hOwner )
{
this->hWnd =
CreateWindowEx(
0,
MONTHCAL_CLASS,
"",
WS_BORDER | WS_CHILD | WS_VISIBLE,
0,0,0,0,
hOwner,
NULL,
LboxGetInstance( hOwner ),
NULL
);
}
// *********************************************************
// デフォルトコンストラクタ
// *********************************************************
LboxCalendar::LboxCalendar()
{
this->hWnd = NULL;
}
// *********************************************************
// デストラクタ
// *********************************************************
LboxCalendar::~LboxCalendar()
{
if ( this->hWnd != NULL ) {
DestroyWindow( this->hWnd );
}
}
| |