Home > Software engineering >  CFile: : modeWrite | CFile: : modeCreate
CFile: : modeWrite | CFile: : modeCreate

Time:10-02

CFile dibFile (filename, CFile: : modeWrite | CFile: : modeCreate);
The second parameter here why written CFile: : modeWrite | CFile: : modeCreate? Don't understand is what meaning, give advice or comments please ~

CodePudding user response:

https://msdn.microsoft.com/en-us/library/cz0a83sb (v vs. 80). Aspx

CodePudding user response:

File if you do not create creates if existing can not create the write behind yao is to write operation

CodePudding user response:

The class CFile: public CObject
{
DECLARE_DYNAMIC (CFile)

Public:
//Flag values
Enum OpenFlags {
X0000 modeRead=0,
X0001 modeWrite=0,
X0002 modeReadWrite=0,
X0000 shareCompat=0,
X0010 shareExclusive=0,
X0020 shareDenyWrite=0,
X0030 shareDenyRead=0,
X0040 shareDenyNone=0,
X0080 modeNoInherit=0,
ModeCreate=0 x1000,
ModeNoTruncate=0 x2000,
TypeText=0 x4000,//typeText and typeBinary are 2 in
TypeBinary=(int) 0 x8000//derived classes only
};

Enum Attribute {
Normal=0 x00,
ReadOnly=0 x01,
Hidden=0 x02,
System=0 x04,
Volume=0 x08,
The directory=0 x10,
Archive=0 x20
};

Enum SeekPosition {the begin=0 x0, current=0 x1, end=0 x2};

Enum {hFileNull=1};

CFile definition is enumerated

CodePudding user response:

refer to the second floor SWWLLX response:
file if you do not create creates if existing can not create the write behind yao is to write inside the

CodePudding user response:

CFile: : modeCreate Directs the constructor to create a new file. If the file exists already, it is truncated to 0 length. Create a new file, If the file already exists, it will be truncated to 0 length
CFile: : modeWrite Opens the file for writing only.

CodePudding user response:

Please refer to the MSDN documentation ~
  • Related