当前位置: 首页>>代码示例>>C++>>正文


C++ ShowPopup函数代码示例

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


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

示例1: DlgProc

	virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
	{
		if (msg == WM_NOTIFY) {
			LPNMHDR lpnmhdr = (LPNMHDR)lParam;
			if (lpnmhdr->idFrom == IDC_EXTRAORDER && lpnmhdr->code == NM_RCLICK) {
				HTREEITEM hSelected = m_tree.GetDropHilight();
				if (hSelected != NULL && !m_tree.IsSelected(hSelected)) {
					m_tree.UnselectAll();
					m_tree.SelectItem(hSelected);
				}

				int sels = m_tree.GetNumSelected();
				if (sels > 1) {
					if (ShowPopup(0) == ID_GROUP) {
						GroupSelectedItems();
						NotifyChange();
					}
				}
				else if (sels == 1) {
					HTREEITEM hItem = m_tree.GetSelection();
					intlist *ids = Tree_GetIDs(hItem);
					if (ids->count > 1) {
						if (ShowPopup(1) == ID_UNGROUP) {
							UngroupSelectedItems();
							NotifyChange();
						}
					}
				}
			}
		}

		return CDlgBase::DlgProc(msg, wParam, lParam);
	}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:33,代码来源:options_ei.cpp

示例2: ShowExamplePopups

void ShowExamplePopups()
{
	PopupData pd = {sizeof(PopupData)};
	pd.hIcon = hPopupIcon;
	pd.flags = PDF_TCHAR;

	pd.ptzTitle = TranslateT("Example");
	pd.ptzText = TranslateT("The quick brown fox jumped over the lazy dog.");
	ShowPopup(pd);

	pd.ptzTitle = TranslateT("Example With a Long Title");
	pd.ptzText = TranslateT("The quick brown fox jumped over the lazy dog.");
	ShowPopup(pd);

	pd.ptzTitle = TranslateT("Example");
	pd.ptzText = TranslateT("Thequickbrownfoxjumpedoverthelazydog.");
	ShowPopup(pd);

	for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
		if (options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR)) {
			AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
			if (ace && (ace->dwFlags & AVS_BITMAP_VALID)) {
				pd.hContact = hContact;
				pd.ptzText = TranslateT("An avatar.");
				ShowPopup(pd);
				break;
			}
		}
	}
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:30,代码来源:options.cpp

示例3: _notify

