我自己修改完成!!
代碼: 選擇全部
// 測試 cGetDir()
#include "fivewin.ch"
Func Main()
local oDlg
local oDir, cDir := space(256)
FW_SetUnicode( .T. )
DEFINE DIALOG oDlg size 400, 200 pixel title "cGetDir Test" ;
COLOR CLR_WHITE, CLR_CYAN
@ 12, 5 SAY "Directory:" OF oDlg size 60, 12 pixel transparent
@ 10,35 get oDir var cDir of oDlg size 100, 12 pixel UPDATE
@ 10,136 BUTTON "&Sel" SIZE 20,11 PIXEL OF oDlg;
ACTION SelDir(oDlg, oDir, @cDir)
@ 60,40 BUTTON "OK" SIZE 50,12 PIXEL OF oDlg;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
Function SelDir(oDlg, oDir, cDir)
Local cTitle := "請選擇目錄(龍礱咙)"
Local cInitDir:= cDir
Local cTmpDir := AllTrim( cGetDir( cTitle, cInitDir ))
If ! Empty( cTmpDir )
cDir := cTmpDir
oDlg:UpDate()
EndIf
RETURN NIL
![圖檔](http://www4.zzz.com.tw/phpBB3/download/cGetDir-2020.09.04-error.gif)
修改後:
![圖檔](http://www4.zzz.com.tw/phpBB3/download/cGetDir-2020.09.04-ok.gif)
兩者最大差異處:
![圖檔](http://www4.zzz.com.tw/phpBB3/download/cGetDir-2020.09.04-1.jpg)