home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / clrwhl11.zip / readme.TXT < prev    next >
Text File  |  1998-01-31  |  4KB  |  110 lines

  1. ColorWheel Control V. 1.1 - DLL and sample executable (source code enclosed)
  2. -----------------------------------------------------------------
  3.  
  4.  Disclaimer
  5. ============
  6.  
  7. This code was elaborated by:
  8. Alessandro Cantatore (alexcant@tin.it)
  9. from the original source code by:
  10. Paul Ratcliffe
  11. (E-mail: paulr@orac.clara.co.uk, paul.ratcliffe@bbc.co.uk)
  12.  
  13. Under no circumstances the author is liable for any loss or damage.
  14. The use of the program implies acceptance of the conditions stated above.
  15.  
  16. You are free to use and modify the code and the enclosed executables
  17. as you like. You can distribute it on any media. You are not allowed
  18. to sell the code or executables, but can charge a reasonable amount to
  19. cover the cost of the distribution media.
  20.  
  21.  
  22.  Sample program
  23. ================
  24.  
  25. Click with any mouse button on the client window to make the "Edit control"
  26. dialog pop up.
  27. The client window color is updated according to the selected color and
  28. the color values are displayed in the test.exe titlebar.
  29. The "OK" button dismiss the dialog returning the last selected color.
  30. The "Undo" button restores the color the "Edit color" dialog was started
  31. with.
  32. The "Cancel" button dismiss the dialog returning the color the dialog was
  33. started with. The Close button on the titlebar or the "Close" menuitem of
  34. the system menu work like the "Cancel" button.
  35.  
  36.  
  37.  Usage
  38. =======
  39.  
  40. This program makes the undocumented OS/2 color wheel control
  41. available to any application. To display an "Edit color" dialog
  42. you must use editcol.lib in your .DEF file, call the API
  43. WinEditColorDlg() and include editcol.h.
  44.  
  45. -- [syntax] ----------------------------------------------------
  46.  
  47. LONG APIENTRY WinEditColorDlg(HWND hwndParent,  // parent handle
  48.                               HWND hwndOwner,   // owner handle
  49.                               COLOR color,      // RGB color (LONG)
  50.                               PSZ pszTitle);    // dialog title
  51.  
  52. -- [Parameters] ------------------------------------------------
  53.  
  54. HWND hwndParent : parent window handle (the dialog is showed in the
  55.                   middle of its parent window)
  56. HWND hwndOwner  : owner window handle (it receives the WM_COLORWHEELCHANGED
  57.                   messages from the "Edit color" dialog whenever a new
  58.                   color has been selected
  59. COLOR color     : is LONG RGB value
  60. PSZ pszTitle    : it is the dialog title. If it is NULL the default
  61.                   title ("Edit color") will be used. The maximum title
  62.                   length is 127 bytes (plus the termination null character).
  63.  
  64. -- [Returned value] --------------------------------------------
  65.  
  66. LONG color      : is an RGB color
  67.  
  68.  
  69.  Notes
  70. =======
  71.  
  72. You can find more informations in the header file and the source code.
  73.  
  74. The enclosed executables are compiled as subsystem to make them smaller
  75. and have been packed. I do not own an OS/2 2.x version so I do not know
  76. if it provides a WPCONFIG.DLL and a color wheel control. Anyway, if you
  77. want to try it with OS/2 2.x you must recompile the executables since
  78. they have been packed in the warp 3.x format.
  79.  
  80. You can easily edit the "strings" section of editcol.h to translate
  81. the executable to a different language.
  82.  
  83.  
  84.  File list
  85. ===========
  86. file_id.diz     : you know it
  87. readme.txt      : this file
  88. test.exe        : sample executable.
  89. editcol.dll     : the "edit color" dialog code
  90.  
  91. dllsrc          : DLL source files subdirectory
  92.  +- editcol.c   : DLL source file
  93.  +- editcol.def : DLL definition file
  94.  +- editcol.mak : make file generated by IBM Visual age C++. (You should
  95.  |                edit it.
  96.  +- editcol.h   : DLL (and sample executable) header file
  97.  +- editcol.lib : import library
  98.  +- editcol.rc  : "Edit color" dialog template
  99.  
  100. exesrc          : sample executable source files subdirectory
  101.  +- test.c      : sample executable source file
  102.  +- test.ico    : sample executable icon
  103.  +- test.mak    : sample executable makefile. (You should edit it)
  104.  +- test.rc     : sample executable resource script
  105.  
  106.  
  107. ========================================================================
  108.  
  109. For any comment, suggestion, bug report, etc.:
  110. Alessandro Cantatore (alexcant@tin.it)