I am using nana for building a GUI in my C++ application, which basically works fine. However, I have trouble setting the window icon under Windows:
nana::API::window_icon_default(nana::paint::image("hunger.ico"));
There is definitely a file hunger.ico
within the same folder as the executable, I double-checked that. That icon file is 32x32 in size (or 16x16). I also tried to retrieve the full path to the icon file, like so:
wchar_t buffer[MAX_PATH];
DWORD len = sizeof(buffer);
GetModuleFileName(nullptr, buffer, len);
std::wstring ws(buffer);
// concatenate ws and "hunger.ico" here
But when I run the (console) application from within VS2015, the default window icon is used. Any ideas what I am missing here?