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

C++ FindWindowEx函数代码示例

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

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



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

示例1: FindTrayWnd

HWND FindTrayWnd()
{
		HWND hTrayWnd = FindWindow(L"Shell_TrayWnd", NULL);
		hTrayWnd = FindWindowEx(hTrayWnd, 0, L"TrayNotifyWnd", NULL);
 		HWND hwndTmp;	
		hwndTmp = ::FindWindowEx(hTrayWnd, 0, L"SysPager", NULL);
		if(!hwndTmp)
			hTrayWnd=::FindWindowEx(hTrayWnd,0,L"ToolbarWindow32",NULL);
		else
			hTrayWnd=::FindWindowEx(hwndTmp,0,L"ToolbarWindow32",NULL);




		return hTrayWnd;
}
开发者ID:bodanrenko93,项目名称:hidedragon,代码行数:16,代码来源:HookLib.cpp


示例2: FindVisibleWindow

HWND FindVisibleWindow(CTSTR lpClass, CTSTR lpTitle)
{
    HWND hwndNext = nullptr;
    HWND hwnd = nullptr;

    do
    {
        hwnd = FindWindowEx(NULL, hwndNext, lpClass, lpTitle);
        if (hwnd && IsWindowVisible(hwnd))
            break;

        hwndNext = hwnd;
    } while (hwnd != nullptr);

    return hwnd;
}
开发者ID:cha007,项目名称:obs_,代码行数:16,代码来源:GraphicsCaptureSource.cpp


示例3: FindWindow

void CPostMsgData::Work()
{
	std::vector<HWND> vhWnd;
	HWND hWnd = FindWindow(NULL,L"{C3CE0473-57F7-4a0a-9CF4-C1ECB8A3C514}_dsmainmsg_ie");
	UINT uCnt = 0;
	while (hWnd != NULL)
	{
		uCnt++;
		::PostMessage(hWnd,m_uMsg,m_wParam,m_lParam);
		hWnd = FindWindowEx(HWND_MESSAGE, hWnd, NULL,L"{C3CE0473-57F7-4a0a-9CF4-C1ECB8A3C514}_dsmainmsg_ie");
	}
	if (m_lRef != LUA_REFNIL)
	{
		g_wndMsg.PostMessage(WM_POSTWNDMSG, uCnt, (LPARAM) this);
	}
}
开发者ID:yuanbaoyuele,项目名称:yuanbaoyule,代码行数:16,代码来源:LuaAsynAPIUtil.cpp


示例4: chromeHwnd

HWND CFrame::aigisHwnd()
{
	HWND hChrome = chromeHwnd();
	if (!hChrome)
	{
		return nullptr;
	}

	HWND hFrame = FindWindowEx(hChrome, 0, _T("Chrome_RenderWidgetHostHWND"), _T("Chrome Legacy Window"));
	if (!hFrame)
	{
		return nullptr;
	}

	return hFrame;
}
开发者ID:kpli,项目名称:AigisDmm,代码行数:16,代码来源:Frame.cpp


示例5: vboxTrayRemoveTrayIcon

static void vboxTrayRemoveTrayIcon()
{
    if (gNotifyIconData.cbSize > 0)
    {
        /* Remove the system tray icon and refresh system tray. */
        Shell_NotifyIcon(NIM_DELETE, &gNotifyIconData);
        HWND hTrayWnd = FindWindow("Shell_TrayWnd", NULL); /* We assume we only have one tray atm. */
        if (hTrayWnd)
        {
            HWND hTrayNotifyWnd = FindWindowEx(hTrayWnd, 0, "TrayNotifyWnd", NULL);
            if (hTrayNotifyWnd)
                SendMessage(hTrayNotifyWnd, WM_PAINT, 0, NULL);
        }
        RT_ZERO(gNotifyIconData);
    }
}
开发者ID:virendramishra,项目名称:VirtualBox4.1.18,代码行数:16,代码来源:VBoxTray.cpp


示例6: FindWindow

BOOL vmsOeWindows::Initialize()
{
	
	m_hwndMain = FindWindow ("Outlook Express Browser Class", NULL);	
	if (m_hwndMain == NULL)
		return FALSE;
	

	
	m_hwndRebar = FindWindowEx (m_hwndMain, NULL, "SizableRebar", NULL);
	if (m_hwndRebar)
		m_hwndRebar = FindWindowEx (m_hwndRebar, NULL, "ReBarWindow32", NULL);
	

	
	m_hwndMessageList = FindWindowEx (m_hwndMain, NULL, "Outlook Express Message View", NULL);

	if (m_hwndMessageList)
		m_hwndMessageList = FindWindowEx (m_hwndMessageList, NULL, "Outlook Express Message List", NULL);

	if (m_hwndMessageList)
		m_hwndMessageList = FindWindowEx (m_hwndMessageList, NULL, "ATL:SysListView32", NULL);
	

	
	HWND m_hwndFoldersList = FindWindowEx (m_hwndMain, NULL, "Outlook Express Navigation Pane", NULL);

	if (m_hwndFoldersList)
		m_hwndFoldersList = FindWindowEx (m_hwndFoldersList, NULL, "Outlook Express Pane Frame", NULL);

	if (m_hwndFoldersList)
		m_hwndFoldersList = FindWindowEx (m_hwndFoldersList, NULL, "ThorTreeViewWndClass", NULL);

	if (m_hwndFoldersList)
		m_hwndFoldersList = FindWindowEx (m_hwndFoldersList, NULL, "SysTreeView32", NULL);
	

	return TRUE;
}
开发者ID:andyTsing,项目名称:freedownload,代码行数:39,代码来源:vmsOeWindows.cpp


示例7: _WndProcMain

/*********************************************************************
*
*       _WndProcMain
*/
static LRESULT CALLBACK _WndProcMain(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
  HWND hWndStatus;
  SIM_GUI_HandleKeyEvents(message, wParam);
  switch (message) {
  case WM_SIZE:
    hWndStatus = FindWindowEx(hWnd, NULL, STATUSCLASSNAME, NULL);
    if (hWndStatus) {
      _SetParts(hWndStatus);
      SendMessage(hWndStatus, message, wParam, lParam);
    }
    break;
  case WM_DESTROY:
    PostQuitMessage(0);
    break;
  }
  return DefWindowProc(hWnd, message, wParam, lParam);
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:21,代码来源:SampleAppEx.c


示例8: SendMessage

int __stdcall COpenDirHelper::BrowseCallbackProcDIR(HWND  hwnd,UINT  uMsg,LPARAM  lParam,LPARAM  lpData)
{
	HWND checkbox;

	//Initialization callback message
	if(uMsg==BFFM_INITIALIZED) {
		SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)(LPCTSTR)strLastOpenDir);

		RECT ListViewRect;
		RECT Dialog;
		RECT ClientArea;
		RECT ButtonRect;

		checkbox = CreateWindowEx(0, _T("BUTTON"), ResStr(IDS_MAINFRM_DIR_CHECK),
								  WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | BS_AUTOCHECKBOX | BS_MULTILINE, 0, 100, 100,
								  50, hwnd, 0, AfxGetApp()->m_hInstance, NULL);

		HWND ListView=FindWindowEx(hwnd,NULL,_T("SysTreeView32"),NULL);

		HWND id_ok = GetDlgItem(hwnd, IDOK);
		HWND id_cancel = GetDlgItem(hwnd, IDCANCEL);

		GetWindowRect(hwnd,&Dialog);
		MoveWindow(hwnd, Dialog.left, Dialog.top, Dialog.right-Dialog.left+50, Dialog.bottom-Dialog.top+70, TRUE);
		GetWindowRect(hwnd,&Dialog);

		GetClientRect(hwnd,&ClientArea);

		GetWindowRect(ListView,&ListViewRect);
		MoveWindow(ListView, ListViewRect.left-Dialog.left-3, ListViewRect.top-Dialog.top-55, ListViewRect.right-ListViewRect.left+49, ListViewRect.bottom-ListViewRect.top+115, TRUE);
		GetWindowRect(ListView,&ListViewRect);

		GetWindowRect(id_ok,&ButtonRect);
		MoveWindow(id_ok, ButtonRect.left-Dialog.left+49, ButtonRect.top-Dialog.top+50, ButtonRect.right-ButtonRect.left, ButtonRect.bottom-ButtonRect.top, TRUE);

		GetWindowRect(id_cancel,&ButtonRect);
		MoveWindow(id_cancel, ButtonRect.left-Dialog.left+49, ButtonRect.top-Dialog.top+50, ButtonRect.right-ButtonRect.left, ButtonRect.bottom-ButtonRect.top, TRUE);

		SetWindowPos(checkbox, HWND_BOTTOM, (ListViewRect.left-Dialog.left-3), ClientArea.bottom - 35, 120, 27, SWP_SHOWWINDOW);
		SetFont(checkbox,_T("Tahoma"),13);

		CBProc = (WNDPROC) SetWindowLongPtr(checkbox, GWLP_WNDPROC, (LONG_PTR) CheckBoxSubclassProc);
		SendMessage(checkbox,BM_SETCHECK,(WPARAM)m_incl_subdir,0);
	}
	return 0;
}
开发者ID:wangarong,项目名称:mpc-loop,代码行数:46,代码来源:OpenDirHelper.cpp


示例9: AlreadyRun

void AlreadyRun(void)
{
	HWND	FirsthWnd, FirstChildhWnd;

	if((FirsthWnd = FindWindowEx(NULL, NULL, szWindowClass, NULL )) != NULL)
	{
		FirstChildhWnd = GetLastActivePopup(FirsthWnd);
		SetForegroundWindow(FirsthWnd);
	
		if(FirsthWnd != FirstChildhWnd)
		{
			SetForegroundWindow(FirstChildhWnd);
		}
		
		ShowWindow(FirsthWnd, SW_SHOWNORMAL);
	}
}
开发者ID:janseM3319,项目名称:cchelper,代码行数:17,代码来源:WinMain.cpp


示例10: TelnetGetConsoleWindow

// Paul Brannan 8/7/98
// This code is from Michael 'Hacker' Krelin (author of KINSole)
// (slightly modified)
HWND TelnetGetConsoleWindow() {
	DWORD pid = GetCurrentProcessId(), wpid;
	char title[512], *t = title;
	HWND hrv = NULL;

#ifndef __BORLANDC__	// Ioannou Dec. 8, 1998
	if(!GetConsoleTitle(title, sizeof(title))) t = NULL;

	for(;;) {
		if((hrv = FindWindowEx(NULL, hrv, "tty", t)) == NULL) break;
		if(!GetWindowThreadProcessId(hrv, &wpid)) continue;
		if(wpid == pid) return hrv;
	}
#endif

	return GetForegroundWindow();
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:20,代码来源:tnmisc.cpp


示例11: clickChildButton

void clickChildButton (HWND dialog, const char *caption) {
    HWND dialogItem = NULL;
    while (1) {
        dialogItem = FindWindowEx(dialog, dialogItem, NULL, NULL);
        if (dialogItem == NULL) {
            break;
        }
        char windowText[255];
        GetWindowText(dialogItem, windowText, 255);
        printf("found subitem: %s\n", windowText);
        if (strcmp(windowText, caption) == 0) {
            SetActiveWindow(dialog);
            SendMessage(dialogItem, BM_CLICK, NULL, NULL);
            break;
        }
    }
}
开发者ID:pkrumins,项目名称:sandboxie-restarter,代码行数:17,代码来源:main.cpp


示例12: FindTopWindow

static HWND FindTopWindow(HWND hParent, LPCWSTR sClass)
{
	HWND hLast = NULL;
	HWND hFind = NULL;
	int Coord = 99999;
	while ((hFind = FindWindowEx(hParent, hFind, sClass, NULL)) != NULL)
	{
		RECT rc; GetWindowRect(hFind, &rc);
		if ((hLast == NULL)
			|| (rc.top < Coord))
		{
			Coord = rc.top;
			hLast = hFind;
		}
	}
	return hLast;
}
开发者ID:Alexander-Shukaev,项目名称:ConEmu,代码行数:17,代码来源:Inside.cpp


示例13: GetCurrentProcessId

void vmsIeHelper::GetIeWindows(vector <HWND> &vWnds)
{
	HWND hwnd = NULL;
	DWORD dwCPID = GetCurrentProcessId ();
	
	do
	{
		hwnd = FindWindowEx (NULL, hwnd, _T ("IEFrame"), NULL);
		if (hwnd)
		{
			DWORD dwPID = 0;
			GetWindowThreadProcessId (hwnd, &dwPID);
			if (dwPID == dwCPID)
				vWnds.push_back (hwnd);
		}
	}
	while (hwnd != NULL);
}
开发者ID:ratever930,项目名称:freedownload,代码行数:18,代码来源:vmsIeHelper.cpp


示例14: FindWindowEx

int vmsIeHelper::GetTabCount(HWND hwndIeWindow)
{
	HWND hwnd = NULL;
	int cTabs = 0;

	do 
	{
		hwnd = FindWindowEx (hwndIeWindow, hwnd, _T ("Frame Tab"), NULL);
		if (hwnd)
			cTabs++;
	} 
	while (hwnd != NULL);

	if (!cTabs)
		cTabs = 1;

	return cTabs;
}
开发者ID:ratever930,项目名称:freedownload,代码行数:18,代码来源:vmsIeHelper.cpp


示例15: OpenFileSubclass

UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	OpenFileSubclassData *data= (OpenFileSubclassData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);

	switch(msg) {
	case WM_INITDIALOG:
		{
			OPENFILENAME *ofn = (OPENFILENAME *)lParam;

			data = (OpenFileSubclassData *) malloc(sizeof(OpenFileSubclassData));
			SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
			data->locking_request = (BYTE *)ofn->lCustData;
			data->setView = TRUE;

			TranslateDialogDefault(hwnd);
			CheckDlgButton(hwnd, IDC_PROTECTAVATAR, *(data->locking_request));
		}
		break;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDC_PROTECTAVATAR)
			*(data->locking_request) = IsDlgButtonChecked(hwnd, IDC_PROTECTAVATAR) ? TRUE : FALSE;
		break;

	case WM_NOTIFY:
		if (data->setView) {
			HWND hwndParent = GetParent(hwnd);
			HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL) ;
			if (hwndLv != NULL) {
				SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
				data->setView = FALSE;
			}
		}
		break;

	case WM_NCDESTROY:
		free((OpenFileSubclassData *)data);
		SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)0);
		break;
	}

	return FALSE;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:43,代码来源:services.cpp


示例16: ExitWhile

//---------------------------------------------------------------------------
DWORD WINAPI ExitWhile(LPVOID lpParameter)  //
{
    do
    {
        HWND    hWnd = FindWindow(NULL ,"UIPOWER");// Form1
        if(hWnd!=NULL)
        {
            //ShowMessage("hWnd!=NULL");
            HWND    hChildWnd = FindWindowEx(hWnd ,NULL ,NULL ,"否(&N)");
            if(hChildWnd!=NULL)
            {
                PostMessage(hChildWnd ,WM_KEYDOWN ,(WPARAM)'N' ,NULL);
                break;
            }
        }
        Sleep(100);
    }
    while(true);
    return	1;
}
开发者ID:huangjunkun,项目名称:code_joy_with_cpp_builder_6,代码行数:21,代码来源:CapturePicture.cpp


示例17: GetExecutingProcess

ExecutionProcess OpenOfficeAction::GetExecutingProcess()
{
	ExecutionProcess process;

	process = ActionExecution::GetExecutingProcess();

	if (process.IsEmpty() == false)
	{
		return process;
	}

	if (FindWindowEx(NULL, NULL, LISTENER_WINDOWCLASS, NULL) == NULL)
	{
		return ExecutionProcess();
	}
	else
	{
		return ExecutionProcess(KILLTRAY_MESSAGE, L"", true);
	}
}
开发者ID:NoAntzWk,项目名称:CatalanitzadorPerAWindows,代码行数:20,代码来源:OpenOfficeAction.cpp


示例18: ToWstr

void Announcer::ToMessenger(wstring artist, wstring album, wstring title, BOOL show) {
  if (title.empty() && show) return;
  
  COPYDATASTRUCT cds;
  WCHAR buffer[256];

  wstring wstr = L"\\0Music\\0" + ToWstr(show) + L"\\0{1}\\0" + 
    artist + L"\\0" + title + L"\\0" + album + L"\\0\\0";
  wcscpy_s(buffer, 256, wstr.c_str());

  cds.dwData = 0x547;
  cds.lpData = &buffer;
  cds.cbData = (lstrlenW(buffer) * 2) + 2;

  HWND hMessenger = NULL;
  while (hMessenger = FindWindowEx(NULL, hMessenger, L"MsnMsgrUIManager", NULL)) {
    if (hMessenger > 0) {
      SendMessage(hMessenger, WM_COPYDATA, NULL, (LPARAM)&cds);
    }
  }
}
开发者ID:Greathood,项目名称:taiga,代码行数:21,代码来源:announce.cpp


示例19: ThreadVentProc

DWORD WINAPI ThreadVentProc(LPVOID lpParam)
{
	hWndVent = NULL;
	while(1)
	{
		if(!IsWindow(hWndVent))
		{
			pKillVentHook();
			hWndVent = FindWindow(NULL, "Ventrilo");
			if(hWndVent != NULL)
			{
				threadID = GetWindowThreadProcessId(hWndVent, NULL);
				hWndXmit = FindWindowEx(hWndVent, NULL, "Static", "--XMIT--");
				if(threadID != NULL && hWndXmit != NULL)
					pSetVentHook(threadID, hWndXmit);
			}
		}
		Sleep(2000);
	}
	return 0;
}
开发者ID:lloydpick,项目名称:preVentrilo,代码行数:21,代码来源:preVentrilo.cpp


示例20: GetTargetWindow

HWND GetTargetWindow()
{
#if 0
	HWND desktop = GetDesktopWindow();
	HWND testWindow = FindWindowEx(desktop, NULL, "InjectionTestWindow", "Injection Test Window");

	return testWindow;
#endif
#if 1
	HWND worker;
	HWND defView;
	HWND listView;

	if(!util::FindDesktopWindows(worker, defView, listView))
	{
		return NULL;
	}

	return listView;
#endif
}
开发者ID:makrattaur,项目名称:ogldesktop,代码行数:21,代码来源:oglinjector.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Finish函数代码示例发布时间:2022-05-30
下一篇:
C++ FindWindowById函数代码示例发布时间: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