//     -----------------  Group builder function demo ---------------
//                 (c) Main Street Software Company 1995  
//                             ver 1.0 (beta)
//     --------------------------------------------------------------
//     This file includes demo code for access of the inst2 dll from 
//     Powerbuilder.
//     --------------------------------------------------------------

//      This program shows how to use the build_group function.
//      Use this Beta version of the group builder program to build
//      groupboxes for your windows projects.  It was developed in
//      Turbo Pascal but should work with other compilers which have
//      the ability to utilize DLLs.  Some notes:
//
//           1) The function build_group does not wait around to
//              check if the group window is actually built.  You will
//              have to hook the appropriate windows message for this
//              info if you desire to check for successful completion.
//
//           2) I welcome comments about this program.  If you have some
//              idea for other functions that I should include in this
//              package then please call or write:
//              Our mailing address is :

//                                          Ron Scheckelhoff
//                                          % Main Street Software Co.
//                                          PO BOX 1083
//                                          Findlay OH   45840       


//          3) We (Main Street Software Co., and myself (Ron Scheckelhoff)
//             take no responsibility for use of the program, or direct or
//             indirect damages.  All responsibility is shouldered by the
//             user. It is delivered on an "As is" basis. Please report any
//             problems to the aforementioned address.  We reserve the
//             copyright to this program, but you may use this version
//             without any royalties.  If you are one of those who feels
//             badly about using software without paying for it, you may
//             send $10. to the aforementioned address.

//         4)  Notes about some return codes:  The function returns some
//             Pchar return codes including :
//                   GROUPNAME TOO LONG (max is 30 chars)
//                   ITEMNAME TOO LONG

//         5)  Usage is simple: the example at the bottom of the page
//             details the way to use the single function that builds
//             the boxes.  The function returns a PChar which contains
//             a code like the ones mentioned in paragraph 4.  You will
//             need to declare the function according to your compilers
//             directives.  The name of the DLL is 'INST2'.  (See the
//             declaration in the example (below).           
//
//             In my example, I have used the messagebox function to
//             display the return code.
//
//             The groupname is the name that will be displayed on the
//             title bar for the groupbox.  The itemname consist of
//             6 pieces, as follows:
//
//                     1-  The application EXE and directory
//                     2-  The title that will be displayed below the icon.
//                     3-  The EXE from which the icon will be taken
//                     4-  The default icon (if any)
//                     5-  The x position within the groupbox of the icon
//                     6-  The y position within the groupbox of the icon
//
//
//               Successive calls to the same Groupname will add icons
//               to the same groupbox.

//               Have Fun!
//               -- R.S.
		      


// demo code for access of the inst2 dll from powerbuilder
// ---------------------------------------------------------
// Use of this demo code is at users risk.  This code is an example
// of what we have found to work with the Powerbuilder environment
// and is delivered "as is", with no guarantees.  Please feel free 
// to correspond about this with suggestions that you may have, using
// the address included in this file.
//
   string return_code 
   integer return_code_int
   string itemname

// define the second argument for the build_group function
   ItemName='"C:\Windows\Write.EXE","Write-On!","C:\windows\write.exe",0,100,100'

// call the dll function
   return_code = build_group("Joes Nifty Utility Pgms", itemname)

// Show return code from dll
   return_code_int = MessageBox("Result", return_code,  &
		Exclamation!, OKCancel!, 2)



// Additionally, the function needs to be declared in the 
// GLOBAL EXTERNAL FUNCTION DECLARATION similarly to:
//
Function STRING build_group(STRING groupname,STRING Itemname) LIBRARY "INST2.DLL"

//
