// 图片无效或者DUILIB图片引擎Read图片失败
void HeadModifyForm::OnNotifyImageInvalid()
{
	// 提示图片无效,不是图片或者图片为超过200*200
	auto multilan = MutiLanSupport::GetInstance();
	std::wstring content = multilan->GetStringViaID(L"STRID_HEAD_MODIFY_IMAGE_VALID");
	std::wstring title = multilan->GetStringViaID(L"STRID_HEAD_MODIFY_BUTTON_LOCAL_UPLOAD");
	std::wstring yes = multilan->GetStringViaID(L"STRING_OK");
	MsgboxCallback cb = nbase::Bind(&HeadModifyForm::OnButtonCloseTipCallback, this, std::placeholders::_1);
	cb = ToWeakCallback(cb);
	ShowMsgBox(m_hWnd, content, MsgboxCallback(), title, yes, L"");

	select_image_btn_->SetEnabled(true);
}
Beispiel #2
0
void MsgRecordForm::OnPlayAudioCallback( const std::string &cid, int code )
{
	IdBubblePair::iterator it = id_bubble_pair_.find(cid);
	if(it != id_bubble_pair_.end())
	{
		MsgBubbleAudio* item = dynamic_cast<MsgBubbleAudio*>(it->second);
		if(item)
		{
			item->OnPlayCallback(code);
		}
	}
	if (code != nim::kNIMResSuccess)
	{
		std::wstring tip = nbase::StringPrintf(L"语音播放失败,错误码:%d", code);
		ShowMsgBox(m_hWnd, tip, MsgboxCallback(), L"提示", L"确定", L"");
	}
}