ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_scroll_handle |
This function is designed to handle scrollbar messages from an hWnd window.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_dspl_scroll_handle( [IN] HIGEAR hIGear, [IN] DWORD dwGrpID, [IN] HWND hWnd, [IN] AT_MODE nScrlType, [IN] AT_MODE nScrlMode, [IN] LONG lScrlValue, [OUT] LPAT_SCROLL_INFO lpScrollInfo ); |
Name | Type | Description |
hIGear | HIGEAR | ImageGear handle of image. |
dwGrpID | DWORD | Identifier of group that will be used to perform operation. |
hWnd | HWND | Pointer to NSView or NSScrollView object where image is displayed and where scrolling is performed. Pointer must be casted to non-retainable HWND type type with (__bridge HWND) operator. |
nScrlType | AT_MODE |
Scroll command. Its value is platform dependent. For Mac platforms, valid values are:
|
nScrlMode | AT_MODE |
Scroll command. Its value is platform dependent. For Mac platforms it should be 0. |
nScrlValue | LONG | Scroll value. It is also platform dependent and its value may have a different meaning from nScrlType. Under the Mac platform, it is not used because the scroll position is obtained directly from the scrollbars. |
lpScrollInfo | LPAT_SCROLL_INFO | Receive updated scroll parameters (not scrollbar). If NULL then it is ignored. |
Returns the number of ImageGear errors that occurred during this function call.
All pixel formats supported by ImageGear Professional.
Copy Code
|
|
---|---|
// MainScrollView.h #import <Cocoa/Cocoa.h> @interface MainScrollView : NSScrollView @end // MainScrollView.m #import "MainScrollView.h" #import <ImageGear18/gear.h> … // Register scrolling notification - (void)awakeFromNib { [[self contentView] setPostsBoundsChangedNotifications: YES]; NSNotificationCenter *center = [NSNotificationCenter defaultCenter] ; [center addObserver: self selector: @selector(boundsDidChangeNotification:) name: NSViewBoundsDidChangeNotification object: [self contentView]]; } // Handle scrolling notification - (void) boundsDidChangeNotification: (NSNotification *) notification { IG_dspl_scroll_handle(hIGear, 0, (__bridge HWND)self, IG_DSPL_SCROLL_HORIZONTAL | IG_DSPL_SCROLL_VERTICAL, 0, 0, NULL); [self setNeedsDisplay: YES]; } |
This function should not be used to set the absolute scroll position; function IG_dspl_scroll_to() should be used instead.