V I S U A L I M P L E M E N T A T I O N MRU Filelist ---- Shadowed Popup Boxes Pascal Code (C)1993 Bobby R. Wallen All Rights Reserved Part One : OMRULIST.PAS This unit will add a Most Recently Used filelist to the FILE menu of your Application. Simply add the unit to your uses statement and then set it up in the Initialization of your Main Window Object. To add a filename to the list call AddMRUItem in your File Opening sequence. To Access a file from the List use the call to GetMRUItem to retrieve the Filename and then send that to your File opening sequence. This will not automatically remove the filename from the list, that must be done by an explicit call to DeleteMRUItem. To Dispose of the FileList simply call Dispose in your WindowObject's Done method like this -> Dispose( MRU, Done ); To Save the List of files for the next session call SaveMRUList at the start of your Done method. This will write the filelist to an INI file which you can name. To Load the Filelist at the start of your session, call LoadMRUList in your SetUpWindow method. Part Two: SPOPUP.PAS This unit will give you a shadowed popup text box. To use it first add the unit name to your uses statement. Next add a field in your Main Window Object -> APopUp : PSPopUp; Next Add a method to handle the Window Message WM_SPOPUP_DONE procedure TYourWindow.PopDone( var Msg: TMessage ); virtual WM_First + WM_SPOPUP_DONE; begin Dispose( APopUp, Done ); end; this will dispose of the Popup Window and free the memory used. At the place you want to use a popup window place a call to MakeWindow, -> APopUp := PSPopUp( Application^.MakeWindow( new( PSPopUp, Init( X, Y, AText)))); where X and Y are the Left and Top positions of the Window and AText is the PChar string you want to display. The rest is automatic. Please see the file MRUTEST.PAS for a working example of these units. **** NOTICE **** These units are not public domain. They are Shareware. If you find them useful please send $5.00 for each unit to: Bobby R. Wallen P.O. Box 30218 Mesa, AZ 85275-0218 *** LEGAL NOTICE *** There is no warranty either expressed or implied in these units. Use them at your own risk. I have tried my best to make sure that they are bugfree but I am only beginning to learn Windows Programming. Thank You for taking the time to download this file. Bobby R. Wallen July 9, 1993