Hi Kuba,
What about a static variable right in the function where you call the initialization function? That'd work fine if you don't call InitCommonControlsEx from anywhere else:
if (!list_head(&tray.icons)) { static BOOL controls_initialized = FALSE; INITCOMMONCONTROLSEX init_tooltip;
init_tooltip.dwSize = sizeof(INITCOMMONCONTROLSEX); init_tooltip.dwICC = ICC_TAB_CLASSES;
if (! controls_initialized) { InitCommonControlsEx(&init_tooltip); controls_initialized = TRUE; } . . . }
Indeed, that's what I ended up doing. Mike committed it to his temporary git tree.