Once you have created an icon file and defined the icon resource in the .RC file, your application can load the icon from its resources.
To load the icon from your resources, you use the LoadIcon function. The LoadIcon function takes the application's instance handle and the icon's name, and returns a handle to the icon. The following example loads MyIcon and stores its handle in the variable hMyIcon.
hMyIcon = LoadIcon (hInstance, “MyIcon”);
After loading it, the application can display the icon.