home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / musthave.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1990-10-10  |  22KB  |  292 lines

  1. `D|D|%
  2. Must Have DLL Function Calls
  3. System
  4. enterBook
  5. enterBook
  6. reader
  7. sizeToPage
  8. destination
  9. sortlist.dll
  10. sortList
  11. System
  12. initmenus
  13. reindex
  14. c"Functions" 
  15. e"Index" 
  16. e"Add New" 
  17. e"Reindex" 
  18. e"Delete..." 
  19. c"Text"
  20. e"Import..."
  21. original 
  22. "Page" && 
  23. AddNew
  24. ("Please 
  25. "desc,ret,par,ex"
  26. " && 
  27. rf > 0
  28. delete
  29. "Do you really want 
  30. permanently 
  31. function?" \
  32. f"OK" 
  33. "Cancel"
  34. reindex
  35. initmenus
  36. Index
  37. AddNew
  38. enterBook
  39. newpage
  40. leaveBook
  41. enterPage
  42. delete
  43. enterBook
  44. reader
  45. initmenus
  46. sizeToPage
  47. <reindex
  48. initmenus
  49. Functions
  50. Index
  51. Functions
  52. Functions
  53. Add New
  54. Functions
  55. Reindex
  56. Functions
  57. Delete...
  58. Functions
  59. Import...
  60. leaveBook
  61. reindex
  62. original
  63. index
  64. Index
  65. Yhistory
  66. AddNew
  67. y5newpage
  68. newpage
  69. Please name this page.
  70. <reindex
  71. clear
  72. enterPage
  73. desc,ret,par,ex
  74. recordfield
  75. rectangle
  76. scrolling
  77. delete
  78. Do you really want to permanently delete this function?
  79. Cancel
  80. clear
  81. <reindex
  82. proto
  83. Prototype
  84. Description
  85. Return Value
  86. Parameters
  87. Example
  88. buttonUp
  89. buttonUp
  90. Execute Script
  91. buttonUp
  92. buttonUp
  93. Copy Script to Clipboard
  94. buttonUp
  95. buttonUp
  96. buttonUp
  97. buttonUp
  98. ShowWindow
  99. INT ShowWindow(WORD, INT)
  100. This User DLL function displays, hides, or changes the display state of a particular window in any manner you desire.  It is useful when you want to minimize, maximize, show, or hide another ToolBook instance or some other window.  This function does not affect the activation status of a window that is already in the specified state.
  101. The return value specifies whether or not the window was previously hidden.  (You probably won't care about this value.))))
  102. The first parameter is the window handle of the window you would like to show.  If you want to show the window of a ToolBook instance, then you use the sysWindowHandle of that instance.  If you want to show the window of another program, you will need to use the FindWindow function to get that window's handle.  The second parameter tells the ShowWindow function how to show the window.  The valid values are as follows:
  103. 0 - Hide the window
  104. 1 - Show the window (not activated if window is not iconic)
  105. 2 - Minimize and activate the window (not activated if already iconic)
  106. 3 - Maximize the window
  107. 6 - Minimize the window and activate next window in stack of windows
  108. 7 - Minimize the window and leave the currently active window activeeeeeeast condition but don't activate ittttttttttttttttt
  109. 8 - Show the window in its last condition but don't activate itttttttttttttttttttttttttttt activate ittttt
  110. --This example will toggle the window of another ToolBook instance
  111. --between minimized and maximized states.
  112. linkDLL user
  113.     INT ShowWindow(WORD, INT)
  114.     INT IsIconic(WORD)
  115. end linkDLL
  116. getRemote "sysWindowHandle" application ToolBook
  117. set hWnd to it
  118. if hWnd is null
  119.     break to system --no ToolBook instance found
  120. end if
  121. if IsIconic(hWnd) > 0
  122.     get ShowWindow(hWnd, 3)
  123.     get ShowWindow(hWnd, 7)
  124. end iffffindow(hWnd, 7)
  125. end if
  126. SetActiveWindow
  127. WORD SetActiveWindow(WORD)
  128. This User DLL function allows you to activate another window.  It is useful when you want to make another ToolBook instance or some other window the active window.
  129. The return value is the window handle of the previously active window.
  130. The parameter is the handle of the window you want to activate.   If you want to show the window of a ToolBook instance, then you use the sysWindowHandle of that instance.  If you want to show the window of another program, you will need to use the FindWindow function to get that window's handle.
  131. --This example will toggle the window of another ToolBook instance
  132. --between minimized and maximized states.  When the other window
  133. --is maximized, the example will reactivate its ToolBook window.
  134. linkDLL user
  135.     WORD SetActiveWindow(WORD)
  136.     INT ShowWindow(WORD, INT)
  137.     INT IsIconic(WORD)
  138. end linkDLL
  139. getRemote "sysWindowHandle" application ToolBook
  140. set hWnd to it
  141. if hWnd is null
  142.     break to system --no ToolBook instance found
  143. end if
  144. if IsIconic(hWnd) > 0
  145.     get ShowWindow(hWnd, 3)
  146.     get ShowWindow(hWnd, 7)
  147. end if
  148. get SetActiveWindow(sysWindowHandle)  --reactivate this window
  149. don't 
  150. FindWindow
  151. WORD FindWindow(STRING, STRING)
  152. This User DLL function allows get the window handle of another window.  It is a very useful function that is usually used in conjunction with the User DLL function ShowWindow.dow will remain minimized.
  153. This function returns the window handle of the specified window.  It returns NULL if no such window is found.
  154. The first parameter is the class name of the window you are looking for.  Generally, you will set this parameter to "" (null), and the FindWindow function will look for any window with the specified caption (see next parameter).  The second parameter is the caption of the window you are looking for.  For example, "Must Have DLL Function Calls" is the caption of this ToolBook main window.  "Program Manager" is the caption of the Program Manager window.
  155. --This example finds the Excel window (if Excel is running) and
  156. --minimizes it.
  157. linkDLL user
  158.     WORD FindWindow(DWORD,STRING)
  159.     INT ShowWindow(WORD,INT)
  160. end linkDLL
  161. set hWnd to FindWindow(0,"Microsoft Excel")
  162. if hWnd is 0
  163.     request "Excel is not running."
  164.     break to system
  165. end if
  166. get ShowWindow(hWnd, 7)  --Minimize ExcelllppppppppUptonUppnUpnUpnUpnUpnUpnUpnUpnUp
  167. PostMessage
  168. INT PostMessage(WORD, WORD, WORD, DWORD)
  169. This User DLL function places a message in a window's application queue.  The function does not wait for the application to handle the message.  This function is most useful to Windows programmers who understand what meaningful and useful messages to post.
  170. The function returns a non-zero value if the message was successfully posted.  Otherwise, it is zero.the 
  171. The first parameter is the window handle of the window to receive the message (see FindWindow).  The second parameter is the type of message posted (wMsg), the third parameter is wParam, and the fourth parameter is lParam.  The specific value of each parameter is dependent on the message being posted.  For more information see the Microsoft Windows SDK, Microsoft Press's Windows 3.0 Programmers Reference Manual, or Petzold's Programming Windows.
  172. --This example will look for a copy of Paintbrush.  If a copy is found,
  173. --it will be shut down.
  174. linkDLL user
  175.     WORD findWindow(DWORD, STRING)
  176.     INT PostMessage(WORD, WORD, WORD, DWORD)
  177. end linkDLL
  178. get FindWindow(0, "Paintbrush - (Untitled)")
  179. if it is not 0
  180.     get PostMessage (it, 16, 0, 0)  --16 instructs the app to exit
  181. end if
  182. IsIconic
  183. INT IsIconic(WORD)
  184. This User DLL function is used to determine if a window is minimized.
  185. The function returns a non-zero value if the window is minimized.  Otherwise the return value is zero.
  186. The single parameter is the handle of the window whose iconic status you are checking.
  187. --This example will toggle the window of another ToolBook instance
  188. --between minimized and maximized states.
  189. linkDLL user
  190.     INT ShowWindow(WORD, INT)
  191.     INT IsIconic(WORD)
  192. end linkDLL
  193. getRemote "sysWindowHandle" application ToolBook
  194. set hWnd to it
  195. if hWnd is null
  196.     break to system --no ToolBook instance found
  197. end if
  198. if IsIconic(hWnd) > 0
  199.     get ShowWindow(hWnd, 3)
  200.     get ShowWindow(hWnd, 7)
  201. end if
  202. IsIconic
  203. FindWindow
  204. PostMessage
  205. SetActiveWindow
  206. ShowWindow
  207. `D|D|%
  208. Must Have DLL Function Calls
  209. System
  210. enterBook
  211. enterBook
  212. reader
  213. sizeToPage
  214. destination
  215. sortlist.dll
  216. sortList
  217. System
  218. --Copyright Asymetrix Corporation, 1990.
  219. All Rights Reserved.
  220. --Jeff Day, 
  221. ;Technical Support.
  222. initmenus
  223. reindex
  224. c"Functions" 
  225. e"Index" 
  226. e"Add New" 
  227. e"Reindex" 
  228. e"Delete..." 
  229. c"Text"
  230. e"Import..."
  231. original 
  232. "Page" && 
  233. AddNew
  234. ("Please 
  235. "desc,ret,par,ex"
  236. " && 
  237. rf > 0
  238. delete
  239. "Do you really want 
  240. permanently 
  241. function?" \
  242. f"OK" 
  243. "Cancel"
  244. reindex
  245. initmenus
  246. Index
  247. AddNew
  248. enterBook
  249. newpage
  250. leaveBook
  251. enterPage
  252. delete
  253. enterBook
  254. reader
  255. initmenus
  256. sizeToPage
  257. <reindex
  258. initmenus
  259. Functions
  260. Index
  261. Functions
  262. Functions
  263. Add New
  264. Functions
  265. Reindex
  266. Functions
  267. Delete...
  268. Functions
  269. Import...
  270. leaveBook
  271. reindex
  272. original
  273. index
  274. Index
  275. Yhistory
  276. AddNew
  277. y5newpage
  278. newpage
  279. Please name this page.
  280. <reindex
  281. clear
  282. enterPage
  283. desc,ret,par,ex
  284. recordfield
  285. rectangle
  286. scrolling
  287. delete
  288. Do you really want to permanently delete this function?
  289. Cancel
  290. clear
  291. <reindex
  292.