This belongs into Windows programming.
You do this by adding an icon resource to your program (it must be an icon file, you cannot use other image formats).
Well, i searched a little bit and actually added an icon with a resource file. Is there a simple way to display it in the window name bar at the top of the window?