Skip to content

Commit f135d2a

Browse files
Taojunshen3836425+corob-msft@users.noreply.github.comopbld16TylerMSFTTylerMSFT
authored
2/21/2021 AM Publish (#4119)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (MicrosoftDocs#4085) * [17.2p1] Add /scanDependencies option to docs (MicrosoftDocs#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (MicrosoftDocs#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (MicrosoftDocs#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (MicrosoftDocs#4086) * Content for 17.1 release * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review * Address cpp-docs 3694, 3696 * Update what-s-new-for-visual-cpp-in-visual-studio.md fix typo * add links (#4094) Co-authored-by: TylerMSFT <[email protected]> * Address cpp-docs 3694, 3696 (#4091) * Updates for cpp-docs 3700 3703 * Add op= to example * Add 3448,3482,3483,3540,3683 updates * Use existing media for CMake Targets View * US1907300 - add md code escapes to code elements - PR11 (MicrosoftDocs#4095) * US1907300 - add md code escapes to code elements - PR11 * updates after review * fix table syntax * trying to fix table rendering error * trying to fix table rendering error * trying to fix table rendering error * update after review * Additional clean-up for DD 1462641 * Set ms.topic: faq where YamlMime:FAQ (MicrosoftDocs#4099) * Release notes and conformance for 17.1 * typo fix * Use ConcRT instead of ConCRT ConcRT is a more correct abbreviation for Concurrency Runtime Library. ConcRT also appears in the comment in the beginning of concrt.h. * cpp-docs 3590 in progress * US1907300 - add md code escapes to code elements - PR12 (MicrosoftDocs#4103) * US1907300 - add md code escapes to code elements - PR12 * changes afteer review * changes afteer review * changes afteer review * changes afteer review * Bulk fix: \&MicrosoftDocs#124; entity removal 1/n * Bulk fix: pipe entity removal 2 of n * clarify operators * Bulk fix: Pipe entity 3 of n * Fix grammar * Bulk fix pipe entities 4 of n * Bulk fix * Undo change * Fix pipe entities 5 of n * Fix more pipe entity issues * US1907300 - add md code escapes to code elements - PR13 (MicrosoftDocs#4110) * US1907300 - add md code escapes to code elements - PR13 * changes afteer review * changes after review * Add missing Properties and F1 targets * Tweak dates, Acrolinx * Fix links * US1907300 - add md code escapes to code elements - PR14 * changes after review Co-authored-by: [email protected] <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> Co-authored-by: ishchukin <[email protected]> Co-authored-by: p4yl0ad <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Craig Casey <[email protected]> Co-authored-by: PRMerger9 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: Dennis Rea <[email protected]> Co-authored-by: jason <[email protected]> Co-authored-by: Linda Spiller <[email protected]> Co-authored-by: Alex Buck <[email protected]> Co-authored-by: myd7349 <[email protected]> Co-authored-by: Kristine Toliver <[email protected]> Co-authored-by: PRMerger15 <[email protected]> Co-authored-by: PRMerger16 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: PRMerger12 <[email protected]>
1 parent ac9bc2b commit f135d2a

12 files changed

+708
-721
lines changed

docs/atl-mfc-shared/date-and-time.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@ description: "Learn more about: Date and Time"
33
title: "Date and Time"
44
ms.date: "08/13/2019"
55
helpviewer_keywords: ["time, MFC programming", "time", "MFC, date and time", "dates, MFC"]
6-
ms.assetid: ecf56dc5-d418-4603-ad3e-af7e205a6403
76
---
87
# Date and Time
98

109
MFC supports several different ways of working with dates and times:
1110

12-
- Support for the Automation [DATE data type](../atl-mfc-shared/date-type.md). DATE supports date, time, and date/time values. The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) and [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) classes encapsulate this functionality. They work with the [COleVariant](../mfc/reference/colevariant-class.md) class using Automation support.
11+
- Support for the Automation [`DATE` data type](../atl-mfc-shared/date-type.md). `DATE` supports date, time, and date/time values. The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) and [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) classes encapsulate this functionality. They work with the [`COleVariant`](../mfc/reference/colevariant-class.md) class using Automation support.
1312

