vc Mouse Into

 // TODO: Add extra initialization here
 #define WS_EX_TRANSPARENT 0x00000020L
 #define   WS_EX_LAYERED                       0x00080000

 DWORD dwNewLong   =   GetWindowLong(m_hWnd,   GWL_EXSTYLE);  
  dwNewLong   |=   WS_EX_TRANSPARENT   |WS_EX_LAYERED;  
  SetWindowLong(m_hWnd,   GWL_EXSTYLE,   dwNewLong);

HINSTANCE   hInst   =   LoadLibrary("User32.DLL");
   typedef   BOOL   (WINAPI   *MYFUNC)(HWND,COLORREF,BYTE,DWORD);    
  MYFUNC   fun   =   NULL;  
  //取得SetLayeredWindowAttributes函数指针    
  fun=(MYFUNC)GetProcAddress(hInst,   "SetLayeredWindowAttributes");  
  if(fun)fun(this->GetSafeHwnd(),0, 255, 2 ); 

你可能感兴趣的:(vc Mouse Into)