Skip to content

Commit

Permalink
OPENFILENAME functions: Write nFileOffset and nFileExtension.
Browse files Browse the repository at this point in the history
EditDisk actually reads those.
  • Loading branch information
nmlgc committed Jun 22, 2015
1 parent 16f7b87 commit aa5b4ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/comdlg32_dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ static BOOL WrapOFN(

if(ofn_a->lpstrFile) {
StringToUTF8(ofn_a->lpstrFile, ofn_w->lpstrFile, ofn_a->nMaxFile);
ofn_a->nFileOffset = WideCharToMultiByte(
CP_UTF8, 0, ofn_w->lpstrFile, ofn_w->nFileOffset, NULL, 0, NULL, NULL
);
ofn_a->nFileExtension = WideCharToMultiByte(
CP_UTF8, 0, ofn_w->lpstrFile, ofn_w->nFileExtension, NULL, 0, NULL, NULL
);
}
if(ofn_a->lpstrFileTitle) {
StringToUTF8(ofn_a->lpstrFileTitle, ofn_w->lpstrFileTitle, ofn_a->nMaxFileTitle);
Expand Down

0 comments on commit aa5b4ec

Please # to comment.