//使窗体处于透明
 SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
 HINSTANCE hInst=LoadLibrary("User32.DLL");
 if(hInst)
 {
  typedef BOOL(WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
  MYFUNC fun=NULL;
  fun=(MYFUNC)GetProcAddress(hInst,"SetLayeredWindowAttributes");
  if(fun)fun(this->GetSafeHwnd(),0,230,2);//设置透明度的值
  FreeLibrary(hInst);
 }

相关文章:

  • 2021-10-02
  • 2021-06-12
  • 2022-12-23
  • 2021-10-18
  • 2021-09-25
  • 2022-12-23
  • 2021-12-04
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-11-06
相关资源
相似解决方案