Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IsGUIThread function

Determines whether the calling thread is already a GUI thread. It can also optionally convert the thread to a GUI thread.

Syntax


BOOL WINAPI IsGUIThread(
  _In_ BOOL bConvert
);

Parameters

bConvert [in]

Type: BOOL

If TRUE and the thread is not a GUI thread, convert the thread to a GUI thread.

Return value

Type:

Type: BOOL

The function returns a nonzero value in the following situations:

  • If the calling thread is already a GUI thread.
  • If bConvert is TRUE and the function successfully converts the thread to a GUI thread.

Otherwise, the function returns zero.

If bConvert is TRUE and the function cannot successfully convert the thread to a GUI thread, IsGUIThread returns ERROR_NOT_ENOUGH_MEMORY.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Windows Overview

 

 

Show:
© 2017 Microsoft