I just can't get this to work:
DlgProc PROC hWnd:HWND,iMsg:DWORD,wParam:WPARAM, lParam:LPARAM
.if iMsg==WM_INITDIALOG
invoke LoadBitmap,hInstance,IDB_ABOUT_LOGO
mov hAboutBitmap, eax ; icon handle
invoke GetDlgItem, hWnd, IDC_ABOUT_LOGOSTATIC ; eax = handle of dialog static control
Invoke SendDlgItemMessage, eax, IDC_ABOUT_LOGOSTATIC, STM_SETIMAGE, IMAGE_BITMAP, hAboutBitmap
It would seem to be a common task, to put the bitmap into the static control, but I have been unable to find an example.
I just corrected the title spelling. :bg
Never mind. It a style error and the wrong code. ::)
if you use GetDlgItem - you have a handle for the static, so you can use SendMessage
if you use SendDlgItemMessage, you do not need to get a handle to the static first - just use the control ID
if you need to store the static handle for other purposes, use the first method :P