The display of the filter combo box in the file open dialog of FDD and HDD on Windows (VS2019 build) was fixed.
I happened to find it and it seemed relatively easy to fix, so I fixed it.
Problem
The filter combo box looked like this.
Cause
There was a problem with the value set to lpstrFilter in the OPENFILENAMEW structure. The filter name and wildcards are separated by '|'. The right delimiter is '\0'.
Changes
I added a process to convert '|' to '\0' in the filter string after conversion to ucs2.
The array for the converted value from utf8 to ucs2 was too small, so I used calloc to allocate memory dynamically.
I needed the number of characters after conversion to ucs2 in 2., so I used codecnv_utf8toucs2() to get the number of characters.So I changed codecnv_utf8toucs2() to get the number of characters.
Windows(VS2019 build)でFDDやHDDのファイル選択ダイアログでフィルターコンボボックスの表示がおかしいのを改修してみたした。
たまたま見つけて比較的簡単に直せそうだったので直してみました。
不具合
フィルターコンボボックスがこのようになっていました。
原因
OPENFILENAMEW構造体のlpstrFilterに設定する値に問題があった。フィルター名とワイルドカードの区切りが'|’になっていた。区切りは'\0'が正しい。
変更点
ということで、よろしくお願いします。
↓英訳。相変わらず翻訳ツールの力を結構借りてます💦
The display of the filter combo box in the file open dialog of FDD and HDD on Windows (VS2019 build) was fixed.
I happened to find it and it seemed relatively easy to fix, so I fixed it.
Problem
The filter combo box looked like this.
Cause
There was a problem with the value set to lpstrFilter in the OPENFILENAMEW structure. The filter name and wildcards are separated by '|'. The right delimiter is '\0'.
Changes