Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2003.05.26;
Скачать: [xml.tar.bz2];

Вниз

Как получить Handle скроллбара Listbox?   Найти похожие ветки 

 
Ali   (2003-03-26 08:58) [0]

Собственно сабж :-)


 
MBo   (2003-03-26 09:06) [1]

а нет у него хэндла - это не отдельный элемент класса SCROLLBAR, а часть стиля окна, т.е. скроллбар просто рисуется.


 
Ali   (2003-03-26 09:17) [2]

А если я его хочу самостоятельно отрисовывать?


 
Игорь Шевченко   (2003-03-26 09:18) [3]

Ali (26.03.03 09:17)

Тогда надо перехватывать сообщение WM_NCPAINT, WM_NCACTIVATE и т.д.


 
Ali   (2003-03-26 09:19) [4]

Хм...а как же функция
GetScrollInfo function retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).

BOOL GetScrollInfo(

HWND hwnd, // handle of window with scroll bar
int fnBar, // scroll bar flag
LPSCROLLINFO lpsi // pointer to structure for scroll parameters
);


Parameters

hwnd

Identifies a scroll bar control or a window with a standard scroll bar, depending on the value of the fnBar parameter.

fnBar

Specifies the type of scroll bar for which to retrieve parameters. This parameter can be one of the following values:

Value Meaning
SB_CTL Retrieves the parameters for a scroll bar control. The hwnd parameter must be the handle of the scroll bar control.
SB_HORZ Retrieves the parameters for the given window"s standard horizontal scroll bar.
SB_VERT Retrieves the parameters for the given window"s standard vertical scroll bar.


 
Игорь Шевченко   (2003-03-26 11:46) [5]

Ali (26.03.03 09:19)

Все правильно. Эта функция возвращает информацию о стандартных Scrollbar"ах окна, заданного параметром HWND в случае указания SB_HORZ или SB_VERT и об окне класса Scrollbar в случае указания SB_CTL.

Но для собственной отрисовки все равно надо переопределять обработку сообщений WM_NCxxxxxx



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2003.05.26;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.007 c
4-83830
magister
2003-03-25 17:44
2003.05.26
Как рисовать поверх рабочего стола? (типа экранное меню)


4-83826
AlexB
2003-04-01 06:57
2003.05.26
Message table


9-83312
GameBoy
2002-12-15 22:09
2003.05.26
Взрывы и дымы


1-83573
xman
2003-05-13 11:48
2003.05.26
16 бит в трее


14-83693
Belkova
2003-05-05 14:21
2003.05.26
Отчеты





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский