here's what I have in my framework for Bmax, it may be of some use:
Obviously those API called are externed at the top.
' ----------------------------------------------------------------------------- ' ccSetIcon: Uses Windows API call to set the window icon ' ----------------------------------------------------------------------------- Function ccSetIcon(iconname$, TheWindow%) ?Win32 Local icon=ExtractIconA(TheWindow,iconname,0) Local WM_SETICON = $80 Local ICON_SMALL = 0 Local ICON_BIG = 1 ' sendmessage(TheWindow, WM_SETICON, ICON_SMALL, icon) 'don't need this sendmessage(TheWindow, WM_SETICON, ICON_BIG, icon) ' SetClassLongA(TheWindow,-14,icon) 'Obsolete as it doesn't work with Windows XP Theme! ? End Function
Obviously those API called are externed at the top.