Changing my app's icon using Dev-C++ (Win32 GUI mode)

I'm learning to use DEV-C++ 5.11, hoping to make a program I have in mind.
Before I go any further, I would like to change the icon for the resulting program, but it doesn't seem to work.
Here's what I did:
1 - I start a new project (File - New - Project - Windows Application) and name it "test". This creates a generic main.cpp file in the with the WndProc and WinMain functions in it.
2 - I compile and run, it creates a program (test.exe) which does nothing but works. 3 - I delete the .exe file.
3 - I copy an icon file (test.ico) in the directory of the project.
4 - I set the icon as the project icon. (Project - Project Options - General - Icon - Browse - Type - Win32 GUI)
5 - I compile and run again, the resulting program works but still shows that generic icon (in the title bar, on the task bar, in the file explorer and the Alt+Tab selector).
What am I missing? Any help would be greatly appreciated.
P.S. I'm running on Windows 7 and the .ico file is a valid icon file that I took from another program and renamed, for the sake of the test.
It works for me when I change in WinMain
 
  wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* use the name "A" to use the project icon */


to

 
  wc.hIconSm = LoadIcon(hInstance, "A"); /* use the name "A" to use the project icon */


Don't delete the .exe manually, press F12 or Execute -> Rebuild All or Compile and run (F11)
Eureka! It works.
I had tried something similar before, but without the quotation marks around the A, so it wasn't working.
Thank you for putting and end to a week of frustration!
Thank you, thank you!
Topic archived. No new replies allowed.