Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.3 KiB

  1. /* Copyright (C) 1991, Microsoft Corporation, all rights reserved
  2. maskctrl.h - TCP/IP Address custom control, global definitions
  3. November 10, 1992 - Greg Strange
  4. February 11, 1997 - Marco Chierotti (extend to IPv6 and TTL for DNS snapin)
  5. */
  6. #ifndef _MASKCTRL_H
  7. #define _MASKCTRL_H
  8. /////////////////////////////////////////////////////////////////////////////////////////
  9. // Messages sent to DNS_MaskControl
  10. #define DNS_MASK_CTRL_CLEAR WM_USER+100 // no parameters
  11. #define DNS_MASK_CTRL_SET WM_USER+101 // wparam = array if DWORD, lparam = elements of the array
  12. #define DNS_MASK_CTRL_GET WM_USER+102 // wparam = array if DWORD, lparam = elements of the array
  13. #define DNS_MASK_CTRL_SET_LOW_RANGE WM_USER+103 // wparam = field, lparam = low val
  14. #define DNS_MASK_CTRL_SET_HI_RANGE WM_USER+104 // wparam = field, lparam = hi val
  15. #define DNS_MASK_CTRL_SETFOCUS WM_USER+105 // wparam = field
  16. #define DNS_MASK_CTRL_ISBLANK WM_USER+106 // no parameters
  17. #define DNS_MASK_CTRL_SET_ALERT WM_USER+107 // wparam = function pointer for alert on field error
  18. #define DNS_MASK_CTRL_ENABLE_FIELD WM_USER+108 // wparam = field, lparam = 1/0 to enable/disable
  19. // convert an IP address from 4 WORDs format into a single DWORD
  20. #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
  21. // get the first 8 bits out of a DWORD
  22. #define OCTECT(x) (x & 0x000000ff)
  23. // extract IP octects from a DWORD
  24. #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
  25. #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
  26. #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
  27. #define FOURTH_IPADDRESS(x) (x & 0xff)
  28. // value for marking an empty field in the UI
  29. #define FIELD_EMPTY ((DWORD)-1)
  30. // helpful definitions for IPv4 and IPv4 field
  31. #define EMPTY_IPV4_FIELD (0xff)
  32. #define EMPTY_IPV4 ((DWORD)-1)
  33. /* Strings defining the different control class names */
  34. #define DNS_IP_V4_ADDRESS_CLASS TEXT("DNS_IPv4AddressCtrl")
  35. #define DNS_IP_V6_ADDRESS_CLASS TEXT("DNS_IPv6AddressCtrl")
  36. #define DNS_TTL_CLASS TEXT("DNS_TTLCtrl")
  37. BOOL DNS_ControlInit(HANDLE hInstance, LPCTSTR lpszClassName, WNDPROC lpfnWndProc,
  38. LPCWSTR lpFontName, int nFontSize);
  39. BOOL DNS_ControlsInitialize(HANDLE hInstance, LPCWSTR lpFontName, int nFontSize);
  40. #endif // _MASKCTRL_H