home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / clip4win / clip4win.exe / C4W30E.HUF / QUICK.TXT < prev    next >
Text File  |  1996-07-02  |  12KB  |  347 lines

  1.  
  2.  
  3.         Getting Started Quickly
  4.         =======================
  5.  
  6.  
  7. The first thing to do is to install Clip-4-Win and to check it
  8. is working.  Converting your existing applications comes last.
  9.  
  10.  
  11. 1. Installing Clip-4-Win
  12. ------------------------
  13.  
  14. You should use Windows to install Clip-4-Win.  Run d:SETUP.EXE, where
  15. d: is the drive containing Disk 1.  You need about 2MB free on your
  16. Windows partition and about 13MB free to install Clip-4-Win.  Some of
  17. that space is recovered after the install.
  18.  
  19. In the following, C:\CLIP4WIN is assumed to be the directory in
  20. which you've already installed the files.
  21.  
  22. Note: there are some files specific to Clipper 5.2d (or 5.2e), and
  23.       some that are specific to 5.3.  These files are in the
  24.       52\ and 53\ directories.
  25.  
  26. You need to build the libraries using the MAKELIBS.BAT file:
  27.  
  28.     MAKELIBS <ver> [d:dir]
  29.  
  30. where <ver> is the Clipper version and d:dir is a drive/directory
  31. that can be omitted if your LIB environment variable can be used to
  32. find your Clipper libraries.
  33.  
  34. For example,
  35.     CD \CLIP4WIN
  36.     MAKELIBS 5.2e
  37.  
  38. Warning: instead of the following, you might prefer to copy the
  39.          files to other directories.  Check the names don't
  40.          conflict with others you have already!
  41.  
  42. Change your PATH, INCLUDE and LIB environment variables if you wish,
  43. or expect to specify paths.  There is a batch file, SETC4W.BAT to
  44. help - see below!
  45.  
  46. To let the Clipper compiler find the Clip-4-Win #include files,
  47. consider adding C:\CLIP4WIN\INCLUDE to your INCLUDE setting.
  48.  
  49. To let the linker find the Clip-4-Win library, consider adding
  50. C:\CLIP4WIN\LIB to your LIB setting.
  51.  
  52. To let DOS find the Clip-4-Win C4WBUILD.BAT file, consider adding
  53. C:\CLIP4WIN\BIN to your PATH setting.
  54.  
  55. To let the linker find the Clip-4-Win "stub" file C4WSTUB.EXE,
  56. consider adding C:\CLIP4WIN\BIN to your PATH setting.  (Some
  57. linkers do not use PATH to find the stub, so you may need to look
  58. at your linker's documentation.)
  59.  
  60. You probably won't use the optional EXEMARK.EXE program, but if
  61. you want it to be found by DOS consider adding C:\CLIP4WIN\BIN to
  62. your PATH setting.
  63.  
  64. To do the above:
  65.  
  66.     SETC4W <linker> [Clip-4-Win-dir]
  67.  
  68. where <linker> should be either LINK or BLINKER, and the 2nd parameter
  69. is the directory where you installed Clip-4-Win (default C:\CLIP4WIN).
  70.  
  71. Note: C4WBUILD.BAT (in CLIP4WIN\BIN) tries to build programs using the
  72. appropriate PRG, DEF, RC files and your choice of linker.  It tests
  73. the environment variable C4WLINKER, which you can set to BLINKER if
  74. that's what you use.
  75.  
  76. Also: if using MS-LINK, you can prevent errors using:
  77.  
  78.     SET LINK=/NOE
  79.  
  80. This information is repeated below, in the hope you won't miss it...
  81.  
  82.  
  83.  
  84. 2. Checking Clip-4-Win is Working
  85. ---------------------------------
  86.  
  87. These tests rely on your environment variables PATH, INCLUDE and LIB
  88. being set correctly as described in part 1, or all the files being
  89. in the current directory.
  90.  
  91. The supplied .RMK files are for MS LINK 5.30.  For some versions of
  92. MS LINK you will have to add /NOE to the command line that runs LINK
  93. or use the DOS command:
  94.  
  95.     SET LINK=/NOE
  96.  
  97. If you are using Blinker 3, a LINK command line of the form:
  98.     link /se:600 obj1+obj2,,nul,clip4win,file.def
  99. can be replaced by
  100.     blinker fi obj1,obj2 lib clip4win deffile file
  101. Please consult the Blinker documentation if you need more information.
  102. Also see the BLINKER\ directory.
  103.  
  104. The C4WBUILD.BAT batch file will try to build a sample for you by
  105. looking for .RMK, .BLI, .MSL, .RC, .RES (etc.) files.  It also tries
  106. to decide which linker to use; to make it use BLINKER use the DOS
  107. command:
  108.     set c4wlinker=BLINKER
  109.  
  110.  
  111. Note: the meaning of a menu selection like File | Run is to select
  112. the File menu item, and then the Run item from the File menu.
  113.  
  114. When compiling the samples, don't forget the /n option (which is
  115. a standard Clipper compiler option you may want to use with DOS Clipper
  116. programs as well).  You are recommended to use the supplied rmake
  117. (.rmk) files.
  118.  
  119.  
  120. 2.1 Trying the HELLO sample
  121. ---------------------------
  122.  
  123. Start with the simplest program.  At a DOS prompt type:
  124.     cd \clip4win\source      (change \clip4win if you installed elsewhere)
  125.     c4wbuild hello
  126.  
  127. If it doesn't compile and link without errors, check:
  128.  
  129.     o  the linker you are using is suitable
  130.        (maybe you have more than one version of LINK and your
  131.        PATH setting means the wrong one is being used)
  132.  
  133.     o  the linker command line or LINK envirnment variable
  134.        (e.g. maybe you need /NOE)
  135.  
  136.     o  the version of clip4win.lib supports the version of
  137.        Clipper you're using  (e.g. maybe you're linking the
  138.        5.2 version of clip4win.lib but using the 5.3 Clipper
  139.        compiler)
  140.  
  141. When you have a hello.exe that compiled and linked without errors,
  142. switch to Windows, and either use Program Manager's File | Run menu
  143. or in File Manager double click on the file (or highlight it and
  144. press ENTER).
  145.  
  146. You should get a message box (a kind of window) with a title saying
  147.         Hello from Clip-4-Win
  148. the message inside the window should be
  149.         Hello World!
  150. and there should be an OK button at the bottom of the window.
  151.  
  152. You should be able to switch between the message box and other
  153. applications such as Program Manager e.g. using Alt-Tab or by
  154. clicking with a mouse.
  155.  
  156. You should be able to exit the hello program in any of the standard
  157. Windows ways (e.g. Alt-F4 or End Task from the Task List) or by
  158. pressing the OK button.
  159.  
  160.  
  161. 2.2 Trying the WINEXEC (RUN) sample
  162. -----------------------------------
  163.  
  164. WINEXEC.PRG shows how easily programs can be run.  In your SOURCE
  165. directory, type:
  166.  
  167.     c4wbuild winexec
  168.  
  169. then switch to Windows and run the new WINEXEC.EXE.  Depending on how
  170. you set up your Windows, you should be able to run some or all of the
  171. programs on the Run menu.  You can choose Help | Program Source to
  172. view the source code.
  173.  
  174.  
  175. 2.3 Trying an Object Oriented (OO) sample
  176. -----------------------------------------
  177.  
  178. To check the libraries for the Clip-4-Win Application Classes and the
  179. TopClass class-creation system (C4WCLASS.LIB and TOPCLASS.LIB) are
  180. installed and working, type:
  181.     cd oo                 (in the SOURCE directory)
  182.     c4wbuild tinybrow
  183.  
  184. This is a small DBF browser.  You should be able to see the main
  185. window's status bar updating as you navigate the menus.  To browse a
  186. DBF choose File | Browse...
  187.  
  188. There's a *much* better browser, WBrowse, that's used in the tutorials.
  189. Look at wbrowset.hlp sometime.  Also, refer to the documentation about
  190. Converting Browsers in CONVERT.TXT.
  191.  
  192.  
  193. 2.4 Trying the DEMOMULT sample (optional)
  194. -----------------------------------------
  195.  
  196. NOTE: If you have the Evaluation Version of Clip-4-Win you probably
  197.       do not have the files required for this sample!  This is to save
  198.       disk space and to encourage you to buy the full product.
  199.  
  200. To complete the check for correct operation of Clip-4-Win with your
  201. Clipper and linker:
  202.     cd dbrowse            (in the SOURCE directory)
  203.     rmake /dNORC br
  204.     cd ..                 (back to the SOURCE directory)
  205. If you have BLINKER:
  206.     rmake /dBLINKER demomult
  207. otherwise:
  208.     rmake demomult
  209.  
  210. There are many menu options, including a TBrowse in a window that's
  211. mouse-aware.  You might try the Insert and Delete keys, which add
  212. and remove columns.  Warning: if you change a field your DBF file
  213. is updated!
  214.  
  215. Note: demomult takes advantage of the public domain ntxpos/ntxrec
  216. functions.  These are not part of Clip-4-Win, but are certainly
  217. useful.  As their names show, they are ONLY for NTX files.  Believe
  218. it or not, some people have been known to complain that Clip-4-Win
  219. doesn't work because of problems using (or misusing!) these
  220. functions.
  221.  
  222.  
  223. 2.5 Learning more
  224. -----------------
  225.  
  226. The Non-OO Tutorial and the OO Tutorial both introduce many aspects
  227. of Clip-4-Win, and refer to more samples you can build and run.  You
  228. might like to follow them next.
  229.  
  230. In any case, please see "Detailed Conversion Information" below.
  231.  
  232.  
  233. 2.6 Trying the ADDMGR, PADDING, PUBNEWS, USERS and USERSRES samples
  234. -------------------------------------------------------------------
  235.  
  236. Not now!  Look at the README.* files later.
  237.  
  238. NOTE: If you have the Evaluation Version of Clip-4-Win you probably
  239.       do not have all the files mentioned above.  This is to save
  240.       disk space and to encourage you to buy the full product.
  241.  
  242.  
  243. 3. Object Orientation - Or Not?
  244. -------------------------------
  245.  
  246. You can use Clip-4-Win with or without Object Orientation (OO), but how
  247. do you decide?
  248.  
  249. (a) Try the OO Tutorial.  You'll see some sample code, and some of the
  250.     abilities of TopClass and the Clip-4-Win Application Classes.
  251.  
  252. (b) Explore the performance of your target systems: are they going to be
  253.     fast enough for OO?  There's a definite "hit", especially with late-
  254.     binding, as used in Clipper.
  255.  
  256. (c) Look at the samples in SOURCE\OO\, SOURCE\OO\CMD\, SOURCE\OO\USERS,
  257.     and SOURCE\OO\USERSRES.
  258.  
  259.     The SOURCE\OO\CMD directory has various stages of the evolution of a
  260.     simple browser, from command-based syntax to a more OO style.
  261.  
  262.     The SOURCE\OO\USERS and SOURCE\OO\USERSRES directories contain some
  263.     of the code discussed in the OO tutorial.  SOURCE\OO\BROW.PRG and
  264.     BROWMDI.PRG are also discussed in the tutorial section.
  265.  
  266.     A quick visit to the PRG's in SOURCE\OO:
  267.         o  DDECLIEN.PRG and DDESERVE.PRG show a DDE client and server
  268.         o  BROW.PRG and BROWMDI.PRG are browsers
  269.         o  MDIBARS.PRG uses toolbars and status bars
  270.         o  MDIBITMA.PRG is an MDI bitmap viewer
  271.         o  MDIMENUS.PRG shows how different menus can be used
  272.         o  MDIWBROW.PRG shows WBrowse(s) in an MDI application
  273.         o  ODBCBROW.PRG is an MDI ODBC browser, using BListBox in an MDI dialog
  274.         o  ODBCWBRO.PRG is an MDI ODBC browser, using WBrowse(s)
  275.         o  PBAR.PRG is a progress bar sample
  276.         o  TOOLBDLG.PRG shows a toolbar implemented using a dialog (if
  277.            you want a feature-rich bar this is one way)
  278.  
  279. Currently, Clip-4-Win is compatible with at least the following class
  280. creation systems: Class(y), HighClass, OClip, TopClass.
  281.  
  282.  
  283.  
  284. 4. Coverting Your Applications
  285. ------------------------------
  286.  
  287. In a sense this isn't very sensible: your existing code is not
  288. likely to be event-driven, and it is not going to be expecting the
  289. events that occur under Windows.
  290.  
  291. But DON'T despair!!  You can probably keep 70%-90% of your code.
  292.  
  293. Don't start with the unrealistic expectation that your program will
  294. immediately compile, link and behave like a true Windows application,
  295. that's all!
  296.  
  297. You should start with a small, simple application.
  298.  
  299. Adapt one of the supplied .RMK files, or use one of your own.
  300.  
  301. ALWAYS try to use /N /W with the Clipper compiler, and eliminate
  302. all warnings.  Consider using /ES2 with the Clipper compiler.
  303.  
  304.  
  305. 4.1 Detailed Conversion Information
  306. -----------------------------------
  307.  
  308. Please see CONVERT.TXT for a great deal of information about converting
  309. your current DOS Clipper code and knowledge to Windows.  CONVERT.TXT
  310. also contains samples of typical DOS Clipper code and the equivalent
  311. Clip-4-Win code.
  312.  
  313. As well as CONVERT.TXT, there are tutorials in the manuals, including
  314. a lengthy tutorial on Object Orientation.
  315.  
  316.  
  317. 4.2 Using APP.PRG
  318. -----------------
  319.  
  320. Rather than making the changes to your MAIN() function described in
  321. CONVERT.TXT, you may prefer to start with the SOURCE\APP.* files, and
  322. add pieces of your application as you go along.  Please make sure you've
  323. read CONVERT.TXT thoroughly.
  324.  
  325. APP.PRG contains a lot of "standard" elements of a Windows application:
  326.  
  327.     o  main window, with title and borders
  328.     o  menu
  329.     o  toolbar
  330.  
  331. The source file contains instructions to help you.
  332.  
  333. Remember:
  334.  
  335.     "You should start with a small, simple application."
  336.  
  337.  
  338. 5. Last Words
  339. -------------
  340.  
  341. You almost certainly need to link CLIP4WIN.LIB after any RDD's, but
  342. before the other Clipper libraries.
  343.  
  344. I'll say it yet again (!): You need the /NOE option with some versions
  345. of Microsoft LINK.
  346.  
  347.