Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.05.23;
Скачать: CL | DM;

Вниз

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;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.023 c
3-1083237360
Pavel
2004-04-29 15:16
2004.05.23
вопрос


14-1083226422
BiN
2004-04-29 12:13
2004.05.23
У нас в Москве машины с лентами


7-1082100061
i2e
2004-04-16 11:21
2004.05.23
Серийный номер (опять)


8-1078499463
artix
2004-03-05 18:11
2004.05.23
крутящаяся земля


14-1083741378
darkstalker
2004-05-05 11:16
2004.05.23
Создание нового документа в Экселе.