Code: Select all
HB_SetCodePage("UTF8")
HB_CDPSELECT("UTF8")
//
FW_SetUnicode(.T.)
cIniDir:="c:/temp/中文目錄"
cTmpDir := AllTrim( cGetDir( "請選擇圖片存放路徑", cIniDir, .T. ))
Title is ugly code!!
Code: Select all
HB_SetCodePage("UTF8")
HB_CDPSELECT("UTF8")
//
FW_SetUnicode(.T.)
cIniDir:="c:/temp/中文目錄"
cTmpDir := AllTrim( cGetDir( "請選擇圖片存放路徑", cIniDir, .T. ))
Code: Select all
#include "FiveWin.ch"
#define BIF_NONEWFOLDERBUTTON 0x200
#define BIF_RETURNONLYFSDIRS 0x0001
#define BIF_DONTGOBELOWDOMAIN 0x0002
#define BIF_STATUSTEXT 0x0004
#define BIF_RETURNFSANCESTORS 0x0008
#define BIF_EDITBOX 0x0010
#define BIF_VALIDATE 0x0020
#define BIF_NEWDIALOGSTYLE 0x0040
#define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
#define BIF_BROWSEINCLUDEURLS 0x0080
#define BIF_BROWSEFORCOMPUTER 0x1000
#define BIF_BROWSEFORPRINTER 0x2000
#define BIF_BROWSEINCLUDEFILES 0x4000
#define BIF_SHAREABLE 0x8000
#define MAX_PATH 260
FUNCTION Main()
LOCAL cTitle, cPath, cCarpDest, cPathDest
cTitle := "Seleccione Carpeta"
cPath := GETCURDIR()
cCarpDest := "Seleccione la carpeta donde copiar las novedades"
cPathDest := cGetDir( cTitle, cPath,, cCarpDest, ;
BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + ;
BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )
IF .NOT. EMPTY( cPathDest )
? cPathDest
ENDIF
RETURN NIL
Sorry!! I test it and still fail.karinha wrote:As I don't understand Chinese, try this model.
Regards, saludos.Code: Select all
#include "FiveWin.ch" #define BIF_NONEWFOLDERBUTTON 0x200 #define BIF_RETURNONLYFSDIRS 0x0001 #define BIF_DONTGOBELOWDOMAIN 0x0002 #define BIF_STATUSTEXT 0x0004 #define BIF_RETURNFSANCESTORS 0x0008 #define BIF_EDITBOX 0x0010 #define BIF_VALIDATE 0x0020 #define BIF_NEWDIALOGSTYLE 0x0040 #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX) #define BIF_BROWSEINCLUDEURLS 0x0080 #define BIF_BROWSEFORCOMPUTER 0x1000 #define BIF_BROWSEFORPRINTER 0x2000 #define BIF_BROWSEINCLUDEFILES 0x4000 #define BIF_SHAREABLE 0x8000 #define MAX_PATH 260 FUNCTION Main() LOCAL cTitle, cPath, cCarpDest, cPathDest cTitle := "Seleccione Carpeta" cPath := GETCURDIR() cCarpDest := "Seleccione la carpeta donde copiar las novedades" cPathDest := cGetDir( cTitle, cPath,, cCarpDest, ; BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + ; BIF_USENEWUI + BIF_NONEWFOLDERBUTTON ) IF .NOT. EMPTY( cPathDest ) ? cPathDest ENDIF RETURN NIL
There are two problems!!Natter wrote:you can try this
cDirTmp:=OemToAnsi(HB_UTF8ToStr(cGetDir()))
Code: Select all
? cGetDir( "", cInitDir, nil, "請選擇圖片存放路徑" )
// cInitDir can not contain Unicode characters"
Code: Select all
local cTitle := "請選擇圖片存放路徑"
? cGetDir( cTitle, cInitDir, nil, cTitle + " 中文目錄" )
Give me some rewards, ex: free update once!nageswaragunupudi wrote:Can you please share with us how did you solve this problem?