/// <summary> /// Read the dialog resource. /// </summary> /// <param name="lpRes">Pointer to the beginning of the dialog structure.</param> internal override IntPtr Read(IntPtr lpRes) { _header = (Dialogtemplate)Marshal.PtrToStructure(lpRes, typeof(Dialogtemplate)); lpRes = new IntPtr(lpRes.ToInt32() + 18); // Marshal.SizeOf(_header) lpRes = base.Read(lpRes); if ((Style & (uint)DialogStyles.DS_SETFONT) > 0 || (Style & (uint)DialogStyles.DS_SHELLFONT) > 0) { // typeface TypeFace = Marshal.PtrToStringUni(lpRes); lpRes = new IntPtr(lpRes.ToInt32() + (TypeFace.Length + 1) * Marshal.SystemDefaultCharSize); } return(ReadControls(lpRes)); }
/// <summary> /// Read the dialog resource. /// </summary> /// <param name="lpRes">Pointer to the beginning of the dialog structure.</param> internal override IntPtr Read(IntPtr lpRes) { _header = (Dialogtemplate)Marshal.PtrToStructure(lpRes, typeof (Dialogtemplate)); lpRes = new IntPtr(lpRes.ToInt32() + 18); // Marshal.SizeOf(_header) lpRes = base.Read(lpRes); if ((Style & (uint)DialogStyles.DS_SETFONT) > 0 || (Style & (uint)DialogStyles.DS_SHELLFONT) > 0) { // typeface TypeFace = Marshal.PtrToStringUni(lpRes); lpRes = new IntPtr(lpRes.ToInt32() + (TypeFace.Length + 1)*Marshal.SystemDefaultCharSize); } return ReadControls(lpRes); }