動作環境
RAD Studio 10.2 Tokyo Update 3
Windows 10 Pro (64bit) バージョン 1803 (April 2018 Update)
index from 1
Set FilterIndex to 1 to choose the first file type in the list as the default, or set FilterIndex to 2 to choose the second file type as the default, and so forth.
一つ目の項目を選択するためには「1」をFilterIndex に代入する。
C++ではインデックスは0始まりのため、この点はOff-by-one errorにつながりそう。
delphiのString > index from 1
C++ BuilderはDelphiの実装がベースであると認識している。
Delphiの実装に基づき1始まりのインデックスなのだろうか。
下記を見つけた。
https://stackoverflow.com/questions/1143340/how-to-get-the-first-element-in-a-string
answered Jul 17 '09 at 13:41
Ondrej KelleStrings are 1-based:
FilterIndex が使われるのはStringではなくて、StringListだろう。
そちらも1-basedになっているようだ。