If lpstrTitle is NULL, set it to either 'Open File' or 'Save as'.
Constify the string constants.
This commit is contained in:
parent
48eae0bbe8
commit
85cad2cdbb
|
@ -84,8 +84,6 @@ static HICON hFloppy = 0;
|
||||||
static HICON hHDisk = 0;
|
static HICON hHDisk = 0;
|
||||||
static HICON hCDRom = 0;
|
static HICON hCDRom = 0;
|
||||||
static HICON hNet = 0;
|
static HICON hNet = 0;
|
||||||
static char defaultopen[]="Open File";
|
|
||||||
static char defaultsave[]="Save as";
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* FileDlg_Init [internal]
|
* FileDlg_Init [internal]
|
||||||
|
@ -971,8 +969,8 @@ void FILEDLG_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open
|
||||||
str = ofnA->lpstrTitle;
|
str = ofnA->lpstrTitle;
|
||||||
else
|
else
|
||||||
/* Allocates default title (FIXME : get it from resource) */
|
/* Allocates default title (FIXME : get it from resource) */
|
||||||
str = open ? defaultopen:defaultsave;
|
str = open ? "Open File" : "Save as";
|
||||||
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpstrTitle);
|
RtlCreateUnicodeStringFromAsciiz (&usBuffer,str);
|
||||||
ofnW->lpstrTitle = usBuffer.Buffer;
|
ofnW->lpstrTitle = usBuffer.Buffer;
|
||||||
ofnW->Flags = ofnA->Flags;
|
ofnW->Flags = ofnA->Flags;
|
||||||
ofnW->nFileOffset = ofnA->nFileOffset;
|
ofnW->nFileOffset = ofnA->nFileOffset;
|
||||||
|
|
Loading…
Reference in New Issue