Haruyuki Mohri

毛利春幸のブログです。

It seems use the GetFirstWeekday instead of C++Builder 10 Seattle in GetLocaleFirstDayOfWeek.

GetLocaleFirstDayOfWeek is deprecated.

A new method called GetFirstWeekday has been added. in 10 Seattle

I tried to use.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
    _di_IFMXLocaleService ps;
    ps = TPlatformServices::Current->GetPlatformService(__uuidof(IFMXLocaleService));

    int week = ps->GetFirstWeekday();

    switch (week) {
    case 7:
        Caption = L"In Japan, Sunday is the beginning.";
        break;
    default:
        ;
    }


}
//---------------------------------------------------------------------------

f:id:mojeld:20150903180104p:plain

Reference

qiita.com FMX.Platform.IFMXLocaleService.GetFirstWeekday - RAD Studio API Documentation