You have to chance your code a bit. For the first you can not use MAKEINTRESOURCE that way. If you are going use it, you have to first create a header file where you define the icon, like this:
Code:
main.h
#define ICON_NAME 1
Then you create a resource file like this:
Code:
main.rc
#include "main.h"
ICON_NAME ICON name_of_file.ico
And here is the modified cpp file:
Code:
main.cpp
#include "main.h"
wincl.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(ICON_NAME));
wincl.hIconSm = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(ICON_NAME));
That should get it to work.
Or you could simply leave out the header file and load the icon like this:
Code:
wincl.hIcon = LoadIcon (GetModuleHandle(NULL), "ICON_NAME");
wincl.hIconSm = LoadIcon (GetModuleHandle(NULL), "ICON_NAME");