internal virtual IntPtr Read(IntPtr lpRes)
        {
            // menu
            lpRes = DialogTemplateUtil.ReadResourceId(lpRes, out _menuId);
            // window class
            lpRes = DialogTemplateUtil.ReadResourceId(lpRes, out _windowClassId);
            // caption
            Caption = Marshal.PtrToStringUni(lpRes);
            lpRes   = new IntPtr(lpRes.ToInt32() + (Caption.Length + 1) * Marshal.SystemDefaultCharSize);

            if ((Style & (uint)User32.DialogStyles.DS_SETFONT) > 0 ||
                (Style & (uint)User32.DialogStyles.DS_SHELLFONT) > 0)
            {
                // point size
                PointSize = (UInt16)Marshal.ReadInt16(lpRes);
                lpRes     = new IntPtr(lpRes.ToInt32() + 2);
            }

            return(lpRes);
        }
        internal virtual IntPtr Read(IntPtr lpRes)
        {
            // control class
            lpRes = DialogTemplateUtil.ReadResourceId(lpRes, out _controlClassId);
            // caption
            lpRes = DialogTemplateUtil.ReadResourceId(lpRes, out _captionId);

            // optional/additional creation data
            switch ((UInt16)Marshal.ReadInt16(lpRes))
            {
            case 0x0000:     // no data
                lpRes = new IntPtr(lpRes.ToInt32() + 2);
                break;

            default:
                UInt16 size = (UInt16)Marshal.ReadInt16(lpRes);
                _creationData = new byte[size];
                Marshal.Copy(lpRes, _creationData, 0, _creationData.Length);
                lpRes = new IntPtr(lpRes.ToInt32() + size);
                break;
            }

            return(lpRes);
        }