June 2nd, 1999, 05:47 AM
I'll be gratefull of any help....
I have a dialog and a list, a button on the dialog deletes list items, I have a subclassed CListbox which gets keyboard input, and when delete is pressed I wish to call my delete func on the dialog. I have tried several ways, what am I doing wrong...the delete function is a class wizard generated button click ie protected.... I tried to pass a pointer to my dialog to the list in OnInitDialog, but I had errors as I needed to include the dialog.h in the list for the pointer and the list.h in the dialog for the control. I tried calling MyDialog::OnBtDelete but cannot access protected member, if I create a public function and call in the same way I get invalid call to non static member. I thought perhaps I need a friend function, if so how...please help, and thanks
Stewart
I have a dialog and a list, a button on the dialog deletes list items, I have a subclassed CListbox which gets keyboard input, and when delete is pressed I wish to call my delete func on the dialog. I have tried several ways, what am I doing wrong...the delete function is a class wizard generated button click ie protected.... I tried to pass a pointer to my dialog to the list in OnInitDialog, but I had errors as I needed to include the dialog.h in the list for the pointer and the list.h in the dialog for the control. I tried calling MyDialog::OnBtDelete but cannot access protected member, if I create a public function and call in the same way I get invalid call to non static member. I thought perhaps I need a friend function, if so how...please help, and thanks
Stewart