Help us understand the problem. What is going on with this article?

C++ Builder XE4 > TOpenDialog (TSaveDialog) のOptions > ソースでの指定の仕方

More than 1 year has passed since last update.
動作環境
C++ Builder XE4

関連

不明だった点

  • ofOverwritePromptをソースで指定する書き方

参考

SaveDialog1->Options << ofOverwritePrompt << ofCreatePrompt;

<<を使うようです。

実装

Unit1.cpp
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    SaveDialog1->Options << ofOverwritePrompt;

    if (SaveDialog1->Execute() == false) {
        return;
    }

    // ここにファイル指定時の処理を書く
}
//---------------------------------------------------------------------------

不明点

<<の意味

A. 既存のものを消して設定
B. 既存のものに加えて設定

既存のもの
- ofHideReadOnly
- ofEnableSizing

動作結果からかんがみると、「B. 既存のものに加えて設定」である気はします。
(サイズ変更ができた、という理由から)

その他関連

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away