14-
- General-purpose time classes. The [CTime](../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../atl-mfc-shared/reference/ctimespan-class.md) classes encapsulate most of the functionality associated with the ANSI-standard time library, which is declared in TIME.H.
13+
- General-purpose time classes. The [`CTime`](../atl-mfc-shared/reference/ctime-class.md) and [`CTimeSpan`](../atl-mfc-shared/reference/ctimespan-class.md) classes encapsulate most of the functionality associated with the ANSI-standard time library, which is declared in `time.h`.
1514

1615
- Support for system clock. With MFC version 3.0, support was added to `CTime` for the Win32 `SYSTEMTIME` and `FILETIME` data types.
1716

1817
## Date and Time: Automation Support
1918

20-
The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) class provides a way to represent date and time information. It provides finer granularity and a greater range than the [CTime](../atl-mfc-shared/reference/ctime-class.md) class. The [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) class represents elapsed time, such as the difference between two `COleDateTime` objects.
19+
The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) class provides a way to represent date and time information. It provides finer granularity and a greater range than the [`CTime`](../atl-mfc-shared/reference/ctime-class.md) class. The [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) class represents elapsed time, such as the difference between two `COleDateTime` objects.
2120

22-
The `COleDateTime` and `COleDateTimeSpan` classes are designed for use with the `COleVariant` class. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying DATE type. For more information on the implementation of DATE, see [The DATE Type](../atl-mfc-shared/date-type.md).
21+
The `COleDateTime` and `COleDateTimeSpan` classes are designed for use with the `COleVariant` class. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying DATE type. For more information on the implementation of `DATE`, see [The `DATE` Type](../atl-mfc-shared/date-type.md).
2322

