| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 333 人关注过本帖
标题:求这段代码封装成类!
取消只看楼主 加入收藏
qiaokangjun
Rank: 2
等 级:论坛游民
帖 子:4
专家分:25
注 册:2012-3-5
结帖率:0
收藏
已结贴  问题点数:10 回复次数:0 
求这段代码封装成类!
////////按钮图标
    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);
搜索更多相关主题的帖子: 封装 
2012-12-07 19:40
快速回复:求这段代码封装成类!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025647 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved