Hi there,

I am working through Iczelions tut 10-2 and he mentioned that it was posible to set the dialogs titlebar icon using WM_SETICON but whne I tried nothing happens. Below is my code.

DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM

.IF uMsg==WM_INITDIALOG
invoke SendMessage, hWnd, WM_SETICON, ICON_SMALL, IDC_ARROW
invoke GetDlgItem, hWnd,IDC_EDIT
invoke SetFocus,eax
.
.
.

I think this should work, any ideas:confused:
Thanks ahead!!
Posted on 2001-10-07 16:02:29 by JamesE
First of all, it shouldn't be necessary to manually set focus, when
working with dialogs - just play with the taborder... ie, define the
control you want to initially have focus first in your .rc file.

Next, WM_SETICON want's a handle to an icon. I dunno if IDC_ARROW
is accepted as a handle :). Try using LoadIcon first, and pass the
return value of that (a handle) in WM_SETICON.
Posted on 2001-10-07 16:13:09 by f0dder
Thanks LoadIcon works great!:grin:
Posted on 2001-10-07 16:18:56 by JamesE