Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Перетаскивание файла на элемент List View'a, Как организовать 
:(
    Опции темы
586
Дата 30.5.2006, 17:15 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2243
Регистрация: 8.5.2006

Репутация: нет
Всего: 146



Дано:  List View с несколькоми элементами. Стиль любой.
Надо:  Перетащить файл на этот элемент, например, как в Windows Explorer'e.
Подскажите плиз. 
PM   Вверх
ds29
Дата 30.5.2006, 21:30 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 85
Регистрация: 15.3.2006

Репутация: нет
Всего: 2



;фрагмент кода

    .elseif uMsg == WM_DROPFILES
        invoke DragQueryFile,wParam,0,ADDR buffer1,128
        szText title1,"This is the file you dropped into the window"
        invoke MessageBox,hWin,Addr buffer1,ADDR title1,MB_OK
;...

---------------------------------------------------------------------------------------------------------
The DragQueryFile function retrieves the filenames of dropped files. 

UINT DragQueryFile(

    HDROP hDrop,    // handle to structure for dropped files
    UINT iFile,    // index of file to query
    LPTSTR lpszFile,    // buffer for returned filename
    UINT cch    // size of buffer for filename
   );    
 

Parameters

hDrop

Identifies the structure containing the filenames of the dropped files. 

iFile

Specifies the index of the file to query. If the value of the iFile parameter is 0xFFFFFFFF, DragQueryFile returns a count of the files dropped. If the value of the iFile parameter is between zero and the total number of files dropped, DragQueryFile copies the filename with the corresponding value to the buffer pointed to by the lpszFile parameter. 

lpszFile

Points to a buffer to receive the filename of a dropped file when the function returns. This filename is a null-terminated string. If this parameter is NULL, DragQueryFile returns the required size, in characters, of the buffer. 

cch

Specifies the size, in characters, of the lpszFile buffer. 

 

Return Values

When the function copies a filename to the buffer, the return value is a count of the characters copied, not including the terminating null character. 
If the index value is 0xFFFFFFFF, the return value is a count of the dropped files. 
If the index value is between zero and the total number of dropped files and the lpszFile buffer address is NULL, the return value is the required size, in characters, of 
the buffer, not including the terminating null character. 
----------------------------------------------------------------------------------------------------
 
PM MAIL   Вверх
586
Дата 31.5.2006, 00:35 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2243
Регистрация: 8.5.2006

Репутация: нет
Всего: 146



Ну это ясно, но мне нужно перетащить файл не на контрол, а на его элемент.

http://slil.ru/22796762/556973808
  

Это сообщение отредактировал(а) 586 - 31.5.2006, 08:44
PM   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "Asm для Windows/DOS"
MAKCim
  • Проставьте несколько ключевых слов темы, чтобы её можно было легче найти.
  • Не забывайте пользоваться кнопкой КОД.
  • Телепатов на форуме нет! Задавайте чёткий, конкретный и полный вопрос. Указывайте полностью ошибки компилятора и компоновщика.
  • Новое сообщение должно иметь прямое отношение к разделу форума. Флуд, флейм, оффтопик запрещены.
  • Категорически запрещается обсуждение вареза, "кряков", взлома программ и т.д.

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, MAKCim.

 
 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Asm для Windows/Dos | Следующая тема »


 




[ Время генерации скрипта: 0.0439 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.