int _notify(MCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
{
	char *tmp, *tmporig;
	TCHAR msg[MAX_BUFFER_LENGTH];
	mir_sntprintf(msg, MAX_BUFFER_LENGTH, message, CONTACT_NAME(hContact));

	if (_getOptB("LogActions", defaultLogActions)) {
		tmp = mir_u2a(msg);
		tmporig = mir_u2a(origmessage);
		LogToSystemHistory(tmp, origmessage ? tmporig : NULL);
		mir_free(tmp);
		mir_free(tmporig);
	}

	if (_NOTIFYP) {
		if (type == POPUP_BLOCKED) {
			if (_getOptB("NotifyPopupBlocked", defaultNotifyPopupBlocked))
				ShowPopup(hContact, type, NULL, msg);
		} else if (type == POPUP_APPROVED) {
			if (_getOptB("NotifyPopupApproved", defaultNotifyPopupApproved))
				ShowPopup(hContact, type, NULL, msg);
		} else if (type == POPUP_CHALLENGE) {
			if (_getOptB("NotifyPopupChallenge", defaultNotifyPopupChallenge))
				ShowPopup(hContact, type, NULL, msg);
		} else {
			ShowPopup(hContact, type, NULL, msg);
		}
	}
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:30,代码来源:utils.cpp

示例4: GetList

static void GetList(void *)
{
	TCHAR tszTempPath[MAX_PATH];
	DWORD dwLen = GetTempPath(_countof(tszTempPath), tszTempPath);
	if (tszTempPath[dwLen-1] == '\\')
		tszTempPath[dwLen-1] = 0;

	ptrT updateUrl( GetDefaultUrl()), baseUrl;
	SERVLIST hashes(50, CompareHashes);
	if (!ParseHashes(updateUrl, baseUrl, hashes)) {
		hListThread = NULL;
		return;
	}

	FILELIST *UpdateFiles = new FILELIST(20);
	VARST dirname(_T("%miranda_path%"));

	for (int i=0; i < hashes.getCount(); i++) {
		ServListEntry &hash = hashes[i];

		TCHAR tszPath[MAX_PATH];
		mir_sntprintf(tszPath, _countof(tszPath), _T("%s\\%s"), dirname, hash.m_name);

		if (GetFileAttributes(tszPath) == INVALID_FILE_ATTRIBUTES) {
			FILEINFO *FileInfo = new FILEINFO;
			FileInfo->bDeleteOnly = FALSE;
			// copy the relative old name
			_tcsncpy(FileInfo->tszOldName, hash.m_name, _countof(FileInfo->tszOldName));
			_tcsncpy(FileInfo->tszNewName, hash.m_name, _countof(FileInfo->tszNewName));

			TCHAR tszFileName[MAX_PATH];
			_tcsncpy(tszFileName, _tcsrchr(tszPath, L'\\') + 1, _countof(tszFileName));
			TCHAR *tp = _tcschr(tszFileName, L'.'); *tp = 0;

			TCHAR tszRelFileName[MAX_PATH];
			_tcsncpy(tszRelFileName, hash.m_name, MAX_PATH);
			tp = _tcsrchr(tszRelFileName, L'.'); if (tp) *tp = 0;
			tp = _tcschr(tszRelFileName, L'\\'); if (tp) tp++; else tp = tszRelFileName;
			_tcslwr(tp);

			mir_sntprintf(FileInfo->File.tszDiskPath, _countof(FileInfo->File.tszDiskPath), _T("%s\\Temp\\%s.zip"), tszRoot, tszFileName);
			mir_sntprintf(FileInfo->File.tszDownloadURL, _countof(FileInfo->File.tszDownloadURL), _T("%s/%s.zip"), baseUrl, tszRelFileName);
			for (tp = _tcschr(FileInfo->File.tszDownloadURL, '\\'); tp != 0; tp = _tcschr(tp, '\\'))
				*tp++ = '/';
			FileInfo->File.CRCsum = hash.m_crc;
			// Deselect all plugins by default
			FileInfo->bEnabled = false;
			UpdateFiles->insert(FileInfo);
		}
	}

	// Show dialog
	if (UpdateFiles->getCount() == 0) {
		ShowPopup(TranslateT("Plugin Updater"), TranslateT("List is empty."), POPUP_TYPE_INFO);
		delete UpdateFiles;
	}
	else CallFunctionAsync(LaunchListDialog, UpdateFiles);

	hListThread = NULL;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:60,代码来源:DlgListNew.cpp

示例5: ShowPopup

bool wxGenericComboCtrl::PerformAction(const wxControlAction& action,
                                       long numArg,
                                       const wxString& strArg)
{
    bool processed = false;
    if ( action == wxACTION_COMBOBOX_POPUP )
    {
        if ( !IsPopupShown() )
        {
            ShowPopup();

            processed = true;
        }
    }
    else if ( action == wxACTION_COMBOBOX_DISMISS )
    {
        if ( IsPopupShown() )
        {
            HidePopup();

            processed = true;
        }
    }

    if ( !processed )
    {
        // pass along
        return wxControl::PerformAction(action, numArg, strArg);
    }

    return true;
}
开发者ID:Anonymous2,项目名称:project64,代码行数:32,代码来源:combog.cpp

示例6: ShowPopupUtf

void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact) {
	wchar_t* l1 = (line1) ? mir_utf8decodeW(line1) : nullptr;
	wchar_t* l2 = (line2) ? mir_utf8decodeW(line2) : nullptr;
	ShowPopup(l1, l2, timeout, hContact);
	if (l1) mir_free(l1);
	if (l2) mir_free(l2);
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:7,代码来源:utils.cpp

示例7: s

void TwitterProto::UpdateFriends()
{
	try
	{
		ScopedLock s(twitter_lock_);
		std::vector<twitter_user> friends = twit_.get_friends();
		s.Unlock();

		for(std::vector<twitter_user>::iterator i=friends.begin(); i!=friends.end(); ++i)
		{
			if(i->username == twit_.get_username())
				continue;

			HANDLE hContact = AddToClientList(i->username.c_str(),i->status.text.c_str());
			UpdateAvatar(hContact,i->profile_image_url);
		}
		LOG("***** Friends list updated");
	}
	catch(const bad_response &)
	{
		LOG("***** Bad response from server, signing off");
		SetStatus(ID_STATUS_OFFLINE);
	}
	catch(const std::exception &e)
	{
		ShowPopup( (std::string("While updating friends list, an error occurred: ")
			+e.what()).c_str() );
		LOG("***** Error updating friends list: %s",e.what());
	}

}
开发者ID:dentist,项目名称:miranda-twitter,代码行数:31,代码来源:connection.cpp

示例8: PluginMessageReceived

static int PluginMessageReceived(WPARAM wParam,LPARAM lParam)
{
	CCSDATA *pccsd = (CCSDATA *)lParam;
	PROTORECVEVENT *ppre = ( PROTORECVEVENT * )pccsd->lParam;
	TCHAR response[256];

	TCHAR msg[1024], buff[1024];

	if (_tcsncmp(ppre->tszMessage, szGamePrefix, _tcslen(szGamePrefix)))
		return CallService(MS_PROTO_CHAINRECV, wParam, lParam );

	_tcsncpy(msg, ppre->tszMessage + _tcslen(szGamePrefix),SIZEOF(msg));

	TCHAR *savedMsg = ppre->tszMessage;

	if (!_tcscmp(msg, _T(" ffw"))) {
		mir_sntprintf(buff, SIZEOF(buff), _T("%s"), _T("Fast forward!"));

		HWND hWnd = FindWindow(0, _T("Windows Media Player"));
		PostMessage(hWnd, WM_COMMAND, WMP_NEXT, 0);
	}
	else mir_sntprintf(buff, SIZEOF(buff), TranslateT("Unknown command issued: \"%s\""), msg);

	ShowPopup(pccsd->hContact, buff);

	_tcsncpy(response, buff,SIZEOF(response));
	PluginSendMessage((WPARAM)pccsd->hContact, (LPARAM)response);

	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:30,代码来源:alarms.cpp

示例9: ShowDebugPopup

void ShowDebugPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description)
{
	if (db_get_b(NULL,MODULE_NAME,"Debug",0))
	{
		ShowPopup(hContact,title,description);
	}
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:7,代码来源:popup.cpp

示例10: ShowPopup

//////////////////
// Timer popped: display myself and kill timer. 
// If Mouse moved outside of parent window, cancel and set flag
void CPopupText::OnTimer(UINT nIDEvent)
{
	CWnd::OnTimer (nIDEvent);


	if (nIDEvent == m_DelayTimer)
	{
		ShowPopup ();
		StopDelayTimer();
	}
	else if (nIDEvent == m_MoveOutsideTimer)
	{
		CWnd* pParent = GetParent ();
		if (pParent)
		{
			CPoint Pos;
			GetCursorPos (&Pos);
			CWnd* pOverWindow = WindowFromPoint  (Pos);
			if (pOverWindow)
			{
				if (!((pOverWindow->m_hWnd == m_hWnd) || (pOverWindow->m_hWnd == pParent->m_hWnd)))
				{
					m_bMovedOutside = TRUE;
					Cancel ();
				}
			}
		}
	}

}
开发者ID:ruglcc,项目名称:gbnx31_tool,代码行数:33,代码来源:PupText.cpp

示例11: ShowPopupUtf

void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact) {
	TCHAR* l1 = (line1) ? mir_utf8decodeT(line1) : NULL;
	TCHAR* l2 = (line2) ? mir_utf8decodeT(line2) : NULL;
	ShowPopup(l1, l2, timeout, hContact);
	if (l1) mir_free(l1);
	if (l2) mir_free(l2);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:7,代码来源:utils.cpp

示例12: Notify

void Notify(HANDLE hContact, TCHAR *text)
{
	if (text != NULL && text[0] == _T('\0'))
		text = NULL;

	if (!opts.track_changes && text != NULL)
		return;

	if (!opts.track_removes && text == NULL)
		return;

	// Replace template with nick
	TCHAR templ[1024];
	lstrcpyn(templ, text == NULL ? opts.template_removed : opts.template_changed, MAX_REGS(templ));
	ReplaceChars(templ);

	TCHAR log[1024];
	mir_sntprintf(log, sizeof(log), templ, 
		text == NULL ? TranslateT("<no nickname>") : text);

	if (opts.history_enable)
		HistoryLog(hContact, log);

	if (opts.popup_enable)
		ShowPopup(hContact, NULL, log);
}
开发者ID:Robyer,项目名称:miranda-plugins,代码行数:26,代码来源:nickhistory.cpp

示例13: dc

void ExplainCanvas::OnMouseMotion(wxMouseEvent &ev)
{
	ev.Skip(true);

	if (ev.Dragging())
		return;

	wxClientDC dc(this);
	PrepareDC(dc);

	wxPoint logPos(ev.GetLogicalPosition(dc));

	double x, y;
	x = (double) logPos.x;
	y = (double) logPos.y;

	// Find the nearest object
	int attachment = 0;
	ExplainShape *nearestObj = dynamic_cast<ExplainShape *>(FindShape(x, y, &attachment));

	if (nearestObj)
	{
		ShowPopup(nearestObj);
	}
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:25,代码来源:explainCanvas.cpp

示例14: mir_a2t

void CAimProto::report_file_error(TCHAR *fname)
{
	TCHAR errmsg[512];
	TCHAR* error = mir_a2t(_strerror(NULL));
	mir_sntprintf(errmsg, TranslateT("Failed to open file: %s : %s"), fname, error);
	mir_free(error);
	ShowPopup((char*)errmsg, ERROR_POPUP | TCHAR_POPUP);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:8,代码来源:file.cpp

示例15: ExtraStatusChanged

void ExtraStatusChanged(XSTATUSCHANGE *xsc)
{
	if (xsc == NULL)
		return;

	BOOL bEnablePopup = true, bEnableSound = true;
	char buff[12] = {0};

	mir_snprintf(buff, SIZEOF(buff), "%d", ID_STATUS_EXTRASTATUS);

	if (( db_get_b(0, MODULE, buff, 1) == 0)
		|| (db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
		|| (!opt.HiddenContactsToo && db_get_b(xsc->hContact, "CList", "Hidden", 0))
		|| (opt.TempDisabled)
		|| (opt.IgnoreEmpty && (xsc->stzTitle == NULL || xsc->stzTitle[0] == '\0') && (xsc->stzText == NULL || xsc->stzText[0] == '\0'))) {
			 FreeXSC(xsc);
			 return;
	}

	char statusIDs[12], statusIDp[12];
	if (opt.AutoDisable) {
		WORD myStatus = (WORD)CallProtoService(xsc->szProto, PS_GETSTATUS, 0, 0);
		mir_snprintf(statusIDs, SIZEOF(statusIDs), "s%d", myStatus);
		mir_snprintf(statusIDp, SIZEOF(statusIDp), "p%d", myStatus);
		bEnableSound = db_get_b(0, MODULE, statusIDs, 1) ? FALSE : TRUE;
		bEnablePopup = db_get_b(0, MODULE, statusIDp, 1) ? FALSE : TRUE;
	}

	if (!(templates.PopupFlags & xsc->action))
		bEnableSound = bEnablePopup = false;

	int xstatusID = db_get_b(xsc->hContact, xsc->szProto, "XStatusId", 0);
	if (opt.PDisableForMusic && xsc->type == TYPE_ICQ_XSTATUS && xstatusID == XSTATUS_MUSIC)
		bEnableSound = bEnablePopup = false;

	if (bEnablePopup && db_get_b(xsc->hContact, MODULE, "EnableXStatusNotify", 1) && db_get_b(0, MODULE, xsc->szProto, 1))
		ShowPopup(xsc);

	if (bEnableSound && db_get_b(xsc->hContact, MODULE, "EnableXStatusNotify", 1))
		PlayXStatusSound(xsc->action);

	BYTE enableLog = opt.EnableLogging;
	if (opt.LDisableForMusic && xsc->type == TYPE_ICQ_XSTATUS && xstatusID == XSTATUS_MUSIC)
		enableLog = FALSE;

	if (!(templates.LogFlags & xsc->action))
		enableLog = FALSE;

	if (enableLog && db_get_b(xsc->hContact, MODULE, "EnableLogging", 1)
		 && CallService(MS_MSG_MOD_MESSAGEDIALOGOPENED, (WPARAM)xsc->hContact, 0))
		LogToMessageWindow(xsc, FALSE);

	if (opt.Log)
		LogChangeToFile(xsc);

	FreeXSC(xsc);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:57,代码来源:xstatus.cpp


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