delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/08/30/16:45:14

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Georg <dosusb AT googlemail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: FLTK port
Date: Tue, 30 Aug 2011 13:39:24 -0700 (PDT)
Organization: http://groups.google.com
Lines: 18
Message-ID: <6c459eab-ee51-4817-87a7-a4d6249857fd@w28g2000yqw.googlegroups.com>
References: <1047e21a-1d65-41c9-81f8-81b87adce27a AT en1g2000vbb DOT googlegroups DOT com>
<c3ac2610-1b7a-456a-8e37-680b495e8b13 AT v7g2000vbk DOT googlegroups DOT com>
<5afb5e6f-15e3-41fd-a2fc-62407c833543 AT d25g2000yqh DOT googlegroups DOT com>
<3125f3c0-bbaa-4c9a-9195-1936845c4a14 AT y4g2000vbx DOT googlegroups DOT com>
<51e16608-a8ab-4cd8-a54d-67f3d40673ee AT m38g2000vbn DOT googlegroups DOT com> <2a139156-6c1d-4de9-9383-923d705e7707 AT fv14g2000vbb DOT googlegroups DOT com>
NNTP-Posting-Host: 92.250.191.164
Mime-Version: 1.0
X-Trace: posting.google.com 1314736764 898 127.0.0.1 (30 Aug 2011 20:39:24 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Tue, 30 Aug 2011 20:39:24 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: w28g2000yqw.googlegroups.com; posting-host=92.250.191.164; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr
User-Agent: G2/1.0
X-HTTP-Via: 1.1 TAS-4-2.man-a
X-Google-Web-Client: true
X-Google-Header-Order: UALSERCVNKH
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4)
Gecko/20091016 Firefox/3.5.4,gzip(gfe)
Bytes: 2025
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi Rugxulo,

thank you for your hint to memmove. FLTK allows to set the default
directory when calling the FL_File_Chooser widget and this way I can
set it to a path without drive. That seems to work now. The rest of
the code is taken from the getcwd example.

  char *cwdbuf = (char *)malloc(FL_PATH_MAX);
  if (cwdbuf && getcwd(cwdbuf, FL_PATH_MAX))
  {
    memmove(cwdbuf, cwdbuf+2, FL_PATH_MAX-2);
	fnfc.directory(cwdbuf);
	free(cwdbuf);
  }

Regards

Georg

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019