The following should output atleast a (the LoadIconMetric call here is improper usage), but it doesn't even output a. Commenting out LoadIconMetric causes a to be output. The problem thus must be linking LoadIconMetric?
#include "resource.h" //< contains #define IDI_NOTIFICATIONICON 1 #include <stdio.h> #include <windows.h> #include <commctrl.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, int nCmdShow) { fputs("a\n", stdout); NOTIFYICONDATAA a; a.cbSize = sizeof(NOTIFYICONDATAA); if(LoadIconMetric(hInstance, MAKEINTRESOURCEW(IDI_NOTIFICATIONICON), LIM_SMALL, &a.hIcon) != S_OK) { fputs("error: LoadIconMetric != S_OK\n", stderr); return 1; } fputs("b\n", stdout); return 0; } _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public