61 lines
6.5 KiB
Plaintext
61 lines
6.5 KiB
Plaintext
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
|
{\f40\froman\fcharset238\fprq2 Times New Roman CE;}{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}
|
|
{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
|
{\f50\fswiss\fcharset238\fprq2 Arial CE;}{\f51\fswiss\fcharset204\fprq2 Arial Cyr;}{\f53\fswiss\fcharset161\fprq2 Arial Greek;}{\f54\fswiss\fcharset162\fprq2 Arial Tur;}{\f55\fswiss\fcharset177\fprq2 Arial (Hebrew);}
|
|
{\f56\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f57\fswiss\fcharset186\fprq2 Arial Baltic;}{\f58\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
|
|
\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
|
|
\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
|
|
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
|
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2495164\rsid5183391}
|
|
{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr11\min53}{\revtim\yr2005\mo1\dy17\hr11\min54}{\version2}{\edmins1}{\nofpages2}{\nofwords397}{\nofchars2265}{\*\company Dundas India}
|
|
{\nofcharsws2657}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
|
|
\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot2495164 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3
|
|
\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
|
|
{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
|
|
\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid2495164 COXDateTimeCtrl}{\b\fs48\insrsid2495164
|
|
\par }{\b\fs16\insrsid2495164 Copyright \'a9 }{\b\fs16\insrsid2495164 The Code Project}{\b\fs16\insrsid2495164 1997 1998, All Rights Reserved
|
|
\par }{\insrsid2495164
|
|
\par A COXDateTimeCtrl object encapsulates the functionality of a date and time picker control. The date and time picker control (DTP control) provides a simple interface to excha
|
|
nge date and time information with a user. This interface contains fields, each of which displays a part of the date and time information stored in the control. The user can change the information stored in the control by changing the content of the strin
|
|
g in a given field. The user can move from field to field using the mouse or the keyboard.
|
|
\par
|
|
\par }{\b\i\insrsid2495164 Using COXDateTimeCtrl}{\insrsid2495164
|
|
\par
|
|
\par The date and time picker control (COXDateTimeCtrl) implements an intuitive and recognizable method of entering or selecting a specific date. T
|
|
he main interface of the control is similar in functionality to a combo box. However, if the user expands the control, a month calendar control appears (by default), allowing the user to specify a particular date. When a date is chosen, the month calendar
|
|
control automatically disappears.
|
|
\par
|
|
\par }{\b\i\insrsid2495164 Note}{\insrsid2495164 To use both the CDateTimePicker and COXMonthCalCtrl classes in your project, you must include OXDateTimeCtrl.h
|
|
\par
|
|
\par }{\b\i\insrsid2495164 Creating the Date and Time Picker Control}{\insrsid2495164
|
|
\par
|
|
\par How the date and time picker control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window.
|
|
\par
|
|
\par }{\b\i\insrsid2495164 To use COXDateTimeCtrl directly in a dialog box }{\insrsid2495164
|
|
\par
|
|
\par Visual C++ v6.0:
|
|
\par In the dialog editor, add a Date and Time
|
|
Picker Control to your dialog template resource. Specify its control ID. Specify any styles required, using the Properties dialog box of the date and time picker control. Use ClassWizard to map handler functions in the dialog class for any date time pick
|
|
er control notification messages you need to handle. In OnInitDialog, set any additional styles for the COXDateTimeCtrl object.
|
|
\par
|
|
\par Visual C++ v5.0:
|
|
\par In the dialog editor, add a Static Control to your dialog template resource (it will be a placeholder for the DTP control). Specify its control ID. In OnInitDialog, you can use next code to replace Static Control on our DTP control:
|
|
\par
|
|
\par }{\i\f1\fs20\insrsid2495164 \tab CWnd *pFrame=
|
|
\par \tab \tab GetDlgItem(IDC_DATETIMEPICKER);
|
|
\par \tab CRect rcWnd;
|
|
\par \tab pFrame>GetWindowRect(rcWnd);
|
|
\par \tab pFrame>DestroyWindow();
|
|
\par \tab ScreenToClient(rcWnd);
|
|
\par \tab m_ctlDateTimePicker.
|
|
\par \tab \tab Create(WS_CHILD|WS_VISIBLE|WS_TABSTOP,
|
|
\par \tab \tab rcWnd,this, IDC_DATETIMEPICKER);\tab \tab
|
|
\par }{\b\i\insrsid2495164
|
|
\par To use COXDateTimeCtrl in a nondialog window :}{\insrsid2495164
|
|
\par
|
|
\par Declare the control in the view or window class. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function (if you're subclassing the control). Set the styles for the control
|
|
.
|
|
\par
|
|
\par
|
|
\par }{\fs20\lang4105\langfe1033\langnp4105\insrsid2495164
|
|
\par }} |