using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class ComCtl32
{
/// Draws the insert icon in the parent window of the specified drag list box.
///
/// Type: HWND
/// A handle to the parent window of the drag list box.
///
///
/// Type: HWND
/// A handle to the drag list box.
///
///
/// Type: int
/// The identifier of the icon item to be drawn.
///
/// No return value.
// void DrawInsert( HWND handParent, HWND hLB, int nItem); https://msdn.microsoft.com/en-us/library/windows/desktop/bb761723(v=vs.85).aspx
[DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Commctrl.h", MSDNShortId = "bb761723")]
public static extern void DrawInsert(HWND handParent, HWND hLB, int nItem);
/// Retrieves the index of the item at the specified point in a list box.
///
/// Type: HWND
/// A handle to the list box to check.
///
///
/// Type: POINT
/// A POINT structure that contains the screen coordinates to check.
///
///
/// Type: BOOL
///
/// A scroll flag. If this parameter is TRUE and the point is directly above or below the list box, the function scrolls the
/// list box by one line and returns -1. Otherwise, the function does not scroll the list box.
///
///
///
/// Type: int
/// Returns the item identifier if the point is over a list item, or -1 otherwise.
///
// int LBItemFromPt( HWND hLB, POINT pt, BOOL bAutoScroll); https://msdn.microsoft.com/en-us/library/windows/desktop/bb761724(v=vs.85).aspx
[DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Commctrl.h", MSDNShortId = "bb761724")]
public static extern int LBItemFromPt(HWND hLB, POINT pt, [MarshalAs(UnmanagedType.Bool)] bool bAutoScroll);
/// Changes the specified single-selection list box to a drag list box.
///
/// Type: HWND
/// A handle to the single-selection list box.
///
///
/// Type: BOOL
/// Returns nonzero if successful, or zero otherwise.
///
// BOOL MakeDragList( HWND hLB); https://msdn.microsoft.com/en-us/library/windows/desktop/bb761725(v=vs.85).aspx
[DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Commctrl.h", MSDNShortId = "bb761725")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool MakeDragList(HWND hLB);
}
}