C# Win32消息系列-User32.dll

来源:互联网 发布:帝国cms内容页js调用 编辑:程序博客网 时间:2024/05/21 06:45
[csharp] view plaincopy
  1. [DllImport("User32.dll", EntryPoint = "SendMessage")]  
  2. private static extern int SendMessage(  
  3. IntPtr hWnd,   // handle to destination window   
  4. int msg,    // message   
  5. int wParam, // first message parameter   
  6. int lParam // second message parameter   
  7. );  
  8.   
  9. [DllImport("User32.dll")]  
  10. private static extern IntPtr GetSystemMenu(IntPtr hWnd,bool bRevert);  
  11. [DllImport("User32.dll")]  
  12. private static extern bool EnableWindow(IntPtr hWnd, bool bEnabled);  
  13. [DllImport("User32.dll")]  
  14. private static extern bool ShowWindow(IntPtr hWnd, int showFlag);  
  15. [DllImport("User32.dll")]  
  16. private static extern IntPtr GetSubMenu(IntPtr hWnd, int pos);   
  17. [DllImport("User32.dll")]  
  18. private static extern int GetMenuItemCount(IntPtr hWnd);    
  19. [DllImport("User32.dll")]  
  20. private static extern IntPtr GetMenu(IntPtr hWnd);     
  21. [DllImport("User32.dll")]  
  22. private static extern bool SetWindowTextA(IntPtr hWnd,string text);   
0 0
原创粉丝点击