Techwiki:Win32k/WND

From ReactOS Wiki
Jump to: navigation, search

WND structure from Windows W2k and XP

typedef struct _PROP
{
  HANDLE hData;
  ATOM   atomKey;
  WORD   fs;
} PROP, *PPROP;

typedef struct _PROPLIST
{
  DWORD  Count;
  DWORD  CountFree;
  PROP   prop[1];
} PROPLIST, *PPROPLIST;

typedef struct _WW
{
  DWORD   state;
  DWORD   state2;
  DWORD   ExStyle;
  DWORD   style;
  HMODULE hModule;
  WORD    hMod16;
  WORD    fnid;
} WW;

typedef struct _WND
{                               // W2k  XP
  THRDESKHEAD  head;            // 000
  WW;                           // 014
  struct _WND *spwndNext;       // 02c  02c
#if (_WIN32_WINNT >= 0x0501)
  struct _WND *spwndPrev;       // ---  030
#endif
  struct _WND *spwndParent;     // 030  034   == pwndDesktop, if created with hwndParent == 0
  struct _WND *spwndChild;      // 034  038
  struct _WND *spwndOwner;      // 038  03c
  RECT      rcWindow;           // 03c  040
  RECT      rcClient;           // 04c  050
  WNDPROC   lpfnWndProc;        // 05c  060
  PCLS      pcls;               // 060  064
  HRGN      hrgnUpdate;         // 064  068
  PPROPLIST ppropList;          // 068  06c See Note.
  PSBINFO   pSBInfo;            // 06c  070
  PMENU     spmenuSys;          // 070  074
  PMENU     spmenu;             // 074  078
  HRGN      hrgnClip;           // 078  07c
  LARGE_STRING strName;         // 07c  080
  DWORD     cbwndExtra;         // 088  08c
  struct _WND *spwndLastActive; // 08c  090
  HIMC      hImc;               // 090  094
  DWORD     dwUserData;         // 094  098
} WND, *PWND;

// Used with Build Hwnd List
typedef struct _BWL
{
   struct _BWL *pbwlNext;
   HWND        *phwndNext;
   HWND        *phwndMax;
   PTHREADINFO  ptiOwner;
   HWND         rghwnd[1];
} BWL, *PBWL;

// "prop" check point, works like our InternalPos
// szCHECKPOINT_PROP_NAME
typedef struct _CHECKPOINT
{
   RECT  rcNormal;
   POINT ptMin;
   POINT ptMax;
   ULONG fDragged:1;
   ULONG fWasMaximizedBeforeMinimized:1;
   ULONG fWasMinimizedBeforeMaximized:1;
   ULONG fMinInitialized:1;
   ULONG fMaxInitialized:1;
} CHECKPOINT, *PCHECKPOINT;

NOTE:

ppropList: Pointer to a list of PROPs allocated by DesktopAlloc with a size of 16 in CreateProp.

References

  • "Undocumented Windows, A Programmer's Guide to Reserved MS Win API Functions", page 509 - 12.
  • Windows Symbol files, userkdx.dll, !dso