CGXGridParam::CreateFromFile
static CGXGridParam* CreateFromFile(LPCTSTR lpszFileName);
lpszFileName
Points to a zero-terminated string with the file name.
Return Value
A pointer to the allocated object; NULL if an object of the given runtime class could not be found in the file.
Remarks
The CGXGridParam::CreateFromFile and CGXGridParam::CreateFromResource methods allow you to load the layout into the grid either from a file or from a binary resource.
Both APIs create a parameter object which you can attach to the grid by calling the grid’s SetParam() method. If the runtime class of the object stored in the given file does not match CGXGridParam, the method will not read the object and return NULL.
See CGXGridParam::CreateFromResource for information on what the OnInitialUpdate routine of your grid class would look like if you want to load the layout of the grid at run time.
Objective Grid Designer allows you design the layout of a grid and save this layout into a file. This layout can be loaded into your grid with CGXGridParam::CreateFromFile and CGXGridParam::CreateFromResource.
The CGXGridParam::WriteToFile method also lets you create such a layout file.
See Also
CGXGridParam::CreateFromResource CGXGridCore::SetParam CGXGridParam::WriteToFile