Skip to content

Commit 4366b13

Browse files
authored
Merge pull request MicrosoftDocs#85 from Microsoft/brpeek-crectfix
SetEmptyRect missing example
2 parents c243063 + da7b42b commit 4366b13

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

docs/atl-mfc-shared/reference/crect-class.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,13 @@ void SetRectEmpty() throw();
14061406
```
14071407

14081408
### Example
1409-
<!-- [!CODE [NVC_ATLMFC_Utilities#53](../CodeSnippet/VS_Snippets_Cpp/NVC_ATLMFC_Utilities#53)] -->
1409+
```cpp
1410+
CRect rect;
1411+
rect.SetRectEmpty();
1412+
1413+
// rect is now (0, 0, 0, 0)
1414+
ASSERT(rect.IsRectEmpty());
1415+
```
14101416

14111417
## <a name="crect__size"></a> CRect::Size
14121418
The `cx` and `cy` members of the return value contain the height and width of `CRect`.

0 commit comments

Comments
 (0)