Skip to content

Latest commit

 

History

History
112 lines (85 loc) · 4.52 KB

nf-gdiplusstringformat-stringformat-getlaststatus.md

File metadata and controls

112 lines (85 loc) · 4.52 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist req.product ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:gdiplusstringformat.StringFormat.GetLastStatus
StringFormat::GetLastStatus (gdiplusstringformat.h)
The StringFormat::GetLastStatus method returns a value that indicates the nature of this StringFormat object's most recent method failure.
GetLastStatus
GetLastStatus method [GDI+]
GetLastStatus method [GDI+]
StringFormat class
StringFormat class [GDI+]
GetLastStatus method
StringFormat.GetLastStatus
StringFormat::GetLastStatus
_gdiplus_CLASS_StringFormat_GetLastStatus_
gdiplus._gdiplus_CLASS_StringFormat_GetLastStatus_
gdiplus\_gdiplus_CLASS_StringFormat_GetLastStatus_.htm
gdiplus
VS|gdicpp|~\gdiplus\gdiplusreference\classes\stringformatclass\stringformatmethods\getlaststatus_15.htm
12/05/2018
GetLastStatus, GetLastStatus method [GDI+], GetLastStatus method [GDI+],StringFormat class, StringFormat class [GDI+],GetLastStatus method, StringFormat.GetLastStatus, StringFormat::GetLastStatus, _gdiplus_CLASS_StringFormat_GetLastStatus_, gdiplus._gdiplus_CLASS_StringFormat_GetLastStatus_
gdiplusstringformat.h
Gdiplus.h
Windows
Windows XP, Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Gdiplus.lib
Gdiplus.dll
Windows
GDI+ 1.0
19H1
StringFormat::GetLastStatus
gdiplusstringformat/StringFormat::GetLastStatus
c++
APIRef
kbSyntax
COM
Gdiplus.dll
StringFormat.GetLastStatus

StringFormat::GetLastStatus

-description

The StringFormat::GetLastStatus method returns a value that indicates the nature of this StringFormat object's most recent method failure.

-returns

Type: Status

The StringFormat::GetLastStatus method returns an element of the Status enumeration.

If no methods invoked on this StringFormat object have failed since the previous call to StringFormat::GetLastStatus, then StringFormat::GetLastStatus returns Ok.

If at least one method invoked on this StringFormat object has failed since the previous call to StringFormat::GetLastStatus, then StringFormat::GetLastStatus returns a value that indicates the nature of the most recent failure.

-remarks

You can call StringFormat::GetLastStatus immediately after constructing a StringFormat object to determine whether the constructor succeeded.

The first time you call the StringFormat::GetLastStatus method of a StringFormat object, it returns Ok if the constructor succeeded and all methods invoked so far on the StringFormat object succeeded. Otherwise, it returns a value that indicates the nature of the most recent failure.

Examples

The following example creates a StringFormat object, calls two StringFormat methods, and then checks the status to see if an error occurred during the construction or either of the method calls.

StringFormat stringFormat;
stringFormat.SetAlignment(StringAlignmentCenter);
HotkeyPrefix hotkeyPrefix = stringFormat.GetHotkeyPrefix();

if (stringFormat.GetLastStatus() == Ok)
{
   // There have been no errors since the previous call to GetLastStatus.
}
else
{
   // An error occurred since the previous call to GetLastStatus.
}

-see-also

StringFormat

StringFormatFlags