将一个窗口显示到最前面的源代码

    技术2022-05-11  80

    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);  } 

    <script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>


    最新回复(0)