How to use mapkey

void MarcoAdd(CString txt)
{
	TCHAR mytxt[256];
	wsprintf(mytxt,_T("mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `%ws.gph`"),txt);
	ProMacroLoad(_T("mapkey(continued) ~ Activate `udf_place_insert_dialog` `ok_but`;"));
	ProMacroLoad(_T("mapkey(continued) ~ Activate `udf_place_insert_dialog` `create_onsurf_csys_chk_but` 1"));
	ProMacroLoad(_T("mapkey(continued) ~ Activate `udf_place_insert_dialog` `show_refpart_chk_but` 1"));

	//for proe5.0
	ProMacroLoad(_T("mapkey(continued) ~ Activate `file_open` `Open`;"));
	//for creo2.0
	ProMacroLoad(mytxt);
	ProMacroLoad(_T("~ Command `ProCmdUserDefined`"));
	return ;
}


void MarcoAdd2(CString txt)
{
	TCHAR mytxt[256];
	wsprintf(mytxt,_T("mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `%ws.gph`"),txt);

	ProMacroLoad(_T("mapkey(continued) ~ Activate `udf_place_insert_dialog` `ok_but`"));
	ProMacroLoad(_T("mapkey(continued) ~ Activate `udf_place_insert_dialog` `show_refpart_chk_but`1"));

	ProMacroLoad(_T("mapkey(continued) ~ Activate `file_open` `Open`;"));

	ProMacroLoad(mytxt);
	ProMacroLoad(_T("~ Command `ProCmdUserDefined`"));
	return;
}


你可能感兴趣的:(MFC,CREO2.0)