CEdit Scrollbar help required - Programmer
This is a discussion on CEdit Scrollbar help required - Programmer ; (I apologize in advance if this is not the right newsgroup.)
I am attempting to write a program that does the following.
Opens up a dialog box with an editbox, checkbox, and button.
Initially, the checkbox and the button are ...
-
CEdit Scrollbar help required
(I apologize in advance if this is not the right newsgroup.)
I am attempting to write a program that does the following.
Opens up a dialog box with an editbox, checkbox, and button.
Initially, the checkbox and the button are disabled. A file is read
and sent to the edit box. This file contains a disclaimer. I want
the user to scroll all the way down to the of the disclaimer in the
editbox. Once the user has done this, the checkbox is enabled. Once
the checkbox is enabled, the button becomes enabled. Once the button
is pressed the dialog box closes.
The question is:
How do I implement the ability to scroll to the bottom of the
disclaimer in order to continue?
Thanks
Richard
-
Re: CEdit Scrollbar help required
Here is what I would do
Derive a class from CEdit and take over WM_VSCROLL, (not EN_VSCROLL)
void CScrollNotifyEdit::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar*
pScrollBar)
{
CEdit::OnVScroll(nSBCode, nPos, pScrollBar);
int Max = GetScrollLimit(SB_VERT);
if (GetScrollPos(SB_VERT) == Max)
{
SendMessage(GetParent(),WM_ATEND);
}
}
Ali R.
"Richard" wrote in message
news:807dd246.0401070603.2f911849@posting.google.c om...
> (I apologize in advance if this is not the right newsgroup.)
>
> I am attempting to write a program that does the following.
>
> Opens up a dialog box with an editbox, checkbox, and button.
> Initially, the checkbox and the button are disabled. A file is read
> and sent to the edit box. This file contains a disclaimer. I want
> the user to scroll all the way down to the of the disclaimer in the
> editbox. Once the user has done this, the checkbox is enabled. Once
> the checkbox is enabled, the button becomes enabled. Once the button
> is pressed the dialog box closes.
>
> The question is:
> How do I implement the ability to scroll to the bottom of the
> disclaimer in order to continue?
>
> Thanks
> Richard