· Начало · Отвђтить · Статистика · Поиск · FAQ · Правила · Установки · Язык · Выход · WASM.RU · Noir.Ru ·

 WASM Phorum —› WASM.WIN32 —› StatusBar height ?

Посл.отвђт Сообщенiе


Дата: Дек 10, 2003 00:44:07

Как узнать высоту statusbar-a ?
в GetSystemMetrics такого не нашел.


Дата: Дек 10, 2003 03:42:16 · Поправил: q_q

prog
Цитата из Status Bars
'...
Size and Height
The window procedure for the status bar automatically sets the initial size and position of the window, ignoring the values specified in the CreateWindowEx function. The width is the same as that of the parent window's client area. The height is based on the metrics of the font that is currently selected into the status bar's device context and on the width of the window's borders.

The window procedure automatically adjusts the size of the status bar whenever it receives a WM_SIZE message. Typically, when the size of the parent window changes, the parent sends a WM_SIZE message to the status bar.

An application can set the minimum height of a status bar's drawing area by sending the window an SB_SETMINHEIGHT message, specifying the minimum height, in pixels...'


Дата: Дек 10, 2003 04:32:52

А как насчёт такого?

LOCAL rcStat:RECT

invoke GetWindowRect,hStatus,addr rcStat

Тогда rcStat.bottom будет содержать высоту, а rcStat.right - длину окна статус бара.


Дата: Дек 10, 2003 05:45:03

SolidCode
Это понятно, но нужно узнать высоту статусбара еще до его создания.


Дата: Дек 10, 2003 06:41:53 · Поправил: comrade

Разьве q_q не объяснил?


Дата: Дек 10, 2003 09:25:25

prog
А что вообще нужно? Сделать клиентскую область определенного размера или что?


Дата: Дек 10, 2003 18:49:15

q_q все объяснил.
да. надо узнать размер клиентской области окна, содержащего статусбар, чтобы туда вписать с точностью до точки объект.


Дата: Дек 11, 2003 04:06:57

prog
Если у тебя owner-drawn status bar, то в программу придет WM_DRAWITEM с lParam указывающим на DRAWITEMSTRUCT, в котором есть координаты прямоугольника DRAWITEMSTRUCT.rcItem в котором можно рисовать. Это справедливо и для каждой секции многосекционного status bar'а.


Powered by miniBB 1.6 © 2001-2002
Время загрузки страницы (сек.): 0.103