14#define GHOST_TIMER_ID 0xFACEDEAD
15#define GHOST_INTERVAL 1000
91 if (bm.bmBitsPixel != 32 || !bm.bmBits)
93 ERR(
"bm.bmBitsPixel == %d, bm.bmBits == %p\n",
94 bm.bmBitsPixel, bm.bmBits);
99 for (
i = 0;
i < bm.bmWidth * bm.bmHeight; ++
i)
101 *pdw = *pdw | 0x00C0C0C0;
120 return pData->hwndTarget;
127 INT cchNonExtra, cchTextW = *pcchTextW;
134 ERR(
"HeapAlloc failed\n");
139 pszTextW = pszTextNewW;
141 cchNonExtra = cchTextW - cchExtra;
143 cchNonExtra) < cchNonExtra - 1)
150 cchTextW *
sizeof(
WCHAR));
153 *pcchTextW = cchTextW;
161 HWND hwndTarget, hwndPrev;
165 WCHAR szTextW[320], szNotRespondingW[32];
167 INT cchTextW, cchExtraW, cchNonExtraW;
177 ERR(
"Wrong window class for Ghost! fnId 0x%x\n", pWnd->
fnid);
202 ERR(
"HeapAlloc failed\n");
213 ERR(
"hbm32bpp was NULL\n");
221 pData->hwndTarget = hwndTarget;
222 pData->hbm32bpp = hbm32bpp;
233 cchNonExtraW = cchTextW - cchExtraW;
235 cchNonExtraW) < cchNonExtraW - 1)
245 ERR(
"Ghost_GetText failed\n");
261 szNotRespondingW,
ARRAYSIZE(szNotRespondingW));
266 if (szTextW != pszTextW)
304 pData->bDestroyTarget |= bDestroyTarget;
322 BitBlt(
hdc, 0, 0, bm.bmWidth, bm.bmHeight,
421 if (
pData->bDestroyTarget)
438 WCHAR szAskTerminate[128];
439 WCHAR szHungUpTitle[128];
445 szAskTerminate,
ARRAYSIZE(szAskTerminate));
447 szHungUpTitle,
ARRAYSIZE(szHungUpTitle));
474 hwndTarget =
pData->hwndTarget;
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define IDS_NOT_RESPONDING
#define HeapFree(x, y, z)
#define ValidateHwnd(hwnd)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
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
#define PROCESS_TERMINATE
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
_In_ BOOL _In_ HANDLE hProcess
_Out_opt_ int _Out_opt_ int * cy
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
BITMAPINFOHEADER bmiHeader
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
static void Ghost_Unenchant(HWND hwnd, BOOL bDestroyTarget)
static void Ghost_OnNCDestroy(HWND hwnd)
static void Ghost_OnNCPaint(HWND hwnd, HRGN hrgn, BOOL bUnicode)
static void Ghost_OnMove(HWND hwnd, int x, int y)
LRESULT CALLBACK GhostWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID IntMakeGhostImage(HBITMAP hbm)
static BOOL Ghost_OnCreate(HWND hwnd, CREATESTRUCTW *lpcs)
LRESULT CALLBACK GhostWndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void Ghost_OnTimer(HWND hwnd, UINT id)
static void Ghost_OnPaint(HWND hwnd)
static HBITMAP IntGetWindowBitmap(HWND hwnd, INT cx, INT cy)
static void Ghost_OnDestroy(HWND hwnd)
static HWND Ghost_GetTarget(HWND hwnd)
const struct builtin_class_descr GHOST_builtin_class
static HICON Ghost_GetIcon(HWND hwnd, INT fType)
LRESULT WINAPI GhostWndProc_common(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
static GHOST_DATA * Ghost_GetData(HWND hwnd)
static LPWSTR Ghost_GetText(HWND hwndTarget, INT *pcchTextW, INT cchExtra)
static void Ghost_OnDraw(HWND hwnd, HDC hdc)
static void Ghost_OnClose(HWND hwnd)
static void Ghost_DestroyTarget(GHOST_DATA *pData)
static HBITMAP IntCreate32BppBitmap(INT cx, INT cy)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
#define IDS_HUNG_UP_TITLE
#define IDS_ASK_TERMINATE
BOOL WINAPI IsHungAppWindow(HWND hwnd)
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define GetWindowLongPtrW
HDC WINAPI GetWindowDC(_In_opt_ HWND)
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define SW_SHOWNOACTIVATE
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define MB_ICONINFORMATION
#define SWP_NOOWNERZORDER
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
#define SetWindowLongPtrW
#define SWP_NOSENDCHANGING
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)