|
// *********************************************************
// 拡張コンストラクタ
// *********************************************************
LboxDTPicker::LboxDTPicker( HWND hOwner, HWND hBase, BOOL bNoData )
{
BaseEdit = new LboxEdit( hBase );
this->bNoData = bNoData;
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();
if ( bNoData ) {
this->hWnd =
CreateWindowEx(
0,
DATETIMEPICK_CLASS,
"DateTime",
WS_BORDER |
WS_CHILD |
WS_VISIBLE | WS_TABSTOP |
DTS_SHOWNONE,
pt.x, pt.y, nW, nH,
hOwner,
NULL,
LboxGetInstance( hOwner ),
NULL
);
}
else {
this->hWnd =
CreateWindowEx(
0,
DATETIMEPICK_CLASS,
"DateTime",
WS_BORDER |
WS_CHILD |
WS_VISIBLE | WS_TABSTOP,
pt.x, pt.y, nW, nH,
hOwner,
NULL,
LboxGetInstance( hOwner ),
NULL
);
}
if ( this->hWnd != NULL ) {
SetWindowPos(
this->hWnd,
hBase,
0,0,0,0,
SWP_NOMOVE | SWP_NOSIZE
);
}
}
LboxDTPicker::LboxDTPicker()
{
}
LboxDTPicker::~LboxDTPicker()
{
delete BaseEdit;
}
| |