Carlos Luna schrieb:
>
> Hi. I´ve found a problem when using Fl_PNG_Image. In my app, I use this
> simple line:
> Fl_PNG_Image imagen2("Gentoo-small.png");
> to load an image. The .png file is in the same folder as the .exe file. When
> both filesare in, say:
> D:\Tzarls\Cpp\Fl_OpDesk\Fl_OpDesk\zzz
> everything works ok. But if I add one character to the above path, like this:
> D:\Tzarls\Cpp\Fl_OpDesk\Fl_OpDesk\zzzz
> (one extra "z" at the end) then the app slows down to a crawl (unusable). But
> if in my app´s code I change that line to:
> Fl_PNG_Image
> imagen2("D:\\Tzarls\\Cpp\\Fl_OpDesk\\Fl_OpDesk\\zzzz\\Gentoo-small.png");
> Then it works ok.
> I´m using FLTK 1.3 and Windows XP, MSVC 2008.
This is not a FLTK problem, not even a problem, but you found the fact,
that a backslash is a special sign for C++. If you want to enter a
backslash, you need to enter "\\", because the backslash starts special
signs like "\t" for tabulator, or "\n" for new line, "\l" for linefeed
and so on.
For WinXP you also can use "/" inside of paths, so it might be easier
for you to enter your paths like
"D:/Tzarls/Cpp/Fl_OpDesk/Fl_OpDesk/zzzz/Gentoo-small.png", but when
merging paths this can cause mixed slashes.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk