Source code of Windows XP (NT5)
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.

101 lines
3.5 KiB

  1. /*++ BUILD Version: 0001
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * COMBCOM.H
  8. *
  9. * History:
  10. * Created 28-May-1991 by Jeff Parsons (jeffpar)
  11. * Copied from WIN31 and edited (as little as possible) for WOW16
  12. --*/
  13. /*
  14. * combcom.h - Common include file for combo boxs. This include file is used
  15. * in the combo box code, the single line edit control code, listbox code, and
  16. * static control code.
  17. */
  18. /* ID numbers (hMenu) for the child controls in the combo box */
  19. #define CBLISTBOXID 1000
  20. #define CBEDITID 1001
  21. #define CBBUTTONID 1002
  22. typedef struct tagCBox
  23. {
  24. HWND hwnd; /* Window for the combo box */
  25. HWND hwndParent; /* Parent of the combo box */
  26. RECT comboDownrc; /* Rectangle used for the "dropped"
  27. (listbox visible) combo box */
  28. RECT editrc; /* Rectangle for the edit control/static text
  29. area */
  30. RECT buttonrc; /* Rectangle where the dropdown button is */
  31. HWND editHwnd; /* Edit control window handle */
  32. HWND listboxHwnd; /* List box control window handle */
  33. WORD CBoxStyle; /* Combo box style */
  34. WORD OwnerDraw; /* Owner draw combo box if nonzero. value
  35. * specifies either fixed or varheight
  36. */
  37. WORD fFocus:1; /* Combo box has focus? */
  38. WORD fNoRedraw:1; /* Stop drawing? */
  39. WORD fNoEdit:1; /* True if editing is not allowed in the edit
  40. * window.
  41. */
  42. WORD fButtonDownClicked:1;/* Was the popdown button just clicked and
  43. mouse still down? */
  44. WORD fButtonInverted:1; /* Is the dropdown button in an inverted state?
  45. */
  46. WORD fLBoxVisible:1; /* Is list box visible? (dropped down?) */
  47. WORD fKeyboardSelInListBox:1; /* Is the user keyboarding through the
  48. * listbox. So that we don't hide the
  49. * listbox on selchanges caused by the
  50. * user keyboard through it but we do
  51. * hide it if the mouse causes the
  52. * selchange.
  53. */
  54. WORD fExtendedUI:1; /* Are we doing TandyT's UI changes on this
  55. * combo box?
  56. */
  57. HANDLE hFont; /* Font for the combo box */
  58. LONG styleSave; /* Save the style bits when creating window.
  59. * Needed because we strip off some bits and
  60. * pass them on to the listbox or edit box.
  61. */
  62. } CBOX;
  63. typedef CBOX NEAR *PCBOX;
  64. typedef CBOX FAR *LPCBOX;
  65. /*
  66. * For CBOX.cBoxType field, we define the following combo box styles. These
  67. * numbers are the same as the CBS_ style codes as defined in windows.h.
  68. */
  69. #define SSIMPLE 1
  70. #define SDROPDOWN 2
  71. #define SDROPDOWNLIST 3
  72. /* Owner draw types */
  73. #define OWNERDRAWFIXED 1
  74. #define OWNERDRAWVAR 2
  75. /*
  76. * Special styles for static controls, edit controls & listboxes so that we
  77. * can do combo box specific stuff in their wnd procs.
  78. */
  79. #define ES_COMBOBOX 0x0200L
  80. #define LBS_COMBOBOX 0x8000L
  81. /* Special internal combo box messages */
  82. #define CBEC_SETCOMBOFOCUS CB_MSGMAX+1
  83. #define CBEC_KILLCOMBOFOCUS CB_MSGMAX+2
  84. /* Special messages for listboxes so give combo box support */
  85. #define LBCB_CARETON LB_MSGMAX+1
  86. #define LBCB_CARETOFF LB_MSGMAX+2
  87. /* Common Procedures */
  88. VOID FAR PASCAL CBUpdateEditWindow(register PCBOX);
  89. VOID FAR PASCAL CBHideListBoxWindow(register PCBOX pcbox, BOOL fNotifyParent);
  90. VOID FAR PASCAL CBShowListBoxWindow(register PCBOX);