Главная страница
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.022 c
9-1071479588
Cibernetic
2003-12-15 12:13
2004.05.23
Omega Project JDK


1-1083738493
MaD
2004-05-05 10:28
2004.05.23
Как плавно менять цвет?


3-1082966607
PFR
2004-04-26 12:03
2004.05.23
Прерывание запроса к DB2 через ADOQuery


1-1084000885
TGrey
2004-05-08 11:21
2004.05.23
проблема с TImage


3-1083344624
Anti
2004-04-30 21:03
2004.05.23
DBF-File