Hi<br> I am trying to load a Icon to a bitmap to a BUTTON .<br>But it is not loading the Bitmap .<br>The code I am writing is in the OnInitDialog of the Dialog Class .<br>The Code is <br>BOOL CAboutDlg::OnInitDialog() <br>{<br> CDialog::OnInitDialog();<br> <br> // get a handler to the button<br> HWND hOk;<br><br> /* The button is control IDOK*/<br> hOk = (HWND) GetDlgItem(IDOK);<br><br> /* The icon is IDI_UP in the resource file */<br> HICON hU = (HICON) ::LoadImage (AfxGetResourceHandle (),MAKEINTRESOURCE(IDI_UP),IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR );<br> ::SendMessage( hOk, BM_SETIMAGE, IMAGE_ICON,(LPARAM)(DWORD) hU );<br><br> return TRUE; <br>}<br> What is the problem with the above code . Please find me<br>a solution at the earliest . I want the solution in this way<br>only.