Setting window icon on Windows 10

In the documentation section it eludes to this function:

But there is no content under it. Maybe the function is deprecated, what is the current proper way to set an own Window titlebar icon?

OK, I got this to work now. You need to make sure you have a proper ico file (includes several sizes of your icon) and then add this into your setup in OF:

// set window icon
HICON hWindowIcon = NULL;
HICON hWindowIconBig = NULL;
HWND hwnd = ofGetWin32Window();
string stricon = "data/myicon.ico";

if (hWindowIcon != NULL) DestroyIcon (hWindowIcon);
if (hWindowIconBig != NULL) DestroyIcon (hWindowIconBig);
hWindowIcon = (HICON) LoadImageA (GetModuleHandle (NULL), stricon.c_str (), IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
hWindowIconBig = (HICON) LoadImageA (GetModuleHandle (NULL), stricon.c_str (), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
SendMessage (hwnd, WM_SETICON, ICON_SMALL, (LPARAM) hWindowIcon);
SendMessage (hwnd, WM_SETICON, ICON_BIG, (LPARAM) hWindowIconBig);

A bit of a stretch from the ‘setwindowicon’ command I was hoping for but it gets the job done.