Ok, here´s some example code showing the situation. The problem is that you
probably won´t be ableto use it because there´s an specific class that seems to
be related to the problem that isn´t part of fltk,but it´s a class I made based
on Greg Ercolano´s Fl_OpDesk. Nevertheless, please check the code,because I´m
very confident that the problem is not in my class, based on the behaviour of
the problem.
#include <stdio.h>#include <string.h>#include <FL/Fl.H>#include
<FL/Fl_Double_Window.H>//#include <FL/Fl_Scroll.H>#include <FL/Fl_PNG_Image.H>
// Test the Fl_OpDesk widget
#include "Fl_OpDesk.H"#include "Fl_OpBox.H"#include "Fl_OpButton.H"
int main() {
// If I specify the whole path for each image, everything works ok
Fl_PNG_Image imagen("D:\\Tzarls\\Cpp\\Fl_OpDesk\\Fl_OpDesk\\Release\\mas.png");
Fl_PNG_Image
imagen2("D:\\Tzarls\\Cpp\\Fl_OpDesk\\Fl_OpDesk\\Release\\Gentoo-small.png");
// Comment out previous lines and uncomment these two lines; app won´t
work anymore, // (unless you change the .exe file and the images to a folder
with a shorter path name) //Fl_PNG_Image imagen("mas.png");
//Fl_PNG_Image imagen2("Gentoo-small.png"); Fl_Double_Window *win = new
Fl_Double_Window(720,486);
// ... but if you comment all previous 4 Fl_PNG_Image lines and
uncomment these two, // effectively placing them after the double window, it
works again. //Fl_PNG_Image imagen("mas.png"); //Fl_PNG_Image
imagen2("Gentoo-small.png");
Fl_Group *g = new Fl_Group(10,10,win->w()-20,win->h()-20);
g->box(FL_DOWN_BOX);
const int deskw = 1500; const int deskh = 1500;
// This is a class of mine (actually, a class made by Greg Ercolano).
Weird thing is that, if I remove //the following line, then the app will work
ok no matter which one of the previous options you choose... Fl_OpDesk
*opdesk = new Fl_OpDesk(g->x() + 2,g->y() + 2,g->w()-4,g->h()-4);
// Yes, you could say that the problem is inside the Fl_OpDesk class,
but if that was the case, // then why by just changing the folder of a
non-working version of the app it would start working again? // BTW,
every option works perfectly when running the debug app. The problem appears
only for releases.
g->end(); win->resizable(g);
Fl::scheme("gtk+");
win->show(); return(Fl::run());}
If needed, I can provide the files for the OpDesk class, but again, I really
think the problem isn´t there.
Thanks,
Carlos Luna
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk