Hi,
I am a having a bit of trouble with a structure.
I just declared the structure the same as the way as it is shown.
typedef struct tagSCROLLBARINFO {
DWORD cbSize;
RECT rcScrollBar;
int dxyLineButton;
int xyThumbTop;
int xyThumbBottom;
int reserved;
DWORD rgstate[CCHILDREN_SCROLLBAR+1];
} SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
Normally, I would do something like this...
SCROLLBARINFO ScrollInfo;
ScrollInfo.cbSize = sizeof(SCROLLBARINFO);
m_sbHorz.GetScrollBarInfo(&ScrollInfo);
It complains "cannot convert parameter 1 from 'SCROLLBARINFO *' to
'PSCROLLBARINFO' "
I tried to cast it as a PSCROLLBAR by doing
m_sbHorz.GetScrollBarInfo((PSCROLLBARINFO)&ScrollInfo);
I tried this....
PSCROLLBARINFO pScrollInfo;
pScrollInfo->cbSize = sizeof(SCROLLBARINFO);
m_sbHorz.GetScrollBarInfo(pScrollInfo);
It complains "cannot convert parameter 1 from 'PSCROLLBARINFO' to
'PSCROLLBARINFO' "
which doesn't really make sense.
I tried a bunch of other things to no avail.
I am all confused. How do I get it to work?
and why do they put "*PSCROLLBARINFO, *LPSCROLLBARINFO"
at the end of the structure declaration?
Thanks,
--
Christopher J. Holland [!MVP]
http://www.mvps.org/vcfaq/
http://www.codeguru.com
http://www.codeproject.com
http://www.naughter.com/
http://support.microsoft.com/default.aspx
http://msdn.microsoft.com/howto/
http://msdn.microsoft.com/library/
www.flounder.com/mvp_tips.htm