【问题标题】:MFC/C++ equivalent of VB's AppActivateMFC/C++ 相当于 VB 的 AppActivate
【发布时间】:2009-10-22 08:24:59
【问题描述】:

AppActivate 似乎是我需要的,我相当肯定一定有一个 c++/mfc 等价物。有吗?

【问题讨论】:

  • 您能否发布简单的 C++ 程序来激活 Untitled - Notepad。谢谢

标签: c++ vb6 mfc


【解决方案1】:

你可以试试这些:

SetForegroundWindow(FindWindow(NULL, "window title"));
// or
SetForegroundWindow(AfxGetMainWnd());

【讨论】:

  • 是的,SetForegroundWindow(HWND) 工作正常。有时库太大而无法找到您需要的功能。
猜你喜欢
  • 2022-08-22
  • 2011-03-11
  • 1970-01-01
  • 1970-01-01
  • 2010-10-19
  • 2010-12-11
  • 2013-10-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多