#include <origin.h>
#include <GetNBox.h>
#include <xfutils.h>
//put additional include files here
//------ Folger 09/07/07 SMART_LOADING_SUPPORT
#ifdef _FOR_SMART_LOADING_ONLY
#include <..\originlab\nlsf_utils.h>
#endif //_FOR_SMART_LOADING_ONLY
//------ End SMART_LOADING_SUPPORT

/// Max 8/26/09 v8.1084-3 CODE_IS_MOVED_TO_BODY_BUT_TRACKER_14105_MAKE_BEFORE_EXECUTE_VISIBLE
/// Kyle 08/28/2009 QA80-14216 TRANSFER_USER_FILES_ADD_OLD_VERSION_CONTROL


//put your own support static functions here

typedef BOOL (*FUNC_HWND)(HWND hParent = NULL);


void updateUFF()
{
	///Kyle 08/28/2009 QA80-14216 TRANSFER_USER_FILES_ADD_OLD_VERSION_CONTROL, no need to check the version
	/*
	string strPrevVerPath;// = okutil_get_origin_path(ORIGIN_PATH_USER_PREV_VER);	
	if (!get_origin75_user_path(strPrevVerPath))
	{
		int nErrCode = XFERR_NO_PREVIOUS_VERSION_FOUND;
		warning_msg_box(nErrCode, NULL, false, 'E', false);
	}
	else
	*/
	///End TRANSFER_USER_FILES_ADD_OLD_VERSION_CONTROL
	{
		string strPath = "OriginLab\\GroupFolderManager.c";
		FUNC_HWND pfn = Project.FindFunction("OpenTransferUserFiles", strPath);
		if (pfn)
			pfn();
	}
}

//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 updateUFF_before_execute(TreeNode& trGetN, int nGetNDialog, int& nRet, int dwCntrl)
{
	/// Max 8/26/09 v8.1084-3 CODE_IS_MOVED_TO_BODY_BUT_TRACKER_14105_MAKE_BEFORE_EXECUTE_VISIBLE
	/*
	string strPrevVerPath = okutil_get_origin_path(ORIGIN_PATH_USER_PREV_VER);
	if (strPrevVerPath.IsEmpty())
	{
		int nErrCode = XFERR_NO_PREVIOUS_VERSION_FOUND;
		warning_msg_box(nErrCode, NULL, 1, false, 'E', false);
	}
	else
	{
		string strPath = "OriginLab\\GroupFolderManager.c";
		FUNC_HWND pfn = Project.FindFunction("OpenTransferUserFiles", strPath);
		if (pfn)
			pfn();
	}
	*/
	/// ---
}