24-
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the DATE data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#operator_date). The actual implementation of DATE extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to make it easier to work with the class.
23+
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the `DATE` data type, defined in the MFC documentation under [`COleDateTime::operator DATE`](../atl-mfc-shared/reference/coledatetime-class.md#operator_date). The actual implementation of `DATE` extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to make it easier to work with the class.
2524

2625
`COleDateTime` doesn't support Julian dates. The Gregorian calendar is assumed to extend back in time to January 1, 100.
2726

2827
`COleDateTime` ignores Daylight Saving Time (DST). The following code example compares two methods of calculating a time span that crosses the DST switchover date: one using the CRT, and the other using `COleDateTime`.
2928

30-
The first method sets two `CTime` objects, *time1* and *time2*, to April 5 and April 6 respectively, using the standard C type structures `tm` and `time_t`. The code displays *time1* and *time2* and the time span between them.
29+
The first method sets two `CTime` objects, *`time1`* and *`time2`*, to April 5 and April 6 respectively, using the standard C type structures `tm` and `time_t`. The code displays *`time1`* and *`time2`* and the time span between them.
3130

32-
The second method creates two `COleDateTime` objects, `oletime1` and `oletime2`, and sets them to the same dates as *time1* and *time2*. It displays `oletime1` and `oletime2` and the time span between them.
31+
The second method creates two `COleDateTime` objects, `oletime1` and `oletime2`, and sets them to the same dates as *`time1`* and *`time2`*. It displays `oletime1` and `oletime2` and the time span between them.
3332

3433
The CRT correctly calculates a difference of 23 hours. `COleDateTimeSpan` calculates a difference of 24 hours.
3534

@@ -69,21 +68,21 @@ This procedure shows how to calculate the difference between two `COleDateTime`
6968

7069
#### To format a time
7170

72-
Use the `Format` member function of either [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) or [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) to create a character string representing the time or elapsed time.
71+
Use the `Format` member function of either [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) or [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) to create a character string representing the time or elapsed time.
7372

7473
[!code-cpp[NVC_ATLMFC_Utilities#179](../atl-mfc-shared/codesnippet/cpp/formatting-time-automation-classes_1.cpp)]
7574

76-
For more information, see class [COleVariant](../mfc/reference/colevariant-class.md).
75+
For more information, see class [`COleVariant`](../mfc/reference/colevariant-class.md).
7776

7877
## Date and Time: Database Support
7978

80-
Starting in version 4.0, MFC database programming uses the [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) and [COleDateTimeSpan](../atl-mfc-shared/reference/coledatetimespan-class.md) classes to represent date and time data. These classes, also used in Automation, are derived from class [COleVariant](../mfc/reference/colevariant-class.md). They supply better support for managing date and time data than do [CTime](../atl-mfc-shared/reference/ctime-class.md) and [CTimeSpan](../atl-mfc-shared/reference/ctimespan-class.md).
79+
Starting in version 4.0, MFC database programming uses the [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) and [`COleDateTimeSpan`](../atl-mfc-shared/reference/coledatetimespan-class.md) classes to represent date and time data. These classes, also used in Automation, are derived from class [`COleVariant`](../mfc/reference/colevariant-class.md). They supply better support for managing date and time data than do [`CTime`](../atl-mfc-shared/reference/ctime-class.md) and [`CTimeSpan`](../atl-mfc-shared/reference/ctimespan-class.md).
8180

82-
## Date and Time: SYSTEMTIME Support
81+
## Date and Time: `SYSTEMTIME` Support
8382

84-
The [COleDateTime](../atl-mfc-shared/reference/coledatetime-class.md) class has constructors that accept system and file times from Win32.
83+
The [`COleDateTime`](../atl-mfc-shared/reference/coledatetime-class.md) class has constructors that accept system and file times from Win32.
8584

86-
The Win32 `FILETIME` structure represents time as a 64-bit value. It's a more convenient format for internal storage than a `SYSTEMTIME` structure, and the format used by Win32 to represent the time of file creation. For information about the SYSTEMTIME structure, see [SYSTEMTIME](/windows/desktop/api/minwinbase/ns-minwinbase-systemtime). For information about the FILETIME structure, see [FILETIME](/windows/desktop/api/minwinbase/ns-minwinbase-filetime).
85+
The Win32 `FILETIME` structure represents time as a 64-bit value. It's a more convenient format for internal storage than a `SYSTEMTIME` structure, and the format used by Win32 to represent the time of file creation. For information about the `SYSTEMTIME` structure, see [`SYSTEMTIME`](/windows/desktop/api/minwinbase/ns-minwinbase-systemtime). For information about the `FILETIME` structure, see [`FILETIME`](/windows/desktop/api/minwinbase/ns-minwinbase-filetime).
8786

8887
## See also
8988

docs/c-runtime-library/console-and-port-i-o.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@ description: "Learn more about: Console and Port I/O"
33
title: "Console and Port I/O"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["routines, console and port I/O", "routines", "ports, I/O routines", "I/O [CRT], console", "I/O [CRT], port", "I/O routines, console and port I/O"]
6-
ms.assetid: 0eee1c92-9b3d-41e0-a43a-257e546eeec8
76
---
87
# Console and Port I/O
98

10-
These routines read and write on your console or on the specified port. The console I/O routines are not compatible with stream I/O or low-level I/O library routines. The console or port does not have to be opened or closed before I/O is performed, so there are no open or close routines in this category. In the Windows operating systems, the output from these functions is always directed to the console and cannot be redirected.
9+
These routines read and write on your console or on the specified port. The console I/O routines aren't compatible with stream I/O or low-level I/O library routines. The console or port doesn't have to be opened or closed before I/O is performed, so there are no open or close routines in this category. In the Windows operating systems, the output from these functions is always directed to the console and can’t be redirected.
1110

1211
## Console and Port I/O Routines
1312

1413
|Routine|Use|
1514
|-------------|---------|
16-
|[_cgets, _cgetws](../c-runtime-library/cgets-cgetws.md), [_cgets_s, _cgetws_s](../c-runtime-library/reference/cgets-s-cgetws-s.md)|Read string from console|
17-
|[_cprintf, _cwprintf](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md), [_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l](../c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)|Write formatted data to console|
18-
|[_cputs](../c-runtime-library/reference/cputs-cputws.md)|Write string to console|
19-
|[_cscanf, _cwscanf](../c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md), [_cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l](../c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)|Read formatted data from console|
20-
|[_getch, _getwch](../c-runtime-library/reference/getch-getwch.md)|Read character from console|
21-
|[_getche, _getwche](../c-runtime-library/reference/getch-getwch.md)|Read character from console and echo it|
22-
|[_inp](../c-runtime-library/inp-inpw-inpd.md)|Read one byte from specified I/O port|
23-
|[_inpd](../c-runtime-library/inp-inpw-inpd.md)|Read double word from specified I/O port|
24-
|[_inpw](../c-runtime-library/inp-inpw-inpd.md)|Read 2-byte word from specified I/O port|
25-
|[_kbhit](../c-runtime-library/reference/kbhit.md)|Check for keystroke at console; use before attempting to read from console|
26-
|[_outp](../c-runtime-library/outp-outpw-outpd.md)|Write one byte to specified I/O port|
27-
|[_outpd](../c-runtime-library/outp-outpw-outpd.md)|Write double word to specified I/O port|
28-
|[_outpw](../c-runtime-library/outp-outpw-outpd.md)|Write word to specified I/O port|
29-
|[_putch, _putwch](../c-runtime-library/reference/putch-putwch.md)|Write character to console|
30-
|[_ungetch, _ungetwch](../c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)|"Unget" last character read from console so it becomes next character read|
15+
|[`_cgets`, `_cgetws`](../c-runtime-library/cgets-cgetws.md), [`_cgets_s`, `_cgetws_s`](../c-runtime-library/reference/cgets-s-cgetws-s.md)|Read string from console|
16+
|[`_cprintf`, `_cwprintf`](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md), [`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](../c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)|Write formatted data to console|
17+
|[`_cputs`](../c-runtime-library/reference/cputs-cputws.md)|Write string to console|
18+
|[`_cscanf`, `_cwscanf`](../c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md), [`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](../c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)|Read formatted data from console|
19+
|[`_getch`, `_getwch`](../c-runtime-library/reference/getch-getwch.md)|Read character from console|
20+
|[`_getche`, `_getwche`](../c-runtime-library/reference/getch-getwch.md)|Read character from console and echo it|
21+
|[`_inp`](../c-runtime-library/inp-inpw-inpd.md)|Read one byte from specified I/O port|
22+
|[`_inpd`](../c-runtime-library/inp-inpw-inpd.md)|Read double word from specified I/O port|
23+
|[`_inpw`](../c-runtime-library/inp-inpw-inpd.md)|Read 2-byte word from specified I/O port|
24+
|[`_kbhit`](../c-runtime-library/reference/kbhit.md)|Check for keystroke at console; use before attempting to read from console|
25+
|[`_outp`](../c-runtime-library/outp-outpw-outpd.md)|Write one byte to specified I/O port|
26+
|[`_outpd`](../c-runtime-library/outp-outpw-outpd.md)|Write double word to specified I/O port|
27+
|[`_outpw`](../c-runtime-library/outp-outpw-outpd.md)|Write word to specified I/O port|
28+
|[`_putch`, `_putwch`](../c-runtime-library/reference/putch-putwch.md)|Write character to console|
29+
|[`_ungetch`, `_ungetwch`](../c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)|"Unget" last character read from console so it becomes next character read|
3130

3231
## See also
3332

34-
[Input and Output](../c-runtime-library/input-and-output.md)<br/>
35-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
33+
[Input and Output](../c-runtime-library/input-and-output.md)\
34+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)

docs/c-runtime-library/input-and-output.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: "Input and Output"
44
ms.date: "11/04/2016"
55
f1_keywords: ["c.io"]
66
helpviewer_keywords: ["input routines", "I/O [CRT]", "I/O routines", "I/O [CRT], routines", "output routines"]
7-
ms.assetid: 1c177301-e341-4ca0-aedc-0a87fe1c75ae
87
---
98
# Input and Output
109

@@ -21,4 +20,4 @@ The I/O functions read and write data to and from files and devices. File I/O op
2120
2221
## See also
2322

24-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
23+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)

0 commit comments

Comments
 (0)