ReactOS 0.4.16-dev-555-g690643f
closewnd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  WINDOW_LIST
 

Typedefs

typedef struct WINDOW_LIST WINDOW_LIST
 
typedef struct WINDOW_LISTPWINDOW_LIST
 

Functions

void GetWindowList (PWINDOW_LIST pList)
 
void GetWindowListForClose (PWINDOW_LIST pList)
 
HWND FindNewWindow (PWINDOW_LIST List1, PWINDOW_LIST List2)
 
void CloseNewWindows (PWINDOW_LIST List1, PWINDOW_LIST List2)
 
void FreeWindowList (PWINDOW_LIST pList)
 

Typedef Documentation

◆ PWINDOW_LIST

◆ WINDOW_LIST

Function Documentation

◆ CloseNewWindows()

void CloseNewWindows ( PWINDOW_LIST  List1,
PWINDOW_LIST  List2 
)

Definition at line 101 of file closewnd.cpp.

102{
103 for (SIZE_T i = 0; i < List2->m_chWnds; ++i)
104 {
105 HWND hWnd = List2->m_phWnds[i];
106 if (!IsWindow(hWnd) || FindInWindowList(*List1, hWnd))
107 continue;
108
111
113 {
116 }
117 }
118}
HWND hWnd
Definition: settings.c:17
static void WaitForForegroundWindow(HWND hWnd, UINT wait=250)
Definition: closewnd.cpp:91
static HWND FindInWindowList(const WINDOW_LIST &list, HWND hWnd)
Definition: closewnd.cpp:57
#define TRUE
Definition: types.h:120
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
SIZE_T m_chWnds
Definition: closewnd.h:12
HWND * m_phWnds
Definition: closewnd.h:13
uint32_t DWORD_PTR
Definition: typedefs.h:65
ULONG_PTR SIZE_T
Definition: typedefs.h:80
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
Definition: window.c:82
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_SYSCOMMAND
Definition: winuser.h:1744
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
#define SC_CLOSE
Definition: winuser.h:2595

Referenced by CleanupWindowList(), and TEST_End().

◆ FindNewWindow()

HWND FindNewWindow ( PWINDOW_LIST  List1,
PWINDOW_LIST  List2 
)

Definition at line 67 of file closewnd.cpp.

68{
69 for (SIZE_T i2 = 0; i2 < List2->m_chWnds; ++i2)
70 {
71 HWND hWnd = List2->m_phWnds[i2];
73 continue;
74
75 BOOL bFoundInList1 = FALSE;
76 for (SIZE_T i1 = 0; i1 < List1->m_chWnds; ++i1)
77 {
78 if (hWnd == List1->m_phWnds[i1])
79 {
80 bFoundInList1 = TRUE;
81 break;
82 }
83 }
84
85 if (!bFoundInList1)
86 return hWnd;
87 }
88 return NULL;
89}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI IsWindowEnabled(_In_ HWND)
BOOL WINAPI IsWindowVisible(_In_ HWND)

◆ FreeWindowList()

void FreeWindowList ( PWINDOW_LIST  pList)

Definition at line 11 of file closewnd.cpp.

12{
13 free(pList->m_phWnds);
14 pList->m_phWnds = NULL;
15 pList->m_chWnds = 0;
16}
#define free
Definition: debug_ros.c:5
FxChildList * pList

Referenced by CleanupWindowList(), GetWindowListForClose(), and TEST_End().

◆ GetWindowList()

void GetWindowList ( PWINDOW_LIST  pList)

Definition at line 33 of file closewnd.cpp.

34{
35 pList->m_phWnds = NULL;
36 pList->m_chWnds = 0;
38}
static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
Definition: closewnd.cpp:18
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by GetWindowListForClose(), START_TEST(), TEST_End(), and TEST_Start().

◆ GetWindowListForClose()

void GetWindowListForClose ( PWINDOW_LIST  pList)

Definition at line 40 of file closewnd.cpp.

41{
42 for (UINT tries = 5; tries--;)
43 {
44 if (tries)
47 Sleep(500);
50 SIZE_T count = list.m_chWnds;
52 if (count == pList->m_chWnds)
53 break;
54 }
55}
Definition: list.h:37
void GetWindowList(PWINDOW_LIST pList)
Definition: closewnd.cpp:33
void FreeWindowList(PWINDOW_LIST pList)
Definition: closewnd.cpp:11
GLuint GLuint GLsizei count
Definition: gl.h:1545
unsigned int UINT
Definition: ndis.h:50
#define list
Definition: rosglue.h:35
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790

Referenced by CleanupWindowList(), and TEST_End().