• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetInst函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetInst函数的典型用法代码示例。如果您正苦于以下问题:C++ GetInst函数的具体用法?C++ GetInst怎么用?C++ GetInst使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetInst函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetInst

bool CREvent::OnCreateRoleBtn(const CEGUI::EventArgs &e)
{
	if (GetInst(SelectRolePage).GetPlayerCount() >= 1)
	{
        GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("Base_34"));   //目前不能创建更多的角色了!
		return false;
	}
	CEGUI::Window *pPageWin = GetInst(CreateRolePage).GetPageWindow();
	CEGUI::Editbox* pNameEdit = static_cast<CEGUI::Editbox*>(pPageWin->getChild("EditName"));

	const char * strName = CEGUIStringToAnsiChar(pNameEdit->getText());
	if (strcmp(strName,"") == 0)
	{
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("Player_72"));  //"名字不能为空"
		return false;
	}
	if (!CheckName(strName))
	{
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("Player_73"));  //"名字中不能有空格"
		return false; 
	}
	int  iSex  = random(2);
	//RandomChoseDetails();
	//RandomChoseCountry();
	BYTE lConstellation = random(12) + 1;
	//const char *strName,char nOccupation, char nSex, BYTE lHead, BYTE lFace, BYTE lCountry,BYTE lConstellation,BYTE bRandCountry
	GetGame()->C2L_AddRole_Send(strName, 0, (char)GetSelectSex(), GetHair(), GetFace(), GetSelectCountry(), lConstellation, 0 );
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:29,代码来源:CreateRoleEvent.cpp


示例2: GetInst

	bool CQuestionManager::Startup()
	{
		if( !GetInst( CConfiger ).IsEnable() )
		{
			return false;
		}

		// create events
		m_Events[ET_QUIT] = ::CreateEvent( NULL, FALSE, FALSE, NULL );
		m_Events[ET_GEN] = ::CreateEvent( NULL, FALSE, FALSE, NULL );

		// create the mutex
		::InitializeCriticalSection( &m_QuesMutex );

		// startup update questions timer 
		int updateInterval = 1000 * GetInst( CConfiger ).GetSystem().UpdateQuestionInterval;
		m_UpdateTimer = m_Timer.Schedule( this, NULL, timeGetTime() + updateInterval, updateInterval );

		// generate questions at startup in the main thread.
		m_pQuestions = GenQuestions();

		// create the thread
		m_Thread = (HANDLE)::_beginthreadex( NULL, 0, threadFunc, this, 0, NULL );

		return true;
	}
开发者ID:yuanxiubin1128,项目名称:mmo-resourse,代码行数:26,代码来源:QuestionManager.cpp


示例3: OpenSaleUI

