Esempio n. 1
0
        public static ScrollBarInfo GetScrollBarInfo(IntPtr hwnd, ScrollBarObjectID objId)
        {
            ScrollBarInfo info = new ScrollBarInfo();

            info.cbSize = Marshal.SizeOf(info);
            if (Api_User32.GetScrollBarInfo(hwnd, (uint)objId, ref info) != IntPtr.Zero)
            {
                throw new Win32Exception(Marshal.GetLastWin32Error(), "Unable to obtain scrollbar information.");
            }
            return(info);
        }