win-ffi 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/lib/win-ffi/enums/color_types.rb +61 -0
  4. data/lib/win-ffi/enums/comctl32/init_common_controls.rb +32 -0
  5. data/lib/win-ffi/enums/comctl32/window/style/window_class_style.rb +7 -0
  6. data/lib/win-ffi/enums/comctl32.rb +5 -0
  7. data/lib/win-ffi/enums/comdlg32/find_replace.rb +28 -0
  8. data/lib/win-ffi/enums/comdlg32/font.rb +33 -0
  9. data/lib/win-ffi/enums/extended_name_format.rb +17 -0
  10. data/lib/win-ffi/enums/firmware_type.rb +12 -0
  11. data/lib/win-ffi/enums/gdi32/device_context.rb +29 -0
  12. data/lib/win-ffi/enums/gdi32/dib.rb +8 -0
  13. data/lib/win-ffi/enums/gdi32/hatch_styles.rb +15 -0
  14. data/lib/win-ffi/enums/gdi32/pfd_flags.rb +28 -0
  15. data/lib/win-ffi/enums/gdi32/pfd_layer_type.rb +7 -0
  16. data/lib/win-ffi/enums/gdi32/pfd_type.rb +7 -0
  17. data/lib/win-ffi/enums/gdi32/raster_operations.rb +22 -0
  18. data/lib/win-ffi/enums/gdi32.rb +90 -0
  19. data/lib/win-ffi/enums/kernel32/activation_context.rb +17 -0
  20. data/lib/win-ffi/enums/kernel32/computer_name_format.rb +19 -0
  21. data/lib/win-ffi/enums/kernel32/format_message_flags.rb +16 -0
  22. data/lib/win-ffi/enums/kernel32/get_module_handle_ex_flag.rb +7 -0
  23. data/lib/win-ffi/enums/kernel32/global_alloc_flags.rb +14 -0
  24. data/lib/win-ffi/enums/kernel32/handle.rb +9 -0
  25. data/lib/win-ffi/enums/kernel32/heap_flags.rb +14 -0
  26. data/lib/win-ffi/enums/kernel32/local_flags.rb +20 -0
  27. data/lib/win-ffi/enums/kernel32/memory.rb +12 -0
  28. data/lib/win-ffi/enums/kernel32/memory_flags.rb +22 -0
  29. data/lib/win-ffi/enums/kernel32/memory_protection_constants.rb +20 -0
  30. data/lib/win-ffi/enums/kernel32/set_error_mode_flags.rb +11 -0
  31. data/lib/win-ffi/enums/kernel32/sound_flags.rb +24 -0
  32. data/lib/win-ffi/enums/kernel32/volume.rb +13 -0
  33. data/lib/win-ffi/enums/kernel32.rb +5 -0
  34. data/lib/win-ffi/enums/lr.rb +48 -0
  35. data/lib/win-ffi/enums/netapi21/net_api_status.rb +25 -0
  36. data/lib/win-ffi/enums/netapi32.rb +5 -0
  37. data/lib/win-ffi/enums/system_info.rb +54 -0
  38. data/lib/win-ffi/enums/user32/append_menu_flags.rb +21 -0
  39. data/lib/win-ffi/enums/user32/border_flags.rb +29 -0
  40. data/lib/win-ffi/enums/user32/clipboard_formats.rb +31 -0
  41. data/lib/win-ffi/enums/user32/device_notify_flags.rb +17 -0
  42. data/lib/win-ffi/enums/user32/draw_caption_flags.rb +16 -0
  43. data/lib/win-ffi/enums/user32/draw_frame_control_flags.rb +15 -0
  44. data/lib/win-ffi/enums/user32/draw_frame_control_state_flags.rb +44 -0
  45. data/lib/win-ffi/enums/user32/edge_flags.rb +20 -0
  46. data/lib/win-ffi/enums/user32/feedback_type.rb +21 -0
  47. data/lib/win-ffi/enums/user32/get_ancestor_flags.rb +12 -0
  48. data/lib/win-ffi/enums/user32/icon.rb +19 -0
  49. data/lib/win-ffi/enums/user32/image.rb +12 -0
  50. data/lib/win-ffi/enums/user32/key_event_flags.rb +11 -0
  51. data/lib/win-ffi/enums/user32/keyboard_layout_flags.rb +57 -0
  52. data/lib/win-ffi/enums/user32/keyboard_modifiers.rb +16 -0
  53. data/lib/win-ffi/enums/user32/layered_window_attributes_flags.rb +12 -0
  54. data/lib/win-ffi/enums/user32/map_virtual_key.rb +22 -0
  55. data/lib/win-ffi/enums/user32/message_filter.rb +11 -0
  56. data/lib/win-ffi/enums/user32/mouse_event_flags.rb +25 -0
  57. data/lib/win-ffi/enums/user32/mouse_keys_flags.rb +16 -0
  58. data/lib/win-ffi/enums/user32/mwmo.rb +17 -0
  59. data/lib/win-ffi/enums/user32/ocr.rb +32 -0
  60. data/lib/win-ffi/enums/user32/oic.rb +26 -0
  61. data/lib/win-ffi/enums/user32/pen_flags.rb +12 -0
  62. data/lib/win-ffi/enums/user32/pen_mask.rb +14 -0
  63. data/lib/win-ffi/enums/user32/pointer_flags.rb +82 -0
  64. data/lib/win-ffi/enums/user32/pointer_input_type.rb +13 -0
  65. data/lib/win-ffi/enums/user32/process_dpi_awareness.rb +12 -0
  66. data/lib/win-ffi/enums/user32/queue_status_flags.rb +36 -0
  67. data/lib/win-ffi/enums/user32/rim.rb +12 -0
  68. data/lib/win-ffi/enums/user32/touch_injection_flags.rb +13 -0
  69. data/lib/win-ffi/enums/user32/touch_mask.rb +13 -0
  70. data/lib/win-ffi/enums/user32/user_object_information_flags.rb +22 -0
  71. data/lib/win-ffi/enums/user32/virtual_key_flags.rb +214 -0
  72. data/lib/win-ffi/enums/user32/window/animate_window_flags.rb +31 -0
  73. data/lib/win-ffi/enums/user32/window/broadcast_system_flags.rb +20 -0
  74. data/lib/win-ffi/enums/user32/window/broadcast_system_message_flags.rb +12 -0
  75. data/lib/win-ffi/enums/user32/window/combo_box_message.rb +53 -0
  76. data/lib/win-ffi/enums/user32/window/get_class_long_flags.rb +34 -0
  77. data/lib/win-ffi/enums/user32/window/get_window_flags.rb +38 -0
  78. data/lib/win-ffi/enums/user32/window/get_window_long_flags.rb +16 -0
  79. data/lib/win-ffi/enums/user32/window/menu_flags.rb +54 -0
  80. data/lib/win-ffi/enums/user32/window/message_box_flags.rb +90 -0
  81. data/lib/win-ffi/enums/user32/window/message_box_return.rb +18 -0
  82. data/lib/win-ffi/enums/user32/window/notification/button_notification.rb +20 -0
  83. data/lib/win-ffi/enums/user32/window/notification/edit_notification.rb +19 -0
  84. data/lib/win-ffi/enums/user32/window/notification/static_notification.rb +13 -0
  85. data/lib/win-ffi/enums/user32/window/peek_message_flags.rb +13 -0
  86. data/lib/win-ffi/enums/user32/window/set_window_pos_flags.rb +48 -0
  87. data/lib/win-ffi/enums/user32/window/show_window_flags.rb +41 -0
  88. data/lib/win-ffi/enums/user32/window/smto.rb +22 -0
  89. data/lib/win-ffi/enums/user32/window/style/button_control_style.rb +37 -0
  90. data/lib/win-ffi/enums/user32/window/style/combo_box_style.rb +22 -0
  91. data/lib/win-ffi/enums/user32/window/style/edit_style.rb +23 -0
  92. data/lib/win-ffi/enums/user32/window/style/static_style.rb +45 -0
  93. data/lib/win-ffi/enums/user32/window/style/window_class_style.rb +50 -0
  94. data/lib/win-ffi/enums/user32/window/style/window_style.rb +85 -0
  95. data/lib/win-ffi/enums/user32/window/style/window_style_ex.rb +98 -0
  96. data/lib/win-ffi/enums/user32/window/system_menu_command.rb +37 -0
  97. data/lib/win-ffi/enums/user32/window/system_metrics_flags.rb +300 -0
  98. data/lib/win-ffi/enums/user32/window/system_parameters_info_action.rb +225 -0
  99. data/lib/win-ffi/enums/user32/window/system_parameters_info_flags.rb +246 -0
  100. data/lib/win-ffi/enums/user32/window/track_popup_menu_flags.rb +70 -0
  101. data/lib/win-ffi/enums/user32/window/window_long.rb +22 -0
  102. data/lib/win-ffi/enums/user32/window/window_messages.rb +222 -0
  103. data/lib/win-ffi/enums/user32/window_hook.rb +56 -0
  104. data/lib/win-ffi/enums/user32.rb +5 -0
  105. data/lib/win-ffi/functions/advapi32/process.rb +33 -0
  106. data/lib/win-ffi/functions/advapi32/system_info.rb +17 -0
  107. data/lib/win-ffi/functions/comctl32/control.rb +11 -0
  108. data/lib/win-ffi/functions/comctl32/listbox.rb +20 -0
  109. data/lib/win-ffi/functions/comctl32.rb +7 -0
  110. data/lib/win-ffi/functions/comdlg32/color.rb +9 -0
  111. data/lib/win-ffi/functions/comdlg32/error.rb +6 -0
  112. data/lib/win-ffi/functions/comdlg32/find_replace.rb +9 -0
  113. data/lib/win-ffi/functions/comdlg32/font.rb +9 -0
  114. data/lib/win-ffi/functions/comdlg32.rb +7 -0
  115. data/lib/win-ffi/functions/gdi32/bitmap.rb +275 -0
  116. data/lib/win-ffi/functions/gdi32/brush.rb +54 -0
  117. data/lib/win-ffi/functions/gdi32/device_context.rb +126 -0
  118. data/lib/win-ffi/functions/gdi32/filled_shape.rb +68 -0
  119. data/lib/win-ffi/functions/gdi32/font.rb +9 -0
  120. data/lib/win-ffi/functions/gdi32/metafile.rb +173 -0
  121. data/lib/win-ffi/functions/gdi32/opengl.rb +29 -0
  122. data/lib/win-ffi/functions/gdi32/painting_drawing.rb +50 -0
  123. data/lib/win-ffi/functions/gdi32/text.rb +376 -0
  124. data/lib/win-ffi/functions/gdi32.rb +7 -0
  125. data/lib/win-ffi/functions/kernel32/activation.rb +22 -0
  126. data/lib/win-ffi/functions/kernel32/dll.rb +92 -0
  127. data/lib/win-ffi/functions/kernel32/error.rb +28 -0
  128. data/lib/win-ffi/functions/kernel32/filesystem.rb +22 -0
  129. data/lib/win-ffi/functions/kernel32/handle.rb +29 -0
  130. data/lib/win-ffi/functions/kernel32/memory.rb +478 -0
  131. data/lib/win-ffi/functions/kernel32/process.rb +359 -0
  132. data/lib/win-ffi/functions/kernel32/resource.rb +141 -0
  133. data/lib/win-ffi/functions/kernel32/sound.rb +10 -0
  134. data/lib/win-ffi/functions/kernel32/string.rb +38 -0
  135. data/lib/win-ffi/functions/kernel32/system_info.rb +183 -0
  136. data/lib/win-ffi/functions/kernel32/time.rb +220 -0
  137. data/lib/win-ffi/functions/kernel32/volume.rb +130 -0
  138. data/lib/win-ffi/functions/kernel32.rb +15 -0
  139. data/lib/win-ffi/functions/msimg32/bitmap.rb +46 -0
  140. data/lib/win-ffi/functions/msvcrt/handle.rb +13 -0
  141. data/lib/win-ffi/functions/netapi32/network_management.rb +13 -0
  142. data/lib/win-ffi/functions/netapi32.rb +7 -0
  143. data/lib/win-ffi/functions/ntdll/system_info.rb +14 -0
  144. data/lib/win-ffi/functions/secur32/system_info.rb +30 -0
  145. data/lib/win-ffi/functions/shell32/icon.rb +49 -0
  146. data/lib/win-ffi/functions/shutdown.rb +84 -0
  147. data/lib/win-ffi/functions/thread.rb +230 -0
  148. data/lib/win-ffi/functions/user32/accessibility.rb +23 -0
  149. data/lib/win-ffi/functions/user32/authorization.rb +19 -0
  150. data/lib/win-ffi/functions/user32/bitmap.rb +11 -0
  151. data/lib/win-ffi/functions/user32/brush.rb +10 -0
  152. data/lib/win-ffi/functions/user32/caret.rb +36 -0
  153. data/lib/win-ffi/functions/user32/clipboard.rb +84 -0
  154. data/lib/win-ffi/functions/user32/controls/button.rb +23 -0
  155. data/lib/win-ffi/functions/user32/controls/combobox.rb +29 -0
  156. data/lib/win-ffi/functions/user32/controls/listbox.rb +25 -0
  157. data/lib/win-ffi/functions/user32/controls/scrollbar.rb +95 -0
  158. data/lib/win-ffi/functions/user32/cursor.rb +74 -0
  159. data/lib/win-ffi/functions/user32/dde.rb +214 -0
  160. data/lib/win-ffi/functions/user32/desktop.rb +76 -0
  161. data/lib/win-ffi/functions/user32/device.rb +17 -0
  162. data/lib/win-ffi/functions/user32/device_context.rb +62 -0
  163. data/lib/win-ffi/functions/user32/display.rb +37 -0
  164. data/lib/win-ffi/functions/user32/error.rb +10 -0
  165. data/lib/win-ffi/functions/user32/filled_shape.rb +23 -0
  166. data/lib/win-ffi/functions/user32/gesture.rb +38 -0
  167. data/lib/win-ffi/functions/user32/hook.rb +123 -0
  168. data/lib/win-ffi/functions/user32/icon.rb +98 -0
  169. data/lib/win-ffi/functions/user32/input.rb +23 -0
  170. data/lib/win-ffi/functions/user32/keyboard.rb +177 -0
  171. data/lib/win-ffi/functions/user32/keyboard_accelerators.rb +37 -0
  172. data/lib/win-ffi/functions/user32/mouse.rb +60 -0
  173. data/lib/win-ffi/functions/user32/multiple_display_monitors.rb +43 -0
  174. data/lib/win-ffi/functions/user32/multiple_document_interface.rb +44 -0
  175. data/lib/win-ffi/functions/user32/painting_drawing.rb +173 -0
  176. data/lib/win-ffi/functions/user32/pointer.rb +154 -0
  177. data/lib/win-ffi/functions/user32/power.rb +28 -0
  178. data/lib/win-ffi/functions/user32/print.rb +14 -0
  179. data/lib/win-ffi/functions/user32/process.rb +30 -0
  180. data/lib/win-ffi/functions/user32/raw_input.rb +55 -0
  181. data/lib/win-ffi/functions/user32/rect.rb +67 -0
  182. data/lib/win-ffi/functions/user32/resource.rb +28 -0
  183. data/lib/win-ffi/functions/user32/shell.rb +29 -0
  184. data/lib/win-ffi/functions/user32/string.rb +98 -0
  185. data/lib/win-ffi/functions/user32/text.rb +48 -0
  186. data/lib/win-ffi/functions/user32/touch.rb +69 -0
  187. data/lib/win-ffi/functions/user32/transform.rb +22 -0
  188. data/lib/win-ffi/functions/user32/window/configuration.rb +15 -0
  189. data/lib/win-ffi/functions/user32/window/dialog.rb +167 -0
  190. data/lib/win-ffi/functions/user32/window/menu.rb +245 -0
  191. data/lib/win-ffi/functions/user32/window/message.rb +168 -0
  192. data/lib/win-ffi/functions/user32/window/properties.rb +50 -0
  193. data/lib/win-ffi/functions/user32/window/timer.rb +37 -0
  194. data/lib/win-ffi/functions/user32/window/window.rb +546 -0
  195. data/lib/win-ffi/functions/user32/window/window_class.rb +109 -0
  196. data/lib/win-ffi/functions/user32/window/window_proc.rb +29 -0
  197. data/lib/win-ffi/functions/user32/window_station.rb +39 -0
  198. data/lib/win-ffi/functions/user32.rb +161 -0
  199. data/lib/win-ffi/functions/winmm.rb +547 -0
  200. data/lib/win-ffi/functions/wtsapi32/process.rb +12 -0
  201. data/lib/win-ffi/lib_base.rb +54 -0
  202. data/lib/win-ffi/struct.rb +15 -0
  203. data/lib/win-ffi/structs/comctl32/init_common_controls_ex.rb +10 -0
  204. data/lib/win-ffi/structs/comdlg32/choose_color.rb +23 -0
  205. data/lib/win-ffi/structs/comdlg32/choose_font.rb +28 -0
  206. data/lib/win-ffi/structs/comdlg32/find_replace.rb +24 -0
  207. data/lib/win-ffi/structs/gdi32/abc.rb +9 -0
  208. data/lib/win-ffi/structs/gdi32/abcfloat.rb +10 -0
  209. data/lib/win-ffi/structs/gdi32/bitmap.rb +13 -0
  210. data/lib/win-ffi/structs/gdi32/bitmap_info.rb +11 -0
  211. data/lib/win-ffi/structs/gdi32/bitmap_info_header.rb +17 -0
  212. data/lib/win-ffi/structs/gdi32/blend_function.rb +10 -0
  213. data/lib/win-ffi/structs/gdi32/display_device.rb +12 -0
  214. data/lib/win-ffi/structs/gdi32/handle_table.rb +7 -0
  215. data/lib/win-ffi/structs/gdi32/kerning_pair.rb +9 -0
  216. data/lib/win-ffi/structs/gdi32/log_brush.rb +10 -0
  217. data/lib/win-ffi/structs/gdi32/log_font.rb +20 -0
  218. data/lib/win-ffi/structs/gdi32/meta_file_pict.rb +10 -0
  219. data/lib/win-ffi/structs/gdi32/palette_entry.rb +10 -0
  220. data/lib/win-ffi/structs/gdi32/pixel_format_descriptor.rb +57 -0
  221. data/lib/win-ffi/structs/gdi32/rgb_quad.rb +10 -0
  222. data/lib/win-ffi/structs/kernel32/actctx.rb +22 -0
  223. data/lib/win-ffi/structs/netapi32/wksta_info_100.rb +9 -0
  224. data/lib/win-ffi/structs/os_version_info.rb +10 -0
  225. data/lib/win-ffi/structs/os_version_info_ex.rb +70 -0
  226. data/lib/win-ffi/structs/paint_struct.rb +12 -0
  227. data/lib/win-ffi/structs/point.rb +10 -0
  228. data/lib/win-ffi/structs/rect.rb +28 -0
  229. data/lib/win-ffi/structs/size.rb +6 -0
  230. data/lib/win-ffi/structs/user32/controls/combobox_info.rb +13 -0
  231. data/lib/win-ffi/structs/user32/controls/scroll_info.rb +13 -0
  232. data/lib/win-ffi/structs/user32/controls/scrollbar_info.rb +13 -0
  233. data/lib/win-ffi/structs/user32/cursor_info.rb +10 -0
  234. data/lib/win-ffi/structs/user32/display_device.rb +12 -0
  235. data/lib/win-ffi/structs/user32/draw_text_params.rb +11 -0
  236. data/lib/win-ffi/structs/user32/icon_info.rb +11 -0
  237. data/lib/win-ffi/structs/user32/icon_info_ex.rb +15 -0
  238. data/lib/win-ffi/structs/user32/last_input_info.rb +8 -0
  239. data/lib/win-ffi/structs/user32/mouse_move_point.rb +10 -0
  240. data/lib/win-ffi/structs/user32/msg.rb +16 -0
  241. data/lib/win-ffi/structs/user32/pointer_info.rb +25 -0
  242. data/lib/win-ffi/structs/user32/pointer_pen_info.rb +18 -0
  243. data/lib/win-ffi/structs/user32/pointer_touch_info.rb +17 -0
  244. data/lib/win-ffi/structs/user32/raw_input_device_list.rb +10 -0
  245. data/lib/win-ffi/structs/user32/raw_input_header.rb +10 -0
  246. data/lib/win-ffi/structs/user32/touch_hit_testing_input.rb +11 -0
  247. data/lib/win-ffi/structs/user32/touch_hit_testing_proximity_evaluation.rb +8 -0
  248. data/lib/win-ffi/structs/user32/track_mouse_event.rb +10 -0
  249. data/lib/win-ffi/structs/user32/window/alt_tab_info.rb +17 -0
  250. data/lib/win-ffi/structs/user32/window/bs_info.rb +12 -0
  251. data/lib/win-ffi/structs/user32/window/create_struct.rb +22 -0
  252. data/lib/win-ffi/structs/user32/window/dlg_template.rb +13 -0
  253. data/lib/win-ffi/structs/user32/window/flashw_info.rb +11 -0
  254. data/lib/win-ffi/structs/user32/window/gui_thread_info.rb +17 -0
  255. data/lib/win-ffi/structs/user32/window/luid.rb +8 -0
  256. data/lib/win-ffi/structs/user32/window/menu_info.rb +13 -0
  257. data/lib/win-ffi/structs/user32/window/menu_item_info.rb +18 -0
  258. data/lib/win-ffi/structs/user32/window/menu_item_template.rb +9 -0
  259. data/lib/win-ffi/structs/user32/window/menubar_info.rb +12 -0
  260. data/lib/win-ffi/structs/user32/window/msgbox_params.rb +16 -0
  261. data/lib/win-ffi/structs/user32/window/non_client_metrics.rb +29 -0
  262. data/lib/win-ffi/structs/user32/window/title_bar_info.rb +9 -0
  263. data/lib/win-ffi/structs/user32/window/tpm_params.rb +8 -0
  264. data/lib/win-ffi/structs/user32/window/update_layered_window_info.rb +22 -0
  265. data/lib/win-ffi/structs/user32/window/window_placement.rb +32 -0
  266. data/lib/win-ffi/structs/user32/window/window_pos.rb +46 -0
  267. data/lib/win-ffi/structs/user32/window/wndclass.rb +19 -0
  268. data/lib/win-ffi/structs/user32/window/wndclassex.rb +40 -0
  269. data/lib/win-ffi/version.rb +3 -0
  270. data/lib/win-ffi.rb +42 -0
  271. metadata +363 -0
