|
-
June 11th, 1999, 07:53 AM
#2
Re: Date/Time Picker
As far as in know you can not initialize to an empty string.
Here is some code to turn on or off the checkbox at run time.
Warning!
Because of the way this work it will rearrage the tab order of you dialog.
I have not found a way around this. If anybody knows a way let me know.
void derived_datepicker_class::ShowNone(BOOL bShow)
{
CRect rc; // the current position of the control
long lStyle; // the control stryle
CWnd *pParent; // the parent of the control
UINT uID; // the resource id of the control
uID = GetDlgCtrlID();
pParent = GetParent();
GetWindowRect(rc);
lStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);
if(bShow)
lStyle |= DTS_SHOWNONE;
else
lStyle &= ~DTS_SHOWNONE;
DestroyWindow();
pParent->ScreenToClient(rc);
Create(lStyle,rc,pParent,uID);
}
This function is made to work in a derived class from the date time picker control. You will need to modify, if you need it else where
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|