Hi everybody I have got some problems using the LoadIcon Api I want to do two things. I want to have the main program window, which is created using DialogBoxParamA, the Icon with the resource ID 100 and i want the program (e.g. in the Alt-Tab menu) to have this icon. Unfortunatly I can't do this. I tried different ways but non of them worked. I hope you can give me a little example where to to put what to archieve this aim sign CyBerian
Posted on 2001-03-03 06:10:00 by CyBerian
CyBerian, The following code is used in the dialogs WM_INITDIALOG message in your dialog proc. The hWin is the handle passed to the dialog proc.

        invoke LoadIcon,hInstance,1
        mov hIcon, eax

        invoke SendMessage,hWin,WM_SETICON,1,hIcon
Regards, hutch@pbq.com.au
Posted on 2001-03-03 07:21:00 by hutch--
################
Posted on 2001-03-03 07:23:00 by CyBerian