Revert "[WIN32SS][USER32] Add codes for Ghost Window (#1100)" (#1110)
[reactos.git] / win32ss / user / user32 / controls / ghost.c
index 0abc064..ccc9a6c 100644 (file)
@@ -7,12 +7,12 @@
 
 #include <user32.h>
 #include <strsafe.h>
-#include "ghostwnd.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(ghost);
 
 #define GHOST_TIMER_ID  0xFACEDEAD
 #define GHOST_INTERVAL  1000        // one second
+#define GHOST_PROP      L"GhostProp"
 
 const struct builtin_class_descr GHOST_builtin_class =
 {
@@ -105,6 +105,13 @@ IntMakeGhostImage(HBITMAP hbm)
 
 /****************************************************************************/
 
+typedef struct GHOST_DATA
+{
+    HWND hwndTarget;
+    HBITMAP hbm32bpp;
+    BOOL bDestroyTarget;
+} GHOST_DATA;
+
 static GHOST_DATA *
 Ghost_GetData(HWND hwnd)
 {
@@ -181,9 +188,9 @@ Ghost_OnCreate(HWND hwnd, CREATESTRUCTW *lpcs)
 
     // get the target
     hwndTarget = (HWND)lpcs->lpCreateParams;
-    if (!IsWindowVisible(hwndTarget) ||                             // invisible?
-        (GetWindowLongPtrW(hwndTarget, GWL_STYLE) & WS_CHILD) ||    // child?
-        !IsHungAppWindow(hwndTarget))                               // not hung?
+    if (!IsWindowVisible(hwndTarget) ||     // invisible?
+        GetParent(hwndTarget) ||            // child?
+        !IsHungAppWindow(hwndTarget))       // not hung?
     {
         return FALSE;
     }