|
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО! |
|
|
Ending the Drag Operation
The following function ends the drag operation and draws the image in its final location. It also releases the mouse capture.
// StopDragging - ends a drag operation and draws the image // at its final location. // Returns TRUE if successful or FALSE otherwise. // hwnd - handle of the window in which the bitmap is dragged // himl - handle of the image list // ptCur - coordinates of the cursor // // Global variable // g_ptHotSpot - location of the image's hot spot extern POINT g_ptHotSpot; BOOL StopDragging(HWND hwnd, HIMAGELIST himl, POINT ptCur) { ImageList_EndDrag();
ImageList_DragLeave(hwnd) g_fDragging = FALSE; DrawTheImage(hwnd, himl, ptCur.x - g_ptHotSpot.x, ptCur.y - g_ptHotSpot.y); ReleaseCapture(); return TRUE; }
|
Пригласи друзей и счет твоего мобильника всегда будет положительным! |
|
Пригласи друзей и счет твоего мобильника всегда будет положительным! |
Окончание Действия Помехи
Следующее функции заканчивает действие помехи и делает образом в своей конечной позиции. Это также выпускает сбор мыши.
// StopDragging - ЗАКАНЧИВАЕТ действие помехи и делает образом // в своей конечной позиции. // ИСТИНА Возврата если успешный или ЛОЖНЫЙ в противном случае. // hwnd - ручка окна в котором побитовое отображение потащено // himl - ручка списка / образа/ ptCur - координаты курсора // // Глобальная переменная // g_ptHotSpot - позиция горячей точки образа extern ТОЧКА g_ptHotSpot; BOOL StopDragging(HWND hwnd, HIMAGELIST himl, ТОЧКА ptCur) { ImageList_EndDrag();
ImageList_DragLeave(hwnd) g_fDragging = ЛОЖЬ; DrawTheImage(hwnd, himl, ptCur.x - g_ptHotSpot.x, ptCur.y - g_ptHotSpot.y); ReleaseCapture(); возвращайтесь ВЕРНО; }
|
|
|
|