Try the code below and then re-size the window. You will notice the icon shrinks to the size of the control (which is correct). Though I am interested to know what message should I used so this is done automatically?
I know I can use WinMove() but that's a little hacky!
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <WinAPIShellEx.au3>
Global Const $STM_SETIMAGE = 0x0172
Example()
Func Example()
Local $hGUI = GUICre