How To Load An Icon On A CButton At Runtime


  • 14 Jan, 2012

    CButton *btnsample = (CButton *)GetDlgItem(IDC_BUTTON1);btnsample->ModifyStyle(0,BS_ICON,SWP_FRAMECHANGED); //change the style of CButtonHICON hIcon = ::LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_ICON)); //load an Icon assuming IDI_ICON is ID of ICONbtnsample->SetIcon(hIcon);

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.