public static QTTabBarLib.Interop.RECT ListView_GetItemRect(IntPtr hwnd, int iItem, int iSubItem, int code) { QTTabBarLib.Interop.RECT structure = new QTTabBarLib.Interop.RECT(); structure.left = code; structure.top = iSubItem; IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(structure)); Marshal.StructureToPtr(structure, ptr, false); if (iSubItem == 0) { SendMessage(hwnd, 0x100e, (IntPtr)iItem, ptr); } else { SendMessage(hwnd, 0x1038, (IntPtr)iItem, ptr); } structure = (QTTabBarLib.Interop.RECT)Marshal.PtrToStructure(ptr, typeof(QTTabBarLib.Interop.RECT)); Marshal.FreeHGlobal(ptr); return(structure); }
public static QTTabBarLib.Interop.RECT ListView_GetItemRect(IntPtr hwnd, int iItem, int iSubItem, int code) { QTTabBarLib.Interop.RECT structure = new QTTabBarLib.Interop.RECT(); structure.left = code; structure.top = iSubItem; IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(structure)); Marshal.StructureToPtr(structure, ptr, false); if(iSubItem == 0) { SendMessage(hwnd, 0x100e, (IntPtr)iItem, ptr); } else { SendMessage(hwnd, 0x1038, (IntPtr)iItem, ptr); } structure = (QTTabBarLib.Interop.RECT)Marshal.PtrToStructure(ptr, typeof(QTTabBarLib.Interop.RECT)); Marshal.FreeHGlobal(ptr); return structure; }
public static extern int DrawThemeTextEx(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, string text, int iCharCount, TextFormatFlags dwFlags, ref QTTabBarLib.Interop.RECT pRect, ref DTTOPTS pOptions);
public static extern int DrawTextExW(IntPtr hdc, IntPtr lpchText, int cchText, ref QTTabBarLib.Interop.RECT lprc, int dwDTFormat, IntPtr lpDTParams);
public static extern bool PtInRect(ref QTTabBarLib.Interop.RECT lprc, BandObjectLib.POINT pt);
public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref QTTabBarLib.Interop.RECT lpPoints, int cPoints);
public static extern bool GetWindowRect(IntPtr hWnd, out QTTabBarLib.Interop.RECT pRect);