public void FindTextTest() { using var wnd = new DlgWin(RegisterWindowMessage(FINDMSGSTRING)); var fw = new SafeCoTaskMemString(261); var fr = new FINDREPLACE { lStructSize = (uint)Marshal.SizeOf(typeof(FINDREPLACE)), hwndOwner = wnd.MessageWindowHandle, lpstrFindWhat = (IntPtr)fw, wFindWhatLen = (ushort)fw.Length, }; Assert.That(wnd.hdlg = FindText(ref fr), Is.True); }
public extern static IntPtr FindText(ref FINDREPLACE fdr);