PDA

View Full Version : Scrollbar handler




printf
Oct 6, 2008, 01:37 AM
i'm creating a scrollbar at runtime using the following:


CreateScrollBarControl(window,&sb_vert_rect,0,0,100,50,true,ScrollingFeedbackProc,&sb);


how do i capture scroll events in the handler for the window this control was created in? i've tried kEventClassControl, kEventControlClick with InstallControlEventHandler just to capture a click, but it only captures clicks in the window, not the scrollbar control.

also, i'm using a compositing window with hiview.



kainjow
Oct 7, 2008, 07:37 AM
Here is some code that may help: Creating a Scroll View (http://developer.apple.com/documentation/Carbon/Conceptual/HIViewDoc/HIView_tasks/chapter_3_section_13.html). It uses the HIScrollViewCreate() function with subviews instead.