I do it with something like this:
HBITMAP hBmp;
hBmp = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(222));
SendMessage(GetDlgItem(hDlg,IDC_PWBUTTON), BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hBmp);
}
The button is defined in the resource file thus:
PUSHBUTTON "&Password", IDC_PWBUTTON, 13, 48, 40, 40, BS_BITMAP