On 18.01.2011, at 15:14, Paul R wrote:

> The program only runs from args when a file is double clicked or if the user 
> know about such things 'dragged and dropped' onto the exe,
> both of which things result in argc = 2, any higher and i have fails in 
> place, argc = 1 is ignored as i am using the GetModuleFileName (i think
> thats what it was called) now.
>
> The thing is aside from the error pop up, using show->(argc, argv) threw
> up a bug regarding file loading or memeory allocation (based on file
> data loaded) somwhere in the program, which i was about to trace until
> i found that it was due to ->show(argc,argv).
> i say 'due to' i mean that all my file loading and parsing is now
> structured without those parameters in mind directly so i will have to
> go and rewind the command line stuff a-g-a-i-n if i include it!
> either that or risk no icons i suppose.

There are also other reasons to use show(argc,argv) for the *first*
window shown, e.g. loading of system colors and such.

But (and this is untested) you can always show your first window
with

   win->show(1, argv);  // note: argc is 1

or even set up your own argument vector, thus losing all FLTK default
switches, but if you don't care... Note that this is untested, but
it should work IMHO.

Albrecht
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to