Can you help me to solve this problem, i face this error in my project in visual 2012,
i see a sample from internet, but it not work:
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCLayer* scrollContainer = CCLayer::create(); // Container for the scroll view
scrollContainer->setAnchorPoint(CCPointZero); // CCScrollView does this too when it’s set as the container.
// Content for the container
CCSprite tallContentA = CCSprite::create(“NoButton.png”);
tallContentA ->setPosition(ccp(winSize.width0.5f, winSize.height0.9f));
CCSprite tallContentB = CCSprite::create(“NoButtonPressed.png”);
tallContentB ->setPosition(ccp(winSize.width0.5f, winSize.height0.1f));
float scrollContainerHeight = tallContentA->getContentSize().height + tallContentB->getContentSize().height;
// Set up scroll view
CCScrollView * scrollView = CCScrollView::create(winSize, scrollContainer);
// ScrollView initializes at the (left, bottom). The container also gets positioned relative to that and goes Y-up.
// Pre-set it to the value CCScrollView::minContainerOffset will return when it’s scrolled to the top
// (note, this is a negative number, indicating the touch moving downwards, i.e. it’s pre-scrolled such that the top of the content is visible when we begin)
//scrollView->setContentOffset(ccp(0.f, (winSize.height-scrollContainerHeight1.05f)), false);
// (StackOverflow Post Edit: This hack is not required.)
// Hack: CCScrollView’s maxContainerOffset is (0, 0) and minContainerOffset is (difference between view and content size which is negative)
// It’s designed to be (left, bottom) based and positive scrolling means showing stuff above the top of the screen.
// Since we’re using it in terms of Window coordinates ((left, top) based), we scale the scroll view
// and it’s container’s children by -1 and position the children differently
// (eg. Y position winSize.height0.1f was changed to winSize.height0.9f)
// We can’t just set the scroll view’s Y scale to -1 because CCNode::getScale asserts that X and Y scale must be the same.