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.

74 lines
2.4 KiB

  1. /* File: D:\WACKER\tdll\statusbr.h (Created: 08-Feb-1994)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 1 $
  7. * $Date: 10/05/98 12:41p $
  8. */
  9. //
  10. // Defines...
  11. //
  12. #define EXTRASPACE (UINT)8
  13. #define SBR_NTFY_REFRESH (WM_USER+0x400) // Update the statusbar display
  14. #define SBR_NTFY_TIMER (WM_USER+0x401) // Update time connected display
  15. #define SBR_NTFY_NOPARTS (WM_USER+0x402) // Set status bar to show no parts
  16. #define SBR_NTFY_INITIALIZE (WM_USER+0x403) // Calculate part sizes... once
  17. #define SBR_NTFY_DRAWITEM (WM_USER+0x404) // DrawItem
  18. #define SBR_ATOM_NAME "PROP_SBRDATA"
  19. #define YEAR(t) (t << 9)
  20. #define MONTH(t) (t << 5)
  21. #define HOUR(t) (t << 11)
  22. #define MINUTE(t) (t << 5)
  23. #define SECOND(t) (t >> 1)
  24. #define SBR_MAX_PARTS 8 // Maximum number of parts
  25. #define SBR_CNCT_PART_NO 0 // connection status
  26. #define SBR_EMU_PART_NO 1 // emulator
  27. #define SBR_COM_PART_NO 2 // Com part
  28. #define SBR_SCRL_PART_NO 3 // scroll lock
  29. #define SBR_CAPL_PART_NO 4 // caps lock
  30. #define SBR_NUML_PART_NO 5 // num lock
  31. #define SBR_CAPT_PART_NO 6 // capture
  32. #define SBR_PRNE_PART_NO 7 // print echo
  33. #define SBR_ALL_PARTS 98
  34. #define SBR_KEY_PARTS 99 // All key parts, SCRL, NUML, CAPL
  35. typedef struct SBR
  36. {
  37. WNDPROC wpOrigStatusbarWndProc; // Original Statusbar window proc
  38. HWND hwnd; // Statusbar window
  39. HSESSION hSession; // Session handle
  40. HTIMER hTimer; // Timer used to update clocks
  41. int iLastCnctStatus; // Last connection status
  42. int aWidths[SBR_MAX_PARTS]; // Statusbar part widths
  43. // Since we look at all string ahead of time to determine their length
  44. // and adjust the statusbar parts accordingly, we migth as well remember
  45. // the strings we read from the resource file. This saves us alot of
  46. // LoadString() calls.
  47. //
  48. LPTSTR pachCNCT; // Connected + time...
  49. LPTSTR pachCAPL; // CAP Lock label
  50. LPTSTR pachNUML; // NUM Lock label
  51. LPTSTR pachSCRL; // SCR Lock label
  52. LPTSTR pachPECHO; // Print Echo label
  53. LPTSTR pachCAPT; // Capture label
  54. LPTSTR pachCOM; // Com label
  55. } SBR, *pSBR;
  56. //
  57. // Function prototypes...
  58. //
  59. HWND sbrCreateSessionStatusbar(HSESSION hSession);
  60. LRESULT APIENTRY sbrWndProc(HWND hwnd, UINT uMsg, WPARAM wPar, LPARAM lPar);
  61. void CALLBACK sbrTimerProc(void *pvData, long uTime);
  62. void sbr_WM_DRAWITEM(HWND hwnd, LPDRAWITEMSTRUCT lpdis);