home *** CD-ROM | disk | FTP | other *** search
/ Program Metropolis - Software Boutique 95 / SOFTWARECD.iso / camipro3 / macros.cmz / FIT2SCRN.SMM < prev    next >
Encoding:
INI File  |  1994-08-14  |  3.6 KB  |  256 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     CHINESEBIG5 (Windows)
  9. [revisions]
  10.     0
  11. [prn]
  12.     Apple LaserWriter Plus
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     └╦╡°▓┼ªX┐├╣⌡ñjñp
  19.     Lotus WPD
  20.     Advanced
  21.     API Calls
  22.     autorun
  23.     773101885
  24.     10
  25.     704844403
  26.     177
  27.     1
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     1
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [l1]
  56.     0
  57. [pg]
  58.     1
  59.     47 0 13 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  60. [edoc]
  61. <:#293,9025>Macro by <+!>Charlie Pappas, Peyton McManus and David Zoller<-!>
  62.  
  63. <:#284,9025>
  64.  
  65. <:#284,9025>define GetClientRect(hWnd, lpRect) dllcall("user,GetClientRect,HHN", %1, %2)
  66.  
  67. <:#284,9025>define Getfocus() DllCall("user,GetFocus,H")
  68.  
  69. <:#284,9025>define IsOKToRun(menuname)    GetInfo(217, 24, %1);
  70.  
  71. <:#284,9025>
  72.  
  73. <:#284,9025>Declare GetLayout()
  74.  
  75. <:#284,9025>
  76.  
  77. @Function@<:#293,9025>Function BestView()
  78.  
  79. <:#284,9025>result=IsOKToRun(CustomView)
  80.  
  81. <:#284,9025>if result != 1
  82.  
  83. <:#284,9025>    exit function
  84.  
  85. <:#284,9025>endif
  86.  
  87. <:#284,9025>ignorekeyboard(2)
  88.  
  89. <:#284,9025>CheckMenuItem(1, "└╦╡°(&V)", "F&it to Screen", 1)
  90.  
  91. <:#284,9025>if not CheckMenuItem(1, "└╦╡°(&V)", "F&it to Screen", 1)
  92.  
  93. <:#568,9025>    insertmenuitem(1, "└╦╡°(&V)", 1, "F&it to Screen", getrunningmacrofile$(), "Set view level to show left to right margins of a document.")
  94.  
  95. <:#284,9025>    return 1
  96.  
  97. <:#284,9025>endif
  98.  
  99. <:#284,9025>CheckMenuItem(1, "└╦╡°(&V)", "F&it to Screen", 0)
  100.  
  101. <:#284,9025>dim rect(4)
  102.  
  103. <:#284,9025>Size = GetLayout()
  104.  
  105. <:#284,9025>getclientrect(getfocus(), &rect)
  106.  
  107. <:#284,9025>newview = round(((rect(3) / 623) * (9144 / size) * 100))
  108.  
  109. <:#284,9025>
  110.  
  111. <:#284,9025>If NewView <;> 10 and NewView << 401
  112.  
  113. <:#284,9025>    disp=GetProfileString$("AmiPro","Display","AMIPRO.INI")
  114.  
  115. <:#284,9025>    if disp = ""
  116.  
  117. <:#284,9025>        disp = 19590
  118.  
  119. <:#284,9025>    endif
  120.  
  121. <:#284,9025>    ViewPreferences(Disp,NewView)
  122.  
  123. <:#284,9025>Endif
  124.  
  125. <:#284,9025>customview()
  126.  
  127. <:#284,9025>End Function
  128.  
  129. <:#284,9025>
  130.  
  131. <:#284,9025>
  132.  
  133. @Function@<:#293,9025>FUNCTION GetLayout()
  134.  
  135. <:#284,9025>ignorekeyboard(2)
  136.  
  137. <:#284,9025>DefStr pm, WidthTwips, cp, dz;
  138.  
  139. <:#284,9025>Cnt = GetLayoutParmCnt(ModLayoutRightPage) ' Get number of parameters 
  140.  
  141. <:#284,9025>DIM Stuff(Cnt)'Dimension an array for that amount
  142.  
  143. <:#284,9025>GetLayoutParameters(ModLayoutRightPage, &Stuff) ' Get the parameters and 
  144.  
  145. <:#284,9025>GetLayoutPageSize(&pm, &WidthTwips, &cp, &dz)
  146.  
  147. <:#284,9025>LeftMargin=Stuff(1)
  148.  
  149. <:#284,9025>RightMargin=Stuff(3)
  150.  
  151. <:#284,9025>getlayout = WidthTwips-LeftMargin-RightMargin
  152.  
  153. <:#284,9025>END FUNCTION 
  154.  
  155. >
  156.  
  157. [Embedded]
  158. 00002664
  159. >
  160. [macsum] 2
  161. BestView 0 0 6 8
  162. GetLayout 728 0 9 36
  163. [macse]
  164. 14 BestView
  165. 0 1313 217 24 202
  166. 13
  167. 8 1
  168. 6 1
  169. 5 1
  170. 18 1
  171. 11 00000082
  172. 6 0
  173. 15
  174. 9
  175. 0 32 2
  176. 0 518 1 "└╦╡°(&V)" "F&it to Screen" 1
  177. 0 518 1 "└╦╡°(&V)" "F&it to Screen" 1
  178. 13
  179. 1 3
  180. 11 00000318
  181. 0 802
  182. 13
  183. 0 527 1 "└╦╡°(&V)" 1 "F&it to Screen" [X] "Set view level to show left to right margins of a document."
  184. 5 1
  185. 15
  186. 9
  187. 0 518 1 "└╦╡°(&V)" "F&it to Screen" 0
  188. 5 4
  189. 21 2 [X]
  190. 16 GetLayout
  191. 13
  192. 8 3
  193. 0 284 "user,GetFocus,H"
  194. 13
  195. 0 284 "user,GetClientRect,HHN" [X] &2
  196. 5 3
  197. 22 2
  198. 5 623
  199. 4 1
  200. 5 9144
  201. 6 3
  202. 4 1
  203. 4 0
  204. 5 100
  205. 4 0
  206. 0 786 [X]
  207. 13
  208. 8 4
  209. 6 4
  210. 5 10
  211. 18 3
  212. 6 4
  213. 5 401
  214. 18 5
  215. 1 1
  216. 11 00000707
  217. 0 286 "AmiPro" "Display" "AMIPRO.INI"
  218. 13
  219. 8 5
  220. 6 5
  221. 7 ""
  222. 18 0
  223. 11 00000686
  224. 5 19590
  225. 8 5
  226. 2 206 1 "{5}" "{4}"
  227. 2 202 1
  228. 6 0
  229. 15
  230. 9
  231. 14 GetLayout
  232. 0 32 2
  233. 0 1285 363
  234. 13
  235. 8 5
  236. 6 5
  237. 21 6 [X]
  238. 0 1286 363 &6
  239. 0 1282 &1 &2 &3 &4
  240. 5 1
  241. 22 6
  242. 8 7
  243. 5 3
  244. 22 6
  245. 8 8
  246. 6 2
  247. 6 7
  248. 3 1
  249. 6 8
  250. 3 1
  251. 8 0
  252. 6 0
  253. 15
  254. 9
  255. 00002689
  256.