Hello guys

I've got a general question about a Button on a form... ' <<Backward' the function for this button is to go through the CList and display the contenets at that position in the screen. Anyway at the minute ive got a message box saying ' Reached beginning of list / end of list'. I wanting to go one step further and disable the button if the list is at the beginning or end. Can anyone point me in the right direction? I've tried google and not much use.

Thanks guys

12 Years
Discussion Span
Last Post by Ancient Dragon

assume you used ClassWizard to name the button control m_ctrlButton,

m_ctrlButton.EnableWindow(FALSE); // grey (disable) the button

where would that code go?

I didnt use a wizard instead i built the button using the Toolbox. The button is called .. 'IDC_Pervious' I've attched an event handler to the button which is resonpsible for going through the List.


This code is in the CDialog class that contains the button.

CWnd* pWnd = (CWnd*)GetDlgItem(IDC_Pervious);

I cannot access the link you posted from where I am at. You might want to zip up the file and attach the zip file to your post.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.