Percy wrote:
> I have 2 problems with using Fl_Native_File_Chooser on Windows 7 (VS2008):
> 
> 1) I include Fl_Native_File_Chooser_FLTK.H but it includes a header
> file called unistd.h (which is apparently for linux). I commented
> this out and it compiled fine after that.

        Hmm, you should only be including Fl_Native_File_Chooser.H,
        not Fl_Native_File_Chooser_FLTK.H.

> 2) After opening the file chooser like this:
> Fl_Native_File_Chooser FileChooser( Fl_Native_File_Chooser::BROWSE_FILE );
> if ( FileChooser.show() != 0 ) return;
> The program crashes right after the file chooser dialog closes. According to 
> visual studio:
> "Stack around the variable 'FileChooser' was corrupted"
> Am I doing something wrong?

        Does the test program test/native-filechooser work for you?
        Compare your code to that to see what might be wrong.

        Hard to tell from the above, would need to see more
        of your code.

        Just a suggestion: to avoid naming confusion/collisions
        between class names and variable names, it's best to use
        different casing style for variable names, eg:

                Fl_Native_File_Chooser filechooser(..)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to