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

Вниз

API: ScrollDC   Найти похожие ветки 

 
VasRog ©   (2004-04-15 17:37) [0]

Товарищи, помогите разобраться со ScrollDC функцией.
BOOL ScrollDC(

   HDC hDC, // handle of device context
   int dx, // horizontal scroll units
   int dy, // vertical scroll units
   CONST RECT *lprcScroll, // address of structure for scrolling rectangle
   CONST RECT *lprcClip, // address of structure for clipping rectangle
   HRGN hrgnUpdate, // handle of scrolling region
   LPRECT lprcUpdate  // address of structure for update rectangle
  );

Не могу понять как использовать 4 последних параметра. Хочу просто подвигать картинку, загруженную в TImage.


 
Игорь Шевченко ©   (2004-04-15 17:52) [1]

"lprcScroll
[in] Pointer to a RECT structure containing the coordinates of the bits to be scrolled. The only bits affected by the scroll operation are bits in the intersection of this rectangle and the rectangle specified by lprcClip. If lprcScroll is NULL, the entire client area is used.
lprcClip
[in] Pointer to a RECT structure containing the coordinates of the clipping rectangle. The only bits that will be painted are the bits that remain inside this rectangle after the scroll operation has been completed. If lprcClip is NULL, the entire client area is used.
hrgnUpdate
[in] Handle to the region uncovered by the scrolling process. ScrollDC defines this region; it is not necessarily a rectangle.
lprcUpdate
[out] Pointer to a RECT structure that receives the coordinates of the rectangle bounding the scrolling update region. This is the largest rectangular area that requires repainting. When the function returns, the values in the structure are in client coordinates, regardless of the mapping mode for the specified device context. This allows applications to use the update region in a call to the InvalidateRgn function, if required. "

"If the lprcUpdate parameter is NULL, the system does not compute the update rectangle. If both the hrgnUpdate and lprcUpdate parameters are NULL, the system does not compute the update region. If hrgnUpdate is not NULL, the system proceeds as though it contains a valid handle to the region uncovered by the scrolling process (defined by ScrollDC). "

Что именно непонятно из процитированного ?


 
VasRog ©   (2004-04-15 23:25) [2]

Ну хорошо. Например, картинка висит в верхнем левом углу.
Соответственно
lprcScroll - то что будем двигать как я понимаю т.е.
Var
a: Trect;
.........
a.left:=0;
a.top:=0;
a.right:=bitmap.width;
a.bottom:=bitmap.height;

lprcClip - откуда вырезать т.е. то же самое т.к. двигать будем всю картинку.
А HRGN и LPRECT как определить. Это я вообще не понимаю что такое.



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

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

Наверх





Память: 0.45 MB
Время: 0.04 c
1-1083822965
Sun bittern
2004-05-06 09:56
2004.05.23
Сообщение на создание/удоление объектов типа TComponent и страше


3-1083314992
Evyshka
2004-04-30 12:49
2004.05.23
Отображение в одной колонке


14-1083704296
11111ffghfghfg
2004-05-05 00:58
2004.05.23
Зачем разработчики Делфи сделали TDAtaSource?


3-1082983098
ceval
2004-04-26 16:38
2004.05.23
Помогите разобраться -поиск по нескольким полям


4-1081139547
juiceman
2004-04-05 08:32
2004.05.23
Хук на клавиатуру и мышь





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский