Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everybody:
i just want to ownerdraw a scrollbar . but when i use SCROLLBARINFO this struct to get scrollbar infomation,
but i can't get correct value,can u tell me what wrong with that.
C++
void MyScrollBar::OnPaint() 
{
	
	SCROLLBARINFO sbi;
	sbi.cbSize=sizeof(SCROLLBARINFO);
	::GetScrollBarInfo(this->m_hWnd,OBJID_CLIENT,&sbi);
	
	m_cliRect=sbi.rcScrollBar;
	sbi.xyThumbTop;//the value is 0
}
Posted
Comments
nv3 30-Aug-13 8:18am    
How do you come to the conclusion that the values returned by GetScrollBarInfo are not correct? If your scroll bar window has (0, 0) it might well by that xyThumbTop is 0.

1 solution

anybody can help me!!!!!
i am going dead !!!!!!
 
Share this answer
 
Comments
Nelek 30-Aug-13 7:36am    
First of all... be patient. Being annoying is not going to help you at all.

Second, Please don't post solutions to chat with people asking or answering. The messages are not always sorted by date, so it can be a bit difficult to follow them correctly.

third, people here are from the whole world, so the one knowing the answer to your problem might be now sleeping.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900