OC: Added a parameter for specifying the title of dialog created by "okoc_folder_browser"

Version: 2018b

Type: Features

Category: Programming

Subcategory: Origin C

Jira: ORG-17419

Added a new parameter "lpcszInitTitle" to the OC function okoc_folder_browser, and the new parameter is used to specify the title of dialog box, now the function is:

int okoc_folder_browser(LPCSTR lpcszInitDir, StringArray* saFolders, LPCSTR lpcszInitTitle)

The new parameter "lpcszInitTitle" is used to specify the title of dialog box, and its default value is NULL.


#include <Origin.h>
#include <okocUtils.h>
void folder_browser_ex1()
	vector<string> vsFolders;
	int nRet = okoc_folder_browser("C:\\test", &vsFolders,"Folder browser");
	printf("%d folders selected!\n", nRet);
	for ( int ii = 0; ii < nRet; ii++ )
			printf("Folder%d: %s\n", ii + 1, vsFolders[ii]);