An MSDN article for LoadIcon() says this about its first argument:
A handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be NULL when a standard icon is being loaded.
Since you're not loading the standard icon, but your own, you need to provide a valid module handle. The module handle for your executable could be retrieved with passing NULL
to GetModuleHandle() function, so the code would look like this:
nid.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON1));