@@ -0,0 +1,34 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ # User32::ClassLong
6
+ # Class Field Offsets
7
+ GetClassLongFlags = enum :get_class_long_flags,
8
+ [
9
+ :MENUNAME, -8, #Replaces the address of the menu name string. The string identifies the menu resource
10
+ # associated with the class.
11
+
12
+ :HBRBACKGROUND, -10, #Replaces a handle to the background brush associated with the class.
13
+
14
+ :HCURSOR, -12, #Replaces a handle to the cursor associated with the class.
15
+
16
+ :HICON, -14, #Replaces a handle to the icon associated with the class.
17
+
18
+ :HMODULE, -16, #Replaces a handle to the module that registered the class.
19
+
20
+ :CBWNDEXTRA, -18, #Sets the size, in bytes, of the extra window memory associated with each window in the
21
+ # class. Setting this value does not change the number of extra bytes already allocated. For information on
22
+ # how to access this memory, see SetWindowLong.
23
+
24
+ :CBCLSEXTRA, -20, #Sets the size, in bytes, of the extra memory associated with the class. Setting this
25
+ # value does not change the number of extra bytes already allocated.
26
+
27
+ :WNDPROC, -24, #Replaces the address of the window procedure associated with the class.
28
+
29
+ :STYLE, -26, #Replaces the window-class style bits.
30
+
31
+ :HICONSM, -34, #Replace a handle to the small icon associated with the class.
32
+ ]
33
+ end
34
+ end
@@ -0,0 +1,38 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ GetWindowFlags = enum :get_window_flags, [
6
+ :HWNDFIRST, 0, # The retrieved handle identifies the window of the same type that is highest in the Z order.
7
+ # If the specified window is a topmost window, the handle identifies a topmost window. If the specified window
8
+ # is a top-level window, the handle identifies a top-level window. If the specified window is a child window,
9
+ # the handle identifies a sibling window.
10
+
11
+ :HWNDLAST, 1, # The retrieved handle identifies the window of the same type that is lowest in the Z order.
12
+ # If the specified window is a topmost window, the handle identifies a topmost window. If the specified window
13
+ # is a top-level window, the handle identifies a top-level window. If the specified window is a child window,
14
+ # the handle identifies a sibling window.
15
+
16
+ :HWNDNEXT, 2, # The retrieved handle identifies the window below the specified window in the Z order.
17
+ # If the specified window is a topmost window, the handle identifies a topmost window. If the specified window
18
+ # is a top-level window, the handle identifies a top-level window. If the specified window is a child window,
19
+ # the handle identifies a sibling window.
20
+
21
+ :HWNDPREV, 3, # The retrieved handle identifies the window above the specified window in the Z order.
22
+ # If the specified window is a topmost window, the handle identifies a topmost window. If the specified window
23
+ # is a top-level window, the handle identifies a top-level window. If the specified window is a child window,
24
+ # the handle identifies a sibling window.
25
+
26
+ :OWNER, 4, # The retrieved handle identifies the specified window's owner window, if any. For more information,
27
+ # see Owned Windows.
28
+
29
+ :CHILD, 5, # The retrieved handle identifies the child window at the top of the Z order, if the specified window
30
+ # is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the
31
+ # specified window. It does not examine descendant windows.
32
+
33
+ :ENABLEDPOPUP, 6, # The retrieved handle identifies the enabled popup window owned by the specified window
34
+ # (the search uses the first such window found using :HWNDNEXT); otherwise, if there are no enabled popup
35
+ # windows, the retrieved handle is that of the specified window.
36
+ ]
37
+ end
38
+ end
@@ -0,0 +1,16 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ GetWindowLongFlags = enum :get_window_long_flags,
6
+ [
7
+ :WNDPROC, -4, # Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure.
8
+ :HINSTANCE, -6, # Retrieves a handle to the application instance.
9
+ :HWNDPARENT, -8, # Retrieves a handle to the parent window, if any.
10
+ :ID, -12, # Retrieves the identifier of the window.
11
+ :STYLE, -16, # Retrieves the window styles.
12
+ :EXSTYLE, -20, # Retrieves the extended window styles.
13
+ :USERDATA, -21, # Retrieves the user data associated with the window. This data is intended for use by the application that created the window. Its value is initially zero.
14
+ ]
15
+ end
16
+ end
@@ -0,0 +1,54 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ MenuFlags = enum :menu_flags,
6
+ [
7
+ :BYCOMMAND, 0x00000000,
8
+ :ENABLED, 0x00000000,
9
+ :STRING, 0x00000000,
10
+ :UNCHECKED, 0x00000000,
11
+ :INSERT, 0x00000000,
12
+ :UNHILITE, 0x00000000,
13
+ :GRAYED, 0x00000001,
14
+ :DISABLED, 0x00000002,
15
+ :BITMAP, 0x00000004,
16
+ :CHECKED, 0x00000008,
17
+ :POPUP, 0x00000010,
18
+ :MENUBARBREAK, 0x00000020,
19
+ :MENUBREAK, 0x00000040,
20
+ :CHANGE, 0x00000080,
21
+ :HILITE, 0x00000080,
22
+ :END, 0x00000080,
23
+ :OWNERDRAW, 0x00000100,
24
+ :APPEND, 0x00000100,
25
+ :DELETE, 0x00000200,
26
+ :USECHECKBITMAPS, 0x00000200,
27
+ :BYPOSITION, 0x00000400,
28
+ :SEPARATOR, 0x00000800,
29
+ :REMOVE, 0x00001000,
30
+ :DEFAULT, 0x00001000,
31
+ :SYSMENU, 0x00002000,
32
+ :HELP, 0x00004000,
33
+ :RIGHTJUSTIFY, 0x00004000,
34
+ :MOUSESELECT, 0x00008000
35
+ ]
36
+
37
+ # System Objec
38
+
39
+ OBJID_WINDOW = 0x00000000
40
+ OBJID_SYSMENU = 0xFFFFFFFF
41
+ OBJID_TITLEBAR = 0xFFFFFFFE
42
+ OBJID_MENU = 0xFFFFFFFD
43
+ OBJID_CLIENT = 0xFFFFFFFC
44
+ OBJID_VSCROLL = 0xFFFFFFFB
45
+ OBJID_HSCROLL = 0xFFFFFFFA
46
+ OBJID_SIZEGRIP = 0xFFFFFFF9
47
+ OBJID_CARET = 0xFFFFFFF8
48
+ OBJID_CURSOR = 0xFFFFFFF7
49
+ OBJID_ALERT = 0xFFFFFFF6
50
+ OBJID_SOUND = 0xFFFFFFF5
51
+ OBJID_QUERYCLASSNAMEIDX = 0xFFFFFFF4
52
+ OBJID_NATIVEOM = 0xFFFFFFF0
53
+ end
54
+ end
@@ -0,0 +1,90 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ MessageBoxFlags = enum :message_box_flags,
6
+ [
7
+ # Buttons ---------------------
8
+
9
+ :ABORTRETRYIGNORE, 0x00000002, # Push buttons: Abort, Retry, and Ignore.
10
+ # The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE.
11
+ :CANCELTRYCONTINUE, 0x00000006,
12
+ # Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a
13
+ # WM_HELP message to the owner.
14
+ :HELP, 0x00004000,
15
+ :OK, 0x00000000, # Push button: OK. This is the default.
16
+ :OKCANCEL, 0x00000001, # Push buttons: OK and Cancel.
17
+ :RETRYCANCEL, 0x00000005, # Push buttons: Retry and Cancel.
18
+ :YESNO, 0x00000004, # Push buttons: Yes and No.
19
+ :YESNOCANCEL, 0x00000003, # Push buttons: Yes, No, and Cancel.
20
+
21
+ # Icons -----------------------
22
+
23
+ :ICONEXCLAMATION, 0x00000030, # An exclamation-point icon
24
+ :ICONWARNING, 0x00000030, # Same as above
25
+ :ICONINFORMATION, 0x00000040, # Lowercase letter i in a circle
26
+ :ICONASTERISK, 0x00000040, # Same as above
27
+ :ICONQUESTION, 0x00000020, # A question-mark icon. Not Recomended
28
+ :ICONSTOP, 0x00000010, # A stop-sign icon
29
+ :ICONERROR, 0x00000010, # Same as above
30
+ :ICONHAND, 0x00000010, # Same as above
31
+
32
+ # Modality --------------------
33
+
34
+ # The user must respond to the message box before continuing work in the
35
+ # window identified by the hWnd parameter. However, the user can move to the
36
+ # windows of other threads and work in those windows.
37
+ # Depending on the hierarchy of windows in the application, the user may be
38
+ # able to move to other windows within the thread. All child windows of the
39
+ # parent of the message box are automatically disabled, but pop-up windows are
40
+ # not.
41
+ # MB_APPLMODAL is the default if neither MB_SYSTEMMODAL nor MB_TASKMODAL
42
+ # is specified.
43
+ :APPLMODAL, 0x00000000,
44
+ # Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style
45
+ # Use system-modal message boxes to notify the user of serious, potentially
46
+ # damaging errors that require immediate attention (for example, running out
47
+ # of memory). This flag has no effect on the user's ability to interact with
48
+ # windows other than those associated with hWnd.
49
+ :SYSTEMMODAL, 0x00001000,
50
+ # Same as MB_APPLMODAL except that all the top-level windows belonging to the
51
+ # current thread are disabled if the hWnd parameter is NULL. Use this flag
52
+ # when the calling application or library does not have a window handle
53
+ # available but still needs to prevent input to other windows in the calling
54
+ # thread without suspending other threads.
55
+ :TASKMODAL, 0x00002000,
56
+
57
+ # Other -----------------------
58
+
59
+ # Same as desktop of the interactive window station. For more information,
60
+ # see Window Stations.
61
+ # If the current input desktop is not the default desktop, MessageBox does not
62
+ # return until the user switches to the default desktop.
63
+ :DEFAULT_DESKTOP_ONLY, 0x00020000,
64
+ :RIGHT, 0x00080000, # The text is right-justified.
65
+ # Displays message and caption text using right-to-left reading order on
66
+ # Hebrew and Arabic systems.
67
+ :RTLREADING, 0x00100000,
68
+ # The message box becomes the foreground window. Internally, the system calls
69
+ # the SetForegroundWindow function for the message box.
70
+ :SETFOREGROUND, 0x00010000, # The message box is created with the WS_EX_TOPMOST window style.
71
+
72
+ :TOPMOST, 0x00040000,
73
+ # The caller is a service notifying the user of an event. The function
74
+ # displays a message box on the current active desktop, even if there is no
75
+ # user logged on to the computer.
76
+ # Terminal Services: If the calling thread has an impersonation token, the
77
+ # function directs the message box to the session specified in the
78
+ # impersonation token.
79
+ # If this flag is set, the hWnd parameter must be NULL. This is so that the
80
+ # message box can appear on a desktop other than the desktop corresponding to
81
+ # the hWnd.
82
+ # For information on security considerations in regard to using this flag, see
83
+ # Interactive Services. In particular, be aware that this flag can produce
84
+ # interactive content on a locked desktop and should therefore be used for
85
+ # only a very limited set of scenarios, such as resource exhaustion.
86
+
87
+ :SERVICE_NOTIFICATION, 0x00200000,
88
+ ]
89
+ end
90
+ end
@@ -0,0 +1,18 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ MessageBoxReturn = enum :message_box_return,
6
+ [
7
+ :OK, 1, # The OK button was selected.
8
+ :CANCEL, 2, # The Cancel button was selected.
9
+ :ABORT, 3, # The Abort button was selected.
10
+ :RETRY, 4, # The Retry button was selected.
11
+ :IGNORE, 5, # The Ignore button was selected.
12
+ :YES, 6, # The Yes button was selected.
13
+ :NO, 7, # The No button was selected.
14
+ :TRYAGAIN, 10, # The Try Again button was selected.
15
+ :CONTINUE, 11 # The Continue button was selected.
16
+ ]
17
+ end
18
+ end
@@ -0,0 +1,20 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ ButtonNotification = enum :button_notification,
6
+ [
7
+ :CLICKED, 0,
8
+ :PAINT, 1,
9
+ :HILITE, 2,
10
+ :UNHILITE, 3,
11
+ :DISABLE, 4,
12
+ :DOUBLECLICKED, 5,
13
+ :PUSHED, 2,
14
+ :UNPUSHED, 3,
15
+ :DBLCLK, 5,
16
+ :SETFOCUS, 6,
17
+ :KILLFOCUS, 7,
18
+ ]
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ EditNotification = enum :edit_notification,
6
+ [
7
+ :SETFOCUS, 0x0100,
8
+ :KILLFOCUS, 0x0200,
9
+ :CHANGE, 0x0300,
10
+ :UPDATE, 0x0400,
11
+ :ERRSPACE, 0x0500,
12
+ :MAXTEXT, 0x0501,
13
+ :HSCROLL, 0x0601,
14
+ :VSCROLL, 0x0602,
15
+ :ALIGN_LTR_EC, 0x0700,
16
+ :ALIGN_RTL_EC, 0x0701
17
+ ]
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ StaticNotification = enum :static_notification,
6
+ [
7
+ :CLICKED, 0,
8
+ :DBLCLK, 1,
9
+ :ENABLE, 2,
10
+ :DISABLE, 3
11
+ ]
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ PeekMessageFlags = enum :peek_message_flags,
6
+ [
7
+ :NOREMOVE, 0x0000, # Messages are not removed from the queue after processing by PeekMessage.
8
+ :REMOVE, 0x0001, # Messages are removed from the queue after processing by PeekMessage.
9
+ :NOYIELD, 0x0002, # Prevents the system from releasing any thread that is waiting for the caller to go idle
10
+ # (see WaitForInputIdle). Combine this value with either PM_NOREMOVE or PM_REMOVE.
11
+ ]
12
+ end
13
+ end
@@ -0,0 +1,48 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ SetWindowPosFlags = enum :set_windows_pos_flags, [
6
+ :NOSIZE, 0x0001, # Retains the current size (ignores the cx and cy parameters).
7
+
8
+ :NOMOVE, 0x0002, # Retains the current position (ignores X and Y parameters).
9
+
10
+ :NOZORDER, 0x0004, # Retains the current Z order (ignores the hWndInsertAfter parameter).
11
+
12
+ :NOREDRAW, 0x0008, # Does not redraw changes. If this flag is set, no repainting of any kind occurs. This
13
+ # applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the
14
+ # parent window uncovered as a result of the window being moved. When this flag is set, the application must
15
+ # explicitly invalidate or redraw any parts of the window and parent window that need redrawing.
16
+
17
+ :NOACTIVATE, 0x0010, # Does not activate the window. If this flag is not set, the window is activated and moved
18
+ # to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter
19
+ # parameter).
20
+
21
+ :DRAWFRAME, 0x0020, # Draws a frame (defined in the window's class description) around the window.
22
+
23
+ :FRAMECHANGED, 0x0020, # Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE
24
+ # message to the window, even if the window's size is not being changed. If this flag is not specified,
25
+ # WM_NCCALCSIZE is sent only when the window's size is being changed.
26
+
27
+ :SHOWWINDOW, 0x0040, # Displays the window.
28
+
29
+ :HIDEWINDOW, 0x0080, # Hides the window.
30
+
31
+ :NOCOPYBITS, 0x0100, # Discards the entire contents of the client area. If this flag is not specified, the valid
32
+ # contents of the client area are saved and copied back into the client area after the window is sized or
33
+ # repositioned.
34
+
35
+ :NOOWNERZORDER, 0x0200, # Does not change the owner window's position in the Z order.
36
+
37
+ :NOREPOSITION, 0x0200, # Same as the :NOOWNERZORDER flag.
38
+
39
+ :NOSENDCHANGING, 0x0400, # Prevents the window from receiving the WM_WINDOWPOSCHANGING message.
40
+
41
+ :DEFERERASE, 0x2000, # Prevents generation of the WM_SYNCPAINT message.
42
+
43
+ :ASYNCWINDOWPOS, 0x4000, # If the calling thread and the thread that owns the window are attached to different
44
+ # input queues, the system posts the request to the thread that owns the window. This prevents the calling
45
+ # thread from blocking its execution while other threads process the request.
46
+ ]
47
+ end
48
+ end
@@ -0,0 +1,41 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ ShowWindowFlags = enum :show_window, [
6
+ :HIDE, #Hides the window and activates another window.
7
+
8
+ :SHOWNORMAL, #Activates and displays a window. If the window is minimized or maximized, the system restores
9
+ # it to its original size and position. An application should specify this flag when displaying the window for the first time.
10
+
11
+ :SHOWMINIMIZED, #Activates the window and displays it as a minimized window.
12
+
13
+ :MAXIMIZE, #Maximizes the specified window.
14
+
15
+ :SHOWMAXIMIZED, 3, #Activates the window and displays it as a maximized window.
16
+
17
+ :SHOWNOACTIVATE, #Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except
18
+ # the window is not activated.
19
+
20
+ :SHOW, #Activates the window and displays it in its current size and position.
21
+
22
+ :MINIMIZE, #Minimizes the specified window and activates the next top-level window in the Z order.
23
+
24
+ :SHOWMINNOACTIVE, #Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except
25
+ # the window is not activated.
26
+
27
+ :SHOWNA, #Displays the window in its current size and position. This value is similar to SW_SHOW, except
28
+ # that the window is not activated.
29
+
30
+ :RESTORE, #Activates and displays the window. If the window is minimized or maximized, the system
31
+ # restores it to its original size and position. An application should specify this flag when restoring a
32
+ # minimized window.
33
+
34
+ :SHOWDEFAULT, #Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to
35
+ # the CreateProcess function by the program that started the application.
36
+
37
+ :FORCEMINIMIZE #Minimizes a window, even if the thread that owns the window is not responding. This flag
38
+ # should only be used when minimizing windows from a different thread.
39
+ ]
40
+ end
41
+ end
@@ -0,0 +1,22 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ SMTO = enum :smto,
6
+ [
7
+ :ABORTIFHUNG, 0x0002, # The function returns without waiting for the time-out period to elapse if the receiving
8
+ # thread appears to not respond or "hangs."
9
+
10
+ :BLOCK, 0x0001, # Prevents the calling thread from processing any other requests until the function returns.
11
+
12
+ :NORMAL, 0x0000, # The calling thread is not prevented from processing other requests while waiting for the
13
+ # function to return.
14
+
15
+ :NOTIMEOUTIFNOTHUNG, 0x0008, # The function does not enforce the time-out period as long as the receiving thread
16
+ # is processing messages.
17
+
18
+ :ERRORONEXIT, 0x0020, # The function should return 0 if the receiving window is destroyed or its owning thread
19
+ # dies while the message is being processed.
20
+ ]
21
+ end
22
+ end
@@ -0,0 +1,37 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ ButtonControlStyle = enum :button_control_style,
6
+ [
7
+ :PUSHBUTTON, 0x00000000,
8
+ :DEFPUSHBUTTON, 0x00000001,
9
+ :CHECKBOX, 0x00000002,
10
+ :AUTOCHECKBOX, 0x00000003,
11
+ :RADIOBUTTON, 0x00000004,
12
+ :N3STATE, 0x00000005,
13
+ :AUTO3STATE, 0x00000006,
14
+ :GROUPBOX, 0x00000007,
15
+ :USERBUTTON, 0x00000008,
16
+ :AUTORADIOBUTTON, 0x00000009,
17
+ :PUSHBOX, 0x0000000A,
18
+ :OWNERDRAW, 0x0000000B,
19
+ :TYPEMASK, 0x0000000F,
20
+ :LEFTTEXT, 0x00000020,
21
+ :TEXT, 0x00000000,
22
+ :ICON, 0x00000040,
23
+ :BITMAP, 0x00000080,
24
+ :LEFT, 0x00000100,
25
+ :RIGHT, 0x00000200,
26
+ :CENTER, 0x00000300,
27
+ :TOP, 0x00000400,
28
+ :BOTTOM, 0x00000800,
29
+ :VCENTER, 0x00000C00,
30
+ :PUSHLIKE, 0x00001000,
31
+ :MULTILINE, 0x00002000,
32
+ :NOTIFY, 0x00004000,
33
+ :FLAT, 0x00008000,
34
+ :RIGHTBUTTON, 0x00000020
35
+ ]
36
+ end
37
+ end
@@ -0,0 +1,22 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ ComboBoxStyle = enum :combo_box_style,
6
+ [
7
+ :SIMPLE, 0x0001,
8
+ :DROPDOWN, 0x0002,
9
+ :DROPDOWNLIST, 0x0003,
10
+ :OWNERDRAWFIXED, 0x0010,
11
+ :OWNERDRAWVARIABLE, 0x0020,
12
+ :AUTOHSCROLL, 0x0040,
13
+ :OEMCONVERT, 0x0080,
14
+ :SORT, 0x0100,
15
+ :HASSTRINGS, 0x0200,
16
+ :NOINTEGRALHEIGHT, 0x0400,
17
+ :DISABLENOSCROLL, 0x0800,
18
+ :UPPERCASE, 0x2000,
19
+ :LOWERCASE, 0x4000,
20
+ ]
21
+ end
22
+ end
@@ -0,0 +1,23 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ EditStyle = enum :edit_style,
6
+ [
7
+ :AUTOHSCROLL,
8
+ :AUTOVSCROLL,
9
+ :CENTER,
10
+ :LEFT,
11
+ :LOWERCASE,
12
+ :MULTILINE,
13
+ :NOHIDESEL,
14
+ :NUMBER,
15
+ :OEMCONVERT,
16
+ :PASSWORD,
17
+ :READONLY,
18
+ :RIGHT,
19
+ :UPPERCASE,
20
+ :WANTRETURN
21
+ ]
22
+ end
23
+ end
@@ -0,0 +1,45 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ StaticStyle = enum :static_style,
6
+ [
7
+ :LEFT, 0x00000000,
8
+ :CENTER, 0x00000001,
9
+ :RIGHT, 0x00000002,
10
+ :ICON, 0x00000003,
11
+ :BLACKRECT, 0x00000004,
12
+ :GRAYRECT, 0x00000005,
13
+ :WHITERECT, 0x00000006,
14
+ :BLACKFRAME, 0x00000007,
15
+ :GRAYFRAME, 0x00000008,
16
+ :WHITEFRAME, 0x00000009,
17
+ :USERITEM, 0x0000000A,
18
+ :SIMPLE, 0x0000000B,
19
+ :LEFTNOWORDWRAP, 0x0000000C,
20
+ :OWNERDRAW, 0x0000000D,
21
+ :BITMAP, 0x0000000E,
22
+ :ENHMETAFILE, 0x0000000F,
23
+ :ETCHEDHORZ, 0x00000010,
24
+ :ETCHEDVERT, 0x00000011,
25
+ :ETCHEDFRAME, 0x00000012,
26
+ :TYPEMASK, 0x0000001F,
27
+ :NOPREFIX, 0x00000080, # Don't do "&" character translation
28
+ :NOTIFY, 0x00000100,
29
+ :CENTERIMAGE, 0x00000200,
30
+ :RIGHTJUST, 0x00000400,
31
+ :REALSIZEIMAGE, 0x00000800,
32
+ :SUNKEN, 0x00001000,
33
+ :EDITCONTROL, 0x00002000,
34
+ :ENDELLIPSIS, 0x00004000,
35
+ :PATHELLIPSIS, 0x00008000,
36
+ :WORDELLIPSIS, 0x0000C000,
37
+ :ELLIPSISMASK, 0x0000C000
38
+ ]
39
+
40
+ if WindowsVersion >= :xp
41
+ StaticStyle.instance_variable_get(:@kv_map)[:REALSIZECONTROL] = 0x00000040
42
+ StaticStyle.instance_variable_get(:@vk_map)[0x00000040] = :REALSIZECONTROL
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,50 @@
1
+ require 'win-ffi/enums/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ WindowClassStyle = enum :window_class_style,
6
+ [
7
+ :VREDRAW, 0x0001, #Redraws the entire window if a movement or size adjustment changes the height of the client area.
8
+
9
+ :HREDRAW, 0x0002, # Redraws the entire window if a movement or size adjustment changes the width of the client area.
10
+
11
+ :DBLCLKS, 0x0008, # Sends a double-click message to the window procedure when the user double-clicks the mouse
12
+ # while the cursor is within a window belonging to the class.
13
+
14
+ :OWNDC, 0x0020, # Allocates a unique device context for each window in the class.
15
+
16
+ :CLASSDC, 0x0040, # Allocates one device context to be shared by all windows in the class. Because window
17
+ # classes are process specific, it is possible for multiple threads of an application to create a window of the
18
+ # same class. It is also possible for the threads to attempt to use the device context simultaneously. When this
19
+ # happens, the system allows only one thread to successfully finish its drawing operation.
20
+
21
+ :PARENTDC, 0x0080, # Sets the clipping rectangle of the child window to that of the parent window so that the
22
+ # child can draw on the parent. A window with the :PARENTDC style bit receives a regular device context from
23
+ # the system's cache of device contexts. It does not give the child the parent's device context or device
24
+ # context settings. Specifying CS_PARENTDC enhances an application's performance.
25
+
26
+ :NOCLOSE, 0x0200, # Disables Close on the window menu.
27
+
28
+ :SAVEBITS, 0x0800, # Saves, as a bitmap, the portion of the screen image obscured by a window of this class.
29
+ # When the window is removed, the system uses the saved bitmap to restore the screen image, including other
30
+ # windows that were obscured. Therefore, the system does not send WM_PAINT messages to windows that were
31
+ # obscured if the memory used by the bitmap has not been discarded and if other screen actions have not
32
+ # invalidated the stored image. This style is useful for small windows (for example, menus or dialog boxes) that
33
+ # are displayed briefly and then removed before other screen activity takes place. This style increases the time
34
+ # required to display the window, because the system must first allocate memory to store the bitmap.
35
+
36
+ :BYTEALIGNCLIENT, 0x1000, # Aligns the window's client area on a byte boundary (in the x direction). This style
37
+ # affects the width of the window and its horizontal placement on the display.
38
+
39
+ :BYTEALIGNWINDOW, 0x2000, # Aligns the window on a byte boundary (in the x direction). This style affects the
40
+ # width of the window and its horizontal placement on the display.
41
+
42
+ :GLOBALCLASS, 0x4000, # Indicates that the window class is an application global class. For more information,
43
+ # see the "Application Global Classes" section of About Window Classes.
44
+
45
+ :DROPSHADOW, 0x00020000, #Enables the drop shadow effect on a window. The effect is turned on and off through
46
+ # SPI_SETDROPSHADOW. Typically, this is enabled for small, short-lived windows such as menus to emphasize their
47
+ # Z order relationship to other windows.
48
+ ]
49
+ end
50
+ end