Hello,
i want to implement an application icon with CodeBlocks:Mingw and the fltk toolkit. I compile the following code:
icontest.c
----------
#include <FL/Fl.H>
#include <FL/x.H>
#include <FL/Fl_Window.H>
#include "icontest.h"
int main(int argc, char **argv) {
Fl_Window mainWin(400, 300, "Icontest");
mainWin.icon((char *)LoadIcon(fl_display, "test"));
mainWin.show(argc, argv);
return Fl::run();
}
icontest.h
---------
#define test 1
icontest.rc
----------
test ICON DISCARDABLE "test.ico"
I can compile the project and the icon in the explorer seems to be okay. But there is no item im the title of the window.
If i compile it in the cmd.exe mit this makefile, everything is okay.
all: icontest.exe
.cpp.o:
g++ -c -Wall -I/usr/local/include $<
icontest_res.o: icontest.rc
windres -o $@ $<
icontest.exe: icontest.o icontest_res.o
g++ -o $@ icontest.o icontest_res.o -L/usr/local/lib -lfltk \
-mwindows -lgdi32 -lcomctl32 -luuid -lwsock32 -lole32
I think i have to change some setting in Codeblocks to include the resource file.
Perhaps anybody can help me...
thx