bool OpenSaleUI()
{
	CEGUI::WindowManager& wndmgr = GetWndMgr();
	//获取出售订单ID
	CEGUI::MultiColumnList* mcl = WMCL(wndmgr.getWindow("Auction/Tab/BuySale/BuyMCL"));
	if(!mcl)
		return false;
	CEGUI::ListboxItem* lbi = mcl->getFirstSelectedItem();
	if(!lbi)
	{
		//MessageBox(g_hWnd,AppFrame::GetText("AU_100"),"ERROR",MB_OK);
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_100"),NULL,NULL,true);
		return false;
	}

	CEGUI::Window* wnd = wndmgr.getWindow("Auction/SaleWnd");
	wnd->setVisible(true);
	wnd->setAlwaysOnTop(true);
	CEGUI::Editbox* editbox = WEditBox(wnd->getChildRecursive("Auction/SaleWnd/saleNum"));//出售界面编辑框激活
	editbox->activate();

	AHdata& ah = GetInst(AHdata);
	uint ID = lbi->getID();
	ah.SetCanSaleID(ID);
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:26,代码来源:Auction.cpp


示例4: GetInst

//添加任务奖励
void CEncouragement::OnBnClickedButton1()
{
	POSITION   pos   =   m_EncouragementList.GetFirstSelectedItemPosition();
	int ItemNum = m_EncouragementList.GetNextSelectedItem(pos);
	if (ItemNum<0)
	{
		ItemNum = 0;
	}
    CXmlEdit::MapTextFileTable::iterator  MapIter = GetInst(CXmlEdit).m_AllQuestTextFile.find( m_Textfile);
    if ( MapIter != GetInst(CXmlEdit).m_AllQuestTextFile.end() )
    {
        MapIter->second[ "Q" ] = ":";
    }
    else
    {
        return ;
    }

    m_TextIndex.SetWindowText("Q");
    m_TextContext.SetWindowText("");

    ReadRoleEncouragement( &m_Textfile );
    m_EncouragementList.EnsureVisible( 0 , FALSE );
    m_EncouragementList.SetItemState(  0 , LVIS_SELECTED|LVIS_FOCUSED,LVIS_SELECTED|LVIS_FOCUSED);
    m_EncouragementList.SetFocus();
    m_EncouragementList.SetSelectedColumn(0);
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:28,代码来源:CEncouragement.cpp


示例5: OnReturnCharSel

bool OnReturnCharSel(const CEGUI::EventArgs &args)
{
	// 玩家有队伍发送离开队伍消息
	TeamMsgMgr& mgr = GetInst(TeamMsgMgr);
	mgr.SendSelfLeaveTeam();
    CMessage msg(MSG_C2S_OTHER_QUITTOSELECT);
    msg.Send();
    GetInst(UIManager).CloseAllPage();
    return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:10,代码来源:GameExit.cpp


示例6: timeGetTime

    void SkillTracer::Init(long id, long lvl, const CGUID &target, ulong traceTime)
    {
        m_SkillID  = id;
        m_SkillLvl = lvl;
        m_TargetID = target;
        m_EndTime = timeGetTime() + traceTime;

        m_SkillMaxDis = (float)GetInst(SkillAttribute).GetStrCondif(m_SkillID,lvl, "MaxAtkDistance");
        m_SkillMinDis = (float)GetInst(SkillAttribute).GetStrCondif(m_SkillID,lvl, "MinAtkDistance");

    }
开发者ID:Caoxuyang,项目名称:klcommon,代码行数:11,代码来源:ScriptStateImpl.cpp


示例7: GetInst

DWORD IBuff::GetRemain()
{
	if( GetInst() == 0 )
		return 0;
	
	DWORD dwElapsedTime = ::timeGetTime() - GetInst();
	if( dwElapsedTime > GetTotal() )	// 남은 시간은 총 버프 시간보다 클 수 없다.
		return 0;						// 실제로 버프 제거는 시간 만료 후 다음 프로세스에서 하기 때문에 발생 가능하다.

	return GetTotal() - dwElapsedTime;
}
开发者ID:KerwinMa,项目名称:AerothFlyffSource,代码行数:11,代码来源:buff.cpp


示例8: wsprintf

void  FactionOper::RecvSetChairmanNotifyMsg(CMessage* pMsg)
{
    TCHAR	szPrompt[ 256 ];

    // 老族长 名字
    TCHAR	nameOldMaster[ MAX_MEMBER_NAME_SIZE ];
    pMsg->GetStr( nameOldMaster, MAX_MEMBER_NAME_SIZE );

    // 新族长 名字
    TCHAR	nameNewMaster[ MAX_MEMBER_NAME_SIZE ];
    pMsg->GetStr( nameNewMaster, MAX_MEMBER_NAME_SIZE );

    // 如果我是老族长
    if( ! lstrcmp( GetGame()->GetMainPlayer()->GetName(), nameOldMaster ) )
    {
        // "您已经将族长职位转让给 %s!"
        wsprintf( szPrompt, AppFrame::GetText("FA_104") , nameNewMaster );
        GetInst(MsgEventManager).PushEvent(Msg_Ok,szPrompt);

        // 修改官阶
        m_pFactionManager->SetMyJob( 0 );
    }
    // 如果我是新族长
    else if( ! lstrcmp( GetGame()->GetMainPlayer()->GetName(), nameNewMaster ) )
    {
        // "%s 任命您为 %s 的新族长!"
        wsprintf( szPrompt, AppFrame::GetText("FA_302") , nameOldMaster, m_pFactionManager->GetMyFaction()->GetName() );
        GetInst(MsgEventManager).PushEvent(Msg_Ok,szPrompt);

        // 设置作为族长的相关数据
        m_pFactionManager->SetMyJob( Exceptive_JobLvl );
    }
    // 如果是我的会友
    else if( m_pFactionManager->GetMyFaction() )
    {
        // "%s 任命 %s 为 %s 的新族长!"
        wsprintf( szPrompt, AppFrame::GetText("FA_303") , nameOldMaster, m_pFactionManager->GetMyFaction()->GetName() );
        GetInst(ChatListPage).AddChatWords(szPrompt,0xffffffff,0,0xff000000,"",CHAT_SYSTEM);
    }

    // 更新 Member 数据
    if( CFacMember* pMember = m_pFactionManager->GetMyConfrere( nameOldMaster ) )
    {
        pMember->SetJob( 0 );
    }

    if( CFacMember* pMember = m_pFactionManager->GetMyConfrere( nameNewMaster ) )
    {
        pMember->SetJob( Exceptive_JobLvl );
    }

    // 刷新界面
    FireUIEvent("FactionPage","UpdateMem");
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:54,代码来源:FactionPageOper.cpp


示例9: ShellInitDialog

void CPlayListDlg::OnInitDialog(HWND hwndDlg)
{
	m_hWnd = hwndDlg;
	ShellInitDialog(m_hWnd);

	// ツールバーの準備
	SHMENUBARINFO mbi;
	memset(&mbi, 0, sizeof(SHMENUBARINFO));
	mbi.cbSize = sizeof(SHMENUBARINFO);
	mbi.hwndParent = m_hWnd;
	mbi.nToolBarId = IDR_DUMMY;
	mbi.hInstRes = GetInst();
	SHCreateMenuBar(&mbi);
	m_hwndMB = mbi.hwndMB;

	SendMessage(m_hwndMB, TB_DELETEBUTTON, 0, 0);
	SendMessage(m_hwndMB, TB_ADDSTRING, (WPARAM)GetInst(), IDC_UP);
	SendMessage(m_hwndMB, TB_ADDSTRING, (WPARAM)GetInst(), IDC_DOWN);

	CommandBar_AddBitmap(m_hwndMB, GetInst(), IDR_PLAYLIST, 6, 16, 16);
	TBBUTTON tbbMain[] = {
		{0, IDC_ADD, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, -1},
		{1, IDC_UP, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, 0, 0, 0, 0},
		{2, IDC_DOWN, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, 0, 0, 0, 1},
		{3, IDC_DELETE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, -1},
		{4, IDC_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, -1},
		{5, IDC_CTRLKEY, TBSTATE_ENABLED, TBSTYLE_CHECK, 0, 0, 0, -1}
	};

	for (int i = 0; i < sizeof(tbbMain) / sizeof(TBBUTTON); i++) {
		CommandBar_InsertButton(m_hwndMB, i, &tbbMain[i]);
	}

	// リストの準備
	HWND hwndLV = GetDlgItem(m_hWnd, IDC_PLAY_LIST);
	ListView_SetExtendedListViewStyle(hwndLV, 
		ListView_GetExtendedListViewStyle(hwndLV) | LVS_EX_FULLROWSELECT);

	// カラムの挿入
	LVCOLUMN lvc;
	lvc.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
	lvc.fmt = LVCFMT_LEFT;
	lvc.cx = 0;
	lvc.pszText = _T("Name");
	lvc.iSubItem = 0;
	ListView_InsertColumn(hwndLV, 0, &lvc);
	
	// イメージリストを設定
	ListView_SetImageList(hwndLV, m_hImageList, LVSIL_SMALL);

	// リストを更新
	UpdatePlayList();
}
开发者ID:h16o2u9u,项目名称:rtoss,代码行数:53,代码来源:PlayListDlgPPC.cpp


示例10: ImageList_Create

CPlayListDlg::CPlayListDlg()
{
	m_fListDrag = FALSE;
	m_nDragItem = -1;

	m_hWnd = NULL;
	m_hImageList = ImageList_Create(16, 16, ILC_COLOR | ILC_MASK, 2, 2);
	HICON hIcon = LoadIcon(GetInst(), LPCTSTR(IDI_FILE_S));
	ImageList_AddIcon(m_hImageList, hIcon);
	DestroyIcon(hIcon);
	hIcon = LoadIcon(GetInst(), LPCTSTR(IDI_PLAY_S));
	ImageList_AddIcon(m_hImageList, hIcon);
	DestroyIcon(hIcon);
}
开发者ID:v-zaburdaev,项目名称:Gsplayer2,代码行数:14,代码来源:PlayListDlg.cpp


示例11: GetInst

    void FightStateScript::OnUseSkillEnd(long ret)
    {
        Script *script = GetInst(ScriptSys).GetScript(m_skillScriptID);
        if(script != NULL)
        {
            script->PushRetValue(ret);
            GetInst(ScriptSys).ResumeScript(script, 1);
        }
		else
		{
			LogError(AI_MODULE, "Get ScriptSys instance error.");
		}
        m_State = NORMAL;
    }
开发者ID:Caoxuyang,项目名称:klcommon,代码行数:14,代码来源:ScriptStateImpl.cpp


示例12: ImageList_Create

CPlayListDlg::CPlayListDlg()
{
	m_hWnd = NULL;
	m_hwndMB = NULL;
	m_fCtrlKey = FALSE;
	
	m_hImageList = ImageList_Create(SCALEX(16), SCALEY(16), ILC_COLOR | ILC_MASK, 2, 2);
	HICON hIcon = LoadIcon(GetInst(), LPCTSTR(IDI_FILE_S));
	ImageList_AddIcon(m_hImageList, hIcon);
	DestroyIcon(hIcon);
	hIcon = (HICON)LoadImage(GetInst(), (LPCTSTR)IDI_PLAY_S, IMAGE_ICON, SCALEX(16), SCALEY(16), 0);
	ImageList_AddIcon(m_hImageList, hIcon);
	DestroyIcon(hIcon);
}
开发者ID:afriza,项目名称:GSPlayer,代码行数:14,代码来源:PlayListDlgPPC.cpp


示例13: strTitle

void CEffectDlg::ShowEffectDlg(HWND hwndParent, HANDLE hMap)
{
	m_hMap = hMap;
	CTempStr strTitle(IDS_TITLE_EFFECT);

	PROPSHEETPAGE psp[4];
	memset(psp, 0, sizeof(psp));
	psp[0].dwSize = sizeof(PROPSHEETPAGE);
	psp[0].dwFlags = PSP_DEFAULT;
	psp[0].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_EQUALIZER);
	psp[0].pfnDlgProc = (DLGPROC)EqualizerProc;
	psp[0].hInstance = GetInst();
	psp[0].pszIcon = NULL;
	psp[0].lParam = (LPARAM)this;
	psp[1].dwSize = sizeof(PROPSHEETPAGE);
	psp[1].dwFlags = PSP_DEFAULT;
	psp[1].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_EFFECT);
	psp[1].pfnDlgProc = (DLGPROC)EffectProc;
	psp[1].hInstance = GetInst();
	psp[1].pszIcon = NULL;
	psp[1].lParam = (LPARAM)this;
	psp[2].dwSize = sizeof(PROPSHEETPAGE);
	psp[2].dwFlags = PSP_DEFAULT;
	psp[2].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_REVERB);
	psp[2].pfnDlgProc = (DLGPROC)ReverbProc;
	psp[2].hInstance = GetInst();
	psp[2].pszIcon = NULL;
	psp[2].lParam = (LPARAM)this;
	psp[3].dwSize = sizeof(PROPSHEETPAGE);
	psp[3].dwFlags = PSP_DEFAULT;
	psp[3].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_EFFECT_SAVE);
	psp[3].pfnDlgProc = (DLGPROC)PresetProc;
	psp[3].hInstance = GetInst();
	psp[3].pszIcon = NULL;
	psp[3].lParam = (LPARAM)this;
	
	PROPSHEETHEADER psh;
	psh.dwSize = sizeof(PROPSHEETHEADER);
	psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW | PSH_USECALLBACK;
	psh.pfnCallback = PropSheetCallback;
	psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
	psh.nStartPage = 0;
	psh.pszIcon = NULL;
	psh.pszCaption = strTitle;
	psh.hwndParent = hwndParent;
	psh.hInstance = GetInst();
	psh.ppsp = psp;
	PropertySheet(&psh);
}
开发者ID:afriza,项目名称:GSPlayer,代码行数:49,代码来源:EffectDlg.cpp


示例14: OnSaleSubmit

//提交出售请求
bool OnSaleSubmit(const CEGUI::EventArgs& e)
{
	CEGUI::WindowManager& wndmgr = GetWndMgr();
	CEGUI::Editbox* edb = WEditBox(wndmgr.getWindow("Auction/SaleWnd/saleNum"));
	AHdata& ah = GetInst(AHdata);
	//获取出售数量
	uint saleNum = CEGUI::PropertyHelper::stringToInt(edb->getText());
	uint cansaleNum = ah.GetCountByCanSaleID(ah.GetCanSaleID());
	if(saleNum == 0 || saleNum > cansaleNum )
	{
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_101"),NULL,NULL,true);
		return false;
	}
	ah.Send_AH_SEL(cansaleNum);//发送出售请求前要设置出售的订单ID
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:17,代码来源:Auction.cpp


示例15: OnBuySubmit

////提交购买请求
bool OnBuySubmit(const CEGUI::EventArgs& e)
{
	CEGUI::WindowManager& wndmgr = GetWndMgr();
	CEGUI::Editbox* edb = WEditBox(wndmgr.getWindow("Auction/Buy/buyNum"));
	AHdata& ah = GetInst(AHdata);
	//获取购买数量
	uint buyNum = CEGUI::PropertyHelper::stringToInt(edb->getText());
	uint canbuyNum = ah.GetCountByCanBuyID(ah.GetCanBuyID());
	if(buyNum== 0 || buyNum > canbuyNum)
	{
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_103"),NULL,NULL,true);
		return false;
	}
	ah.Send_AH_BUY(buyNum);//发送购买请求前要设置购买的订单ID
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:17,代码来源:Auction.cpp


示例16: GetVar

	///
	/// 取得指定列表里某个变量的值
	///
	/// luaVar = GetVar( operType, "$varName", [pos] )
	/// @param operType:VT_SCRIPT, VT_SRCSHAPE, VT_DESTSHAPE, VT_GLOBAL
	/// @param varName 变量名
	/// @param pos [可选] 数组索引,从0开始
	/// @return 变量值,如果变量不存在,则需要与各类型对应的非法值做比较:
	/// 字符串可与""比较,数字与INVALID_NUM比较,GUID与 CGUID::GUID_INVALID 做比较
	///
	static int GetVar( lua_State *L )
	{
		Script *script = GetInst( ScriptSys ).GetScript( L );
		long operType = (long) tolua_tonumber( L, 1, 0 );
		VariableList *varList = ( script != NULL ? script->GetVarList( operType ) : NULL );
		long index = (long) tolua_tonumber( L, 3, 0 );
		const char *varName = TOLUA_TOSTRING( varName, L, 2, "" );
		long varType = VarList::VarType( varName );
		if( varList == NULL )
		{
			lua_pushnumber( L, -1 );
			return 1;
		}
		if( varType == VariableList::VAR_NUM )
		{
			VariableList::Number val = varList->GetVarValue<VariableList::Number>( varName, index );
			lua_pushnumber( L, (lua_Number) val );
		}
		else if( varType == VariableList::VAR_STRING )
		{
			const tString &val = varList->GetVarValue<tString>( varName, index );
			lua_pushstring( L, val.Valid() ? val.Str() : "" );
		}
		else if( varType == VariableList::VAR_GUID )
		{
			const CGUID &val = varList->GetVarValue<CGUID>( varName, index );
            Script::PushGCGUID( L, val );
		}
		else
		{
			// argument error.
			lua_pushnumber( L, -1 );
		}
		return 1;
	}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:45,代码来源:VarListFuncs.cpp


示例17: GetGame

void Script::CallScriptByGUID(const CGUID& shapeGuid, const char* scriptFilename)
{
	CMoveShape* shape = GetGame()->FindShape(TYPE_PLAYER, shapeGuid);
	if(shape==NULL)
	{
		CServerRegion* region = dynamic_cast<CServerRegion*>(m_RunEnv.region);
		if(region != NULL)
			shape = dynamic_cast<CMoveShape*>(region->FindChildObject(TYPE_MONSTER, shapeGuid));
	}

	if(shape != NULL) // 本地调用脚本
	{
		RunEnv env;
		env.region = dynamic_cast<CRegion*>(shape->GetFather());
		env.srcShape = shape;
		GetInst(ScriptSys).RunScript(env, scriptFilename);
	}
	else // 跨服调用脚本
	{
		CMessage msg(MSG_S2W_QUEST_PlayerRunScript);
		msg.Add(shapeGuid); // call guid
		msg.Add(scriptFilename);	 // called script name
		msg.SendToSocket(GetGame()->GetWSSocket());
	}
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:25,代码来源:ScriptRgnFunc.cpp


示例18: GetInst

	void CShop::OnPlayerConformSellMsg( CMessage *pMsg, const CGUID &npcID )
	{
		CPlayer *pPlayer = pMsg->GetPlayer();
		if( pPlayer == NULL )
		{
			return ;
		}

		unsigned char ret = pMsg->GetByte();
		if( ret == 0 )
		{
			// 取消出售操作
			m_CachedSellData.Remove( pPlayer->GetExID() );
			// 重新打开收购界面
			GetInst( CShopManager ).OpenShopForSell( m_lID, pPlayer->GetExID(), npcID );
			return ;
		}

		// 确认出售
		const CCachedSellData::SellGoodsListT *sell_list = m_CachedSellData.Get( pPlayer->GetExID() );
		if( sell_list == NULL )
		{
			PutoutLog( LOG_FILE, LT_ERROR, "No cached sell data for player [%s].", pPlayer->GetName() );
			return;
		}

		DoPlayerSell( pPlayer, *sell_list );
		m_CachedSellData.Remove( pPlayer->GetExID() );
	}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:29,代码来源:OnMessage.cpp


示例19: UpdateCanSaleMCLDate

bool UpdateCanSaleMCLDate(const CEGUI::EventArgs& e)
{
	AHdata& ah = GetInst(AHdata);
	AHdata::vecOrderRaw listOR = ah.m_CanSaleOrder;//可出售列表
	CEGUI::MultiColumnList* mcl = WMCL(WEArgs(e).window);
	if(!mcl)
		return false;
	mcl->resetList();
	AHdata::vecOrderRaw::iterator it = listOR.begin();
	for (uint i = 0 ; i < listOR.size() ; ++i,++it)
	{
		mcl->addRow();
		CEGUI::ListboxTextItem* lti = new CEGUI::ListboxTextItem(ToCEGUIString(AppFrame::GetText("AU_104")),it->id);//第二个参数与订单ID关联
		lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
		mcl->setItem(lti,0,i);

		lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(it->price));
		lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
		mcl->setItem(lti,1,i);

		lti = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(it->cnt));
		lti->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
		mcl->setItem(lti,2,i);
	}
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:26,代码来源:Auction.cpp


示例20: ShellInitDialog

void CPlayListDlg::OnInitDialog(HWND hwndDlg)
{
	m_hWnd = hwndDlg;
	ShellInitDialog(m_hWnd);

	// ツールバーの準備
	SHMENUBARINFO mbi;
	memset(&mbi, 0, sizeof(SHMENUBARINFO));
	mbi.cbSize = sizeof(SHMENUBARINFO);
	mbi.hwndParent = m_hWnd;
	mbi.nToolBarId = IDR_PLAYLIST;
	mbi.hInstRes = GetInst();
	SHCreateMenuBar(&mbi);
	m_hwndMB = mbi.hwndMB;

	// リストの準備
	HWND hwndLV = GetDlgItem(m_hWnd, IDC_PLAY_LIST);
	ListView_SetExtendedListViewStyle(hwndLV, 
		ListView_GetExtendedListViewStyle(hwndLV) | LVS_EX_FULLROWSELECT);

	// カラムの挿入
	LVCOLUMN lvc;
	lvc.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
	lvc.fmt = LVCFMT_LEFT;
	lvc.cx = 0;
	lvc.pszText = _T("Name");
	lvc.iSubItem = 0;
	ListView_InsertColumn(hwndLV, 0, &lvc);
	
	// イメージリストを設定
	ListView_SetImageList(hwndLV, m_hImageList, LVSIL_SMALL);

	// リストを更新
	UpdatePlayList();
}
开发者ID:afriza,项目名称:GSPlayer,代码行数:35,代码来源:PlayListDlgPPC.cpp



注:本文中的GetInst函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetInstance函数代码示例发布时间:2022-05-30
下一篇:
C++ GetInputDesc函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap