Frage zu DateTimePicker
-
Hi,
gibt es eine Möglichkeit ein DateTimePicker-Eingabefeld so zu formatieren, dass man beispielsweise nur die Minuten oder Stunden, Tage usw. einzeln einstellen kann? Also nicht in der Form von EINEM DateTimePicker für das Datum 29.03.2003 sondern IDC_DATETIMEPICKER1 für Tage; IDC_DATETIMEPICKER2 für Monate usw...
Danke
Deniz
-
Wunderschönes Beispiel in der MSDN, wenn man sie lesen würde:
void CDatesDlg::OnButton2() { // Gain a pointer to the control CDateTimeCtrl* pCtrl = (CDateTimeCtrl*) GetDlgItem(IDC_DATETIMEPICKER1); ASSERT(pCtrl != NULL); // The control will create itself with a format that matches the // locale setting in Control Panel. But we can force a particular // format with a call to SetFormat(). This call forces the format // dd-MMM-yy, which would show 03-APR-98 for April 3rd, 1998. pCtrl->SetFormat(_T("dd-MMM-yy")); }
-
Danke RenéG!
Ich sollte echt mal anfangen die MSDN zu lesen! Aber für ein greenhorn wie ich noch etwas zu kompliziert.