Chinaunix首页 | 论坛 | 博客
  • 博客访问: 566218
  • 博文数量: 97
  • 博客积分: 5090
  • 博客等级: 大校
  • 技术积分: 969
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-01 14:56
文章分类

全部博文(97)

文章存档

2011年(1)

2009年(1)

2008年(14)

2007年(37)

2006年(44)

我的朋友

分类: WINDOWS

2007-05-16 11:09:19

typedef BOOL (WINAPI *AllowSetForegroundWindowFn_t)(DWORD dwProcessId);

  HMODULE hModule = NULL;
  AllowSetForegroundWindowFn_t pProcAddress = NULL;
  hModule = GetModuleHandle("User32");
  if(hModule != NULL)
  {
      pProcAddress = (AllowSetForegroundWindowFn_t)GetProcAddress(hModule, "AllowSetForegroundWindow");
  }
  if (pProcAddress != NULL)
  {
   if(pProcAddress(-1))
   {
          SetForegroundWindow(Hwnd);
   }
  }
  if(IsIconic(Hwnd))
  {
          ShowWindow(Hwnd,SW_RESTORE);
  } 

阅读(4393) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~