Re: Current Working Directory

2005-08-17 Thread Tor Lillqvist
Nick Watts writes: > How can I set the cwd to the path my app is in? Do you mean the process's working directory, or the file selector's default directory? I'll answer the former. char buffer[1000]; char *app_dir; GetModuleFileName (NULL, buffer, sizeof (buffer));

Re: Current Working Directory

2005-08-17 Thread Iago Rubio
On Wed, 2005-08-17 at 16:57 +1000, Nick Watts wrote: > Writing a GTK app under win32. When I use "Open With" to open > a file with my app, the current working directory is the one the file > is in rather than the one my app is in. > > How can I set the cwd to the path my app is in? On installat

Re: Current Working Directory

2005-08-17 Thread BenoƮt Touron
Nick, Use GetCommandLine and extract the path your app is in (might be a bit tricky though). Use SetCurrentDirectory to change the current dir. Ben Writing a GTK app under win32. When I use "Open With" to open a file with my app, the current working directory is the one the file is in rathe