Example #1
0
 public static extern int SendMessage(IntPtr hWnd, MSG Msg,
                                      int wParam, ref LVITEMA lParam);
Example #2
0
 public static extern int SendMessage(IntPtr hWnd, MSG Msg,
     int wParam, ref LVITEMA lParam);
Example #3
0
        bool RenameCallback(IntPtr hwnd, IntPtr lParam)
        {
            int itemCount = User32.SendMessage(hwnd,
                MSG.LVM_GETITEMCOUNT, 0, 0);

            for (int n = 0; n < itemCount; ++n)
            {
                LVITEMA item = new LVITEMA();
                item.mask = LVIF.LVIF_STATE;
                item.iItem = n;
                item.stateMask = LVIS.LVIS_SELECTED;
                User32.SendMessage(hwnd, MSG.LVM_GETITEMA,
                    0, ref item);

                if (item.state != 0)
                {
                    User32.SendMessage(hwnd, MSG.LVM_EDITLABEL, n, 0);
                    return false;
                }
            }

            return true;
        }