求这段代码封装成类!
////////按钮图标HBITMAP hBmp1=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP2));
((CButton *)GetDlgItem(IDC_BUTTON1))->SetBitmap(hBmp1);
HBITMAP hBmp2=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP3));
((CButton *)GetDlgItem(IDC_BUTTON2))->SetBitmap(hBmp2);
HBITMAP hBmp3=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP4));
((CButton *)GetDlgItem(IDC_BUTTON3))->SetBitmap(hBmp3);
HBITMAP hBmp4=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP5));
((CButton *)GetDlgItem(IDC_BUTTON4))->SetBitmap(hBmp4);
HBITMAP hBmp5=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP6));
((CButton *)GetDlgItem(IDC_BUTTON5))->SetBitmap(hBmp5);
HBITMAP hBmp6=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP7));
((CButton *)GetDlgItem(IDC_BUTTON6))->SetBitmap(hBmp6);
HBITMAP hBmp7=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP8));
((CButton *)GetDlgItem(IDC_BUTTON7))->SetBitmap(hBmp7);
HBITMAP hBmp8=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP9));
((CButton *)GetDlgItem(IDC_BUTTON8))->SetBitmap(hBmp8);
HBITMAP hBmp9=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP10));
((CButton *)GetDlgItem(IDC_BUTTON9))->SetBitmap(hBmp9);
HBITMAP hBmp10=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP11));
((CButton *)GetDlgItem(IDC_BUTTON10))->SetBitmap(hBmp10);
HBITMAP hBmp11=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP12));
((CButton *)GetDlgItem(IDC_BUTTON11))->SetBitmap(hBmp11);
HBITMAP hBmp12=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP13));
((CButton *)GetDlgItem(IDC_BUTTON12))->SetBitmap(hBmp12);
HBITMAP hBmp13=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP14));
((CButton *)GetDlgItem(IDC_BUTTON13))->SetBitmap(hBmp13);
HBITMAP hBmp14=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP15));
((CButton *)GetDlgItem(IDC_BUTTON14))->SetBitmap(hBmp14);
HBITMAP hBmp15=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP16));
((CButton *)GetDlgItem(IDC_BUTTON15))->SetBitmap(hBmp15);
HBITMAP hBmp16=::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP17));
((CButton *)GetDlgItem(IDC_BUTTON16))->SetBitmap(hBmp16);