#include <origin.h>
#include <GetNBox.h>
#include <xfutils.h>


//put additional include files here

//put your own support static functions here



void dlgPath(string& path, const string& title, const string& init, const int& showfiles)
{
	
	string strStartPath = init;
	char szNewPath[MAX_PATH];
	string strTitle = title;
	if(strTitle.IsEmpty())
		///Cheney 2007-7-2 UPDATE_XF_ERR_THROW
		//strTitle = _L("Please choose a folder");
		ocu_load_msg_str(XF_DLGPATH_CHOOSE_FOLDER, &strTitle);
		///end UPDATE_XF_ERR_THROW
	
	int nRet = browse_get_path_dialog(NULL, szNewPath, strStartPath, strTitle, showfiles);
	if(IDOK == nRet)
	{
		path = szNewPath;
		return;
	}
	
	///Cheney 2007-5-30 UPDATE_XF_ERR_THROW
	//throw(XFERR_UI_USER_CANCEL);
	XF_THROW(XFERR_UI_USER_CANCEL);
	///end UPDATE_XF_ERR_THROW
	
}

//nGetNDialog = 0,1,2, corresponding to the XF GetN dropdown, 0 = dialog is not used
//you can change nRet to be one of XFEVT_PROCEED (defualt), XFEVT_ABORT, XFEVT_PROCEED_NO_DLG or XFEVT_PROCEED_WITH_DLG(when nGetNDialog = 0)
//nGetNDialog = -1 when Ok on GetN dialog to allow handler to preocess <auto> etc variables
//dwCntrl is combination of bits
//LTXF_FROM_GUI_MENU, LTXF_FROM_GUI_PROMPT, LTXF_FROM_AUTO_UPDATE, LTXF_FROM_FUNCTION, LTXF_THEME_USED, LTXF_CHANGE_PARAM
void dlgPath_before_execute(TreeNode& trGetN, int nGetNDialog, int& nRet, int dwCntrl)
{

}
