一个类调用另一个类的函数问题
基于单文档文件,在视类窗口里点击一个按钮会弹出一个对话框对话框的类为COutputLevels;我在这个类的这个函数里
void COutputLevels::OnButton1()
{
// TODO: Add your control notification handler code here
changeclr11++;
if(changeclr11==1)
{
CButton*button=(CButton*)GetDlgItem(IDC_BUTTON1);
CBitmap bitmap;
HBITMAP hBit ;
if(bitmap.LoadBitmap(IDB_BITMAP1))
{
hBit = (HBITMAP)bitmap.Detach();
button->SetBitmap(hBit);
}
buttonclr11=1;
}
if(changeclr11==2)
{
CButton*button=(CButton*)GetDlgItem(IDC_BUTTON1);
CBitmap bitMap;
HBITMAP hBit ;
if(bitMap.LoadBitmap(IDB_BITMAP2))
{
hBit = (HBITMAP)bitMap.Detach();
button->SetBitmap(hBit);
}
changeclr11=0;
buttonclr11=2;
}
// CMyEditorView*b=(CMyEditorView*)AfxGetApp()->m_pMainWnd;
// b->OnEditButton1();
}
想要调用视类当中的这个函数
void CMyEditorView::OnEditButton1() //改变按钮颜色
{
// TODO: Add your control notification handler code here
colorbtn1++;
if(colorbtn1==2)
{
CButton *pBtn = (CButton *)GetDlgItem(IDC_EDIT_BUTTON1);
CBitmap bitMap;
HBITMAP hBit ;
if(bitMap.LoadBitmap(IDB_BITMAP2))
{
hBit = (HBITMAP)bitMap.Detach();
pBtn->SetBitmap(hBit);
}
colorbtn1=0;
}
if(colorbtn1==1)
{
CButton *pBtn = (CButton *)GetDlgItem(IDC_EDIT_BUTTON1);
CBitmap bitMap;
HBITMAP hBit ;
if(bitMap.LoadBitmap(IDB_BITMAP1))
{
hBit = (HBITMAP)bitMap.Detach();
pBtn->SetBitmap(hBit);
}
}
}我该怎么做啊?求高手指点!谢谢啊