topic
stringlengths
1
63
text
stringlengths
1
577k
Boris Pekic - NG's archive
3th Party Libraries and FiveWin-------------------------------------------------------------------------------- what are 3rd part lib compatible with fivewin? The most of the libraries designed for working under protected mode are compatibles with FiveWin.However some stuff is not compatible:a.) Comm libraries like Telepathy are no compatible because coummunications interruptions under Windows are different from DOS, you will need instead to use a DLL library for such things.b.) Graphical tools like Light-Lib, ProVision Windows and other don't work neither because Graphical interface is handled by Windows. Also Bussiness graphics tools like Flipper, TLib and others are notcompatible.Anyway, Windows is full of other wonderful stuff that will keep your mind off of your old DOS libs. However you must also keep a can of Raid handy for all those bugs in Windows.... You're right !, and also have in hand (or in feet) a heavy industrial boots for squashing those anoying bugs called GPFs, you the ones that state Some module has caused a General Protection Fail in the module most-unknow address Random(number).GUINDOS: Graphic User Interface Naturally for DOS. (In Spanish GU sounds like W)-------------------------------------------------------------------------------- We used several libriaries in an old DOS and Windows applications. We need to locate some of the vendors for the libriaries we used. Purchase them, and turn them over to our client. Does anybody know how to get in touch with the following vendors, or principals.FunckySilverWareNinety5 <!-- w --><a class="postlink" href="http://www.funcky.com">www.funcky.com</a><!-- w --> fot funcky and <!-- w --><a class="postlink" href="http://www.fivedb.com">www.fivedb.com</a><!-- w --> for ninety5. For Silverware I do not know a URL. Silverware is no longer produced, you may get an old copy from somewhere. Ninety5 is by Tomsoft <!-- m --><a class="postlink" href="http://www.tomsoft.de/">http://www.tomsoft.de/</a><!-- m --> and Funky is/was by dLesko Associates.-------------------------------------------------------------------------------- Using the toleauto class, I do the followingoFuncky := TOleAuto():New("Funcky")msginfo(ofuncky:hobj)However, this returns zero, which I suppose means failure Any ideas/people doing this? Try this:oFuncky := TOleAuto():New("Funcky.6")Also see attached sample that uses FUNCky 6.0 IPADRESS.ZIP also, be in mind that it only works with Harbour Didn't toleauto use to work with regular Fivewin/Clipper? I can't distribute commercial apps with harbour yet.The problem is about 16 bits. Funky6 is an ActiveX component (similar but not equal to an OLE automation server), that cannot be accessed from 16 bits apps.If you need Funky6 from Clipper apps, you can use the .lib, that contains almost functions. Some time ago, I ask Dirk (the creator ofFuncky) about this and this was his answer:-------------------------------------------------------------------------------- Anybody have a font to create a postnet barcode for the US Post Officestandards. Some years ago I downloaded a shareware library (I think from the OASIS ftp) called the Texas Laser Library. It was a library of printer functions specifically for HP compatible laser printers. It did include a postnet barcode function. The function was a little buggy on some zip codes, so I write my own function using some of the drawing functions in the laser LIB. It worked well for my purposes, but it was for an S87 app and was specific to HP compatible printers. If you're interested, I'll send you the source.-------------------------------------------------------------------------------- Can funcky 2,5 used with harbor ? Can 6,0 be used ? > Can funcky 2,5 used with harbor ?No, Funcky 2.5 is 16 bits. Harbour is 32 bits.> Can 6,0 be used ?Yes! I'm working on a FUNCky wrapper's for Harbour. OR you can use Jose's OLE class. See attached PRG as a sample. IPS.PRG--------------------------------------------------------------------------------
Boris Pekic - NG's archive
MS Access-------------------------------------------------------------------------------- What is the best way or is it possible to access a Microsoft Access MDB database within fivewin? ODBC 3.50 would work with FiveWin. Otherwise I do not know if it is possible at all.-------------------------------------------------------------------------------- I need make search in files ACCESS, How make ? You need ODBC driver for Access version 3.51, version 4 do not work.But, how or where obtain ODBC driver ? Have you got 3.51 working ? Only 3.5 an prior versions were working before.-------------------------------------------------------------------------------- Is there an example for converting dbf-files into access-files? you can always go to<!-- w --><a class="postlink" href="http://www.mindspring.com">www.mindspring.com</a><!-- w -->\~stanl\D2001.htmthere are free utilities, requires only a simple WaitRun() in your application thank but we 're fouding anything to link our program code. I am sorry, I do not understand what you wrote. If you are trying to insult me, you may write in Italian, I can get it translated.Stan, I don't think he is trying to insult you. Just his english is worse than mine. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Probably he did mean: "thanks but we found nothingto link to our program code". Maybe he did hope to find in your site a source code or a library while we all know that you have some externalEXEs that can be called from our FW apps. Dear Stan,I 'm not trying to insult you I explain my problem :I must to compile the function dbf2access on my exe program and I cannot use a external program Because it crash my program .I hope you understand me now . I was found the dbf2acc source code but it not run because there are not the ch files Can You help us ?Best Regards and sorry if you think bad about me 1. I do not think bad about anybody2. If you are referring to the original dbf2acc FiveWin Program I wrote, that used ODBC calls, it failed after Microsoft AccessDriver 3.5 or above ( which use threads)3. If you cannot shell to an external exe without your program crashing, then you have some serious problems with thatprogram. I currently have FW programs compiled in 1.9.1 that shell out to Winbatch Scripts I have compiled which downloadand convert DB2 data from an AS400 into multi-tabbed Excel Spreadsheet. I only added the WaitRun() function to he originalapps, and they have been running for 1 year now. Can I have the new download URL ? Is it easy to install Winbatch on a remote PC (W98-W2000-WXP)?For now I use winexec and a VB-program. But to install VB on a user-PC is a task for its own.You are never sure if your program executes. Therefore I would prefer a FW solution.I bought Squealer <!-- m --><a class="postlink" href="http://www.addisonsw.com/">http://www.addisonsw.com/</a><!-- m -->. (The Industrial Demystification Tool Squealer can tell you in seconds which component is missing as well as well as generate a complete manifest of all of the components your application needs so you can easily compare it with a system that DOES work. ) I never use Winexec() always WaitRun(). What is so good about Winbatch being 32-bit is that if there is ever any problems, the calling FW app never crashes (my fingers are crossed - it never has crashed so far ).I communicate between FW and all my WB extensions via an ini or by passing parameters ( Winbatch accepts 9 ). To add a DBF2Access routine in FW, involves about 600 lines of code, in Winbatch about 13. So my averageWinbatch EXE is based upon about 400 lines, but can perform about 16 tasks ( dbf to Access, to Excel, toHTML, Access to DBF, Custom 'explorer/html like' dialogs with animated GIF's or music to enjoy during longprocessing, complete UDL creation and editing, links for reports.... the list goes on. But in the meantime, myFW EXE is the same size. In fact I am working on a Winbatch 'launcher' that waits on the tray, and executesFW programs, and actually tells them to accept parameters for additional Winbatch EXE's - in effect a 32-bitshell for a 16-bit EXE that can shell to a 32-bit exe - and it works with as little as 32meg RAM.I just completed an application soley in Winbatch with 99 lines of code. It1. creates a temp Access Database, and links in a DBF2. issues 17 queries on in-bound 800 number calls for resort Motels in North Carolina to Florida3. These queries are inserted into 17 unique Excel Files, with custom headers and formating for each resort.4. Each Excel Spreadsheet is attached to an auto-emailThe entire process takes about 40 seconds on a 233mg NT with 128k Ram.99 lines of code, under 2 hours to develop and test.Like perhaps many reading this, I am getting old, I have a family to feed, a mortgage to pay, my eyesight ispoor, so I need to go with what works. But don't get me wrong, FiveWin works - so does Winbatch, with 99lines of code. Stan,Perhaps You not understand our problems I have many dbf and I want to converte in a MDB for use it on a WEB with a program made in aspI think explained YOU well !!!!!! Thereis a dbf2acc routine in fivewin sintax ? Do you have this source ?-------------------------------------------------------------------------------- You mentioned that you must use DAO for passwords in Access, but that maynot be entirely true.Access 2000 and Jet 4.0 permit extensive DML advances; I just wrote a scriptexample issuing SQLCREATE VIEW [ ...... ]permits writing portable code from Access to SQL Server or MSDE or otherANSI92 SQL data sources. What is interesting is that the 'views' cannot be seen i Access ( they do not appear as query objects ) but can be manipulated via Jet 4.0 and ADO/OLEDB.In addition to CREATE VIEW [or CREATE PROCEDURE which is really awesome ]you can GRANT and REVOKE or issue SELECTS with user permissions....see.<!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acadvsql.asp">http://msdn.microsoft.com/library/defau ... advsql.asp</a><!-- m --> Thanks for the info.-------------------------------------------------------------------------------- Does anybody have an example using Fivewin with Access? I need to change my database to Access and I don't know how to do. There was something about FWACCESS a couple of years ago. I have the exe,hlp file and sample database but no source. It uses odbc.I can send it to your e-mail if you wish. FW16 can work with Access only with 3.5 or olders versions ODBC drivers . I'm reading data from Access tables so , it is thesame way like FW16+ODBC+SQL .Have you done some tests using all MS Access versions? I recieved the FWACCESS.EXE that access a 16-bits driver from Access 2.0. And the others? What I have here is Access XP. I made some tests with Access 2000 with no results because the ODBC driver was > 3.5I didn't want to install an older one because if the customer reinstalls Office or upgrade it with a newest version, the ODBC driver could beupgraded again. I had only to read some data from a small table, so I wrote a little Acces macro that exports that table to a DBF one and run it everytime the FW application starts. I use SQLExpress and xBase++ and it works well.-------------------------------------------------------------------------------- A discussion took place last month about using MDB files in FW. Has anyone got a working example or sample code to do same?I need to use a MDB file in my application which will be installed on a variety of customers machines, Win98/2000 and XP etc.. I am using comix within my own application and awaiting cdx support before I move to Harbour.Any help would be appreciated. Take a look to TesdODBC.Prg in your samples directory.-------------------------------------------------------------------------------- I have two problems regarding a MS Access database.1) From time to time I need to copy an entire access table to a dbf.I use oOdbc:Query("SELECT * FROM " + cTable) to create a temporary dbf then I read through it and append it to a dbf within the application. This is very slow (about 150 records per minute). There must be a better way <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->2) I need to do a lookup on the access file similar to dbseek().Should I use a sql command within oOdbc:Query()? If so, has anyone experience in doing this. Any sample code would be appreciated or can you suggest any reading material on sql formats.Is any of this realistic in the commercial world, or should I be trying a different approach? Hmm .. strange . I'm working with Access databases and I'm doing the same copy as you . But speed is very good . The only difference is that this my app. is writen with TRddOdbc , because TDbOdbcDirect wasn't and I'm using 3.5 version MS Access ODBC driver . I don't really know , but in earlier was problem with others ODBC versions with Access . Then I wrote this app. and tried to run with 4.0 version of MS Acces ODBC driver , then I got GPF . So it was needful to reinstall ODBC drivers . Maybe is problem with driver ? In this days I'm working with TDbOdbcDirect and MS SQL 7.0 and 2000 . With SQL there isn't problem ODBC drivers . I'm working with Clipper 5.3b , FW 2.0d and Blinker 5.1> 2) I need to do a lookup on the access file similar to dbseek().>> Should I use a sql command within oOdbc:Query()? If so, has anyone> experience in doing this. Any sample code would be appreciated or can you> suggest any reading material on sql formats.Yes , you can use more complex sql query - the same "select " - with "where " clause . Here is a small sample :static function find_sql( cTable, cField, uVar )local cLen := len( alltrim( uVar ) )local cSql := "select " + cField + " from " + cTable + " where left( " +cField + ", " + cLen + " )" = " + alltrim( uVar )local oDbf := TDbOdbcDirect():new( cSql, oOdbc )if oOdbc:IsError()oOdbc:ShowErrorList()oOdbc:aErrors := {}oDbf:End()return( NIL )endifoDbf:Open()oDbf:Complete()return( oDbf )That will return recordset where will be search results . It is needful to familiarize with SQL syntax . It is very powefull thing and it is very easyto learn .David , if you need help with TDbOdbcDirect , please wait some days . I'll send you a sample how to to work with tcbrowse and TDboDbcDirect .I'm going to get some books on SQL.The access speed may be the size of the memo fields, but I still find it too slow for serious commercial work.Perhaps with more experience and trying different PC's, I'll increase the speed, although I used the TESTODBC as a jump start.> David , if you need help with TDbOdbcDirect , please wait some days .I'll> send you a sample how to to work with tcbrowse and TDboDbcDirect .Many thanks for the offer, I look forward to seeing your samples. Maybe the slow is MsAccess, just a thought. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->) Please test the sample testodbc against on any mdb database. On my tests Ionly needed 2 seconds to retrieve 2.200 records. (Pentium IV 1.3) you should useSELECT INTO... FROM...SQLI do it daily with files of 25meg or more and it takes less than 4 seconds...I'm only starting with ODBC and SQL> SELECT INTO... FROM...> SQLCan you expand your sample please? I should have read your initial post more carefully. The TdbOdbcDirect call has built in support for converting a Table to a DBF.However, Access has support for ISAM's built in, but with the syntax I suggested you would want to use the TOle class. In that case you would open the MDB with either the Jet OLEDB Provider, or as Access.Application-then, asssumingtable name in Access is - Mytablepath for dbase filer is C:\dbfilesname for dBase File is MyDbfyou would execute a single SQL Statement:SELECT * INTO [dBase III;Database=c:\dbfiles].[MyDbf] FROM [MyTable]the benefit here is that you could change dBase III to dBase IV, Excel 8.0, HTML or any other ISAM supported and get the appropriate output.Now, using OLE ( or ADO ) instead of ODB, you can employ generic methods such as Seek(), Find() and Filter() to quickly get at data in Access. And, since these methods are generic, a simple change of Provider or database let's you re-use the code for Oracle, SQL Server, MySQL... etc...I suggest you play around with Regedit to see the ISAM's available with your version of Access.The initial learning curve with ADO can be cut in half if you download the MDAC SDK from Microsoft.-------------------------------------------------------------------------------- Is there a (simple) way to read/write information contained in a MS Access database? There are so many questions about access to MS ACCESS that I think it is time for<?xml:namespace prefix = o ns ="urn:schemas-microsoft-com:office:office" />FIVETECH to work on this and release a solution.Because of the lack of a solution I use VB with the APOLLO database engine.With APOLLO you can use dBase-files (CDX,NTX supported) within VB.So I do my work the other way round. With VB I open my dbf-files and do the import-export to MS ACCESS. That could get interesting. Just my own opinion but I do not think it is up to the developers to produce a solution, but only tomake the products 'compatible' - this done by the tOLE class, or the ODBC classe(s)..FiveWin, at its core is still tied to the DBF structure. If you have a FW application and more and more customers want it to beMSACCESS friendly, you have the simple choice of re-coding it in VB or Access Basic. On the other hand, if they want theability to Export Data from your system to manipulate, or you find it easier to use SQL and ACCESS ( as some sort ofmiddleware ) to produce rerports, queries, crosstabs, or conversions ( to Excel or other ISAM's ), you have a similar set ofchoices:1. code the demands into your existing app2. shell out to 3rd party apps - the cheapest being VBScript which has excellent OLE capabilities and is free. MDAC is free andyou can create .MDB files without even having Access installed ( but you just cannot view them ). Again, this is my opinion - but the bottom line is that it is not going to be done for free ( which I think a lot of people expect ).Then there is a 3rd possibility. I have a legacy FW app that produces about 800meg of data files daily, statistics, billing,reports, over 300 browse screens - but the demands for queries and conversions became so code laden, many of the neweremployees started linking to my DBF's with Access and performing their own queries - without causing major problems - sothat 3rd choice - fairly intelligent users, who can expand your basic product on their own ( therefore you never have to be toldyou designed from obsolecence ).P.S. - Winbatch just released 2 new FREE extender DLL's - one for Terminal Server, one for eHLLAPI ( for screen scraping and3270 ermulation ). In my opinion one of the great advantages of Fivewin-programs is that you can copy the application to a PC and your program will work. So if I would use one of your suggestions I think at least I would need a ODBC-driver installed and then this advantage would not be.OT: ad) I do not think it is up to the developers to produce a solution I think the examples and solutions coming with fivewin and also form the 3rd party should be more standardized the way that they should work out of the box.For example if you look at VB. You download a project open it and than you press F5 or the button "RUN" and all works. So you can test easily if this is a solution for you or not.Ad) but the bottom line is that it is not going to be done for free ( which I think a lot of people expectAs I sell my software I do not expect free development-software. Is it possible to use VBScript outside a ASP page? How? First, to Enrico:I said cheapest, that is all. Personally I use VBscript 'templates' to create my own OLE apps, which is not as cheap, I had to license a WBcompiler, but like Clipper, I have unlimited runtime.Next, to OttoI agree with your comments; while it is not possible for FW to 'do all things for all people', if there is compatibility it should be more clearlystated. But then, such is the purpose of newsgroups, where users share knowledge.However, where does such knowledge start and stop? Look at the recent post concerning obtaining a contact list from Outlook. I posted code ( in WB ) illustrating how one could use the Jet OLEDB 4.0 Provider to obtain the information in XML. Now, I first had to convert this code from VB/VBScript to WB, so I assumed that interested users could convert the WB code to tOle, but a user writes that he cannot, so could I do it for him?That, my friend, would be the problem for developers - should they provide a means for users to use ODBC/ADO/OLE resources, or should they write the users programs for them? Simple economics provides the answer.and to my firend Ignacio,I know you work hard to provide the Interface ( not always the solution ) - or was we say in North Carolina - RTFMwhereR = ReadT = TheM = ManualF = ( not a pleasant word )... some people just are not ready. It seems you have not upgrade your Fivewin version for a long time, did you? (maybe is time for it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->)If not, please take some spare time to read carefully our FiveODBC documentation included on Fivewin. FiveODBC, of course. In my opinion ODBC connections are really for kids, do not be afraid of SQL language is by far easier then Xbase.You should read carefully all the FiveOdbc documentation. I hadn't realised there was info on the FW disk (only used it once). However the demo wants an odbc.dll, any suggestions where to obtain this, MS Access is installed on my system.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Acrobat Reader-------------------------------------------------------------------------------- Mi goal is:1) Open Acrobat Reader2) Open a document3) Print the document4) Close Acrobat ReaderAny help? I found a solution:ShellExecute(0,"print","xxx.pdf",...)hWnd:=FindWindow(0,"Acrobat Reader");if hWnd!=0SendMessage(hWnd,WM_CLOSE)endif--------------------------------------------------------------------------------
Boris Pekic - NG's archive
ADO-------------------------------------------------------------------------------- It is nice when you have problems to work out.I had to come up with a statistical summary against 700,000-1 million records kept in ACCESS by a Delphi App. They recorded phone calls and call duration in seconds. The data had to be read by a FiveWin App, then exported to Comma-Delimited file.In FiveWin that would have meant exporting both ACCESS tables to DBFS, building indexes, creating relationships, creating a third database to hold the summaries, and writing a processing loop. So I came up with this [ Note: ANI is a phone number]===================================================================cSQL = "SELECT TrunkANI.ANI, Sum(TrunkANI.Calls) AS Call, Sum(Seconds)/60AS Minutes INTO temp35 FROM TrunkANI WHERE (((TrunkANI.ANI)In (SELECT ANI FROM BILLING WHERE BILLING.Cust=35 )))GROUP BY TrunkANI.ANI;"==================================================================Then I by-passed the slower ODBC drivers by using the newer OLEDBcConn = "Provider=MicroSoft Jet OLEDB.4.0; DataSource=C:\OBSCC\TABLES\SUMMARY.MDB"DB = ObjectOpen("ADODB.Connection")DB.Open(cConn)RS = DB.Execute(cSQL)And, theoretically, once the data is moved to ORACLE, all I have to do is change Provider= the rest stays the same. The query does take 10 minutes, but as far as I'm concerned - I am hooked on ADO - and y'all get this stuff up in Harbour, it will Rock!!! Sounds great.What version of Clipper/Harbour etc and FiveWin are you using? Obviously this will work with Oracle using ODBC and ADO. I wonder will it work with Oracle's proprietary middleware (SQL*Net, OCI etc.). You might get better performance this way.Actually, this works with OLEDB, that's the Provider=, in ADO it is simply Driver=We use MSORADB as our Provider for Oracle. I'm not an expert so I cannot comment on SQL *NET, but I do know that it permits a link between our LAN VB apps and Internet ASP's, therefore permitting both local and remote Data-Entry/Queries from just a about the same screens.As for the version of FiveWin - 1.9.5, but I use a 32bit scripting language called Winbatch to accomplish this.Although I am sure that Harbour as a 32bit Fivewin-enabled product may eventually replicate this - I had to have the results on the FTP site ASAP or risk a lawsuit.Just today, I received word that the customer wanted an addtional field to calculate a commission - and the original ACCESS table has grown by 240,000 rows - I simply have to modify the SQL statement to get the desired results (it still takes 10 minutes), but while it is running, I am developing a generic metod to pass an unlimited number of databases/queries to the same script (which is currently 7 lines of code).-------------------------------------------------------------------------------- (George, if your read this, you'll love it)I finally installed Office 2000, and can now begin to test many of the new ADO methods available. However, I was pleased to learn that most of them are contained in the MDAC 2.5 drivers. In particular, I was intersted in moving data from a TABLE to a comma-delimited text file which would be placed on an FTP site. I had been using DAO since I was required to both use a DAO Object to create and execute a query, then an Application Object to transfer the query to a text file.Under ADO, I knew I could create a Recordset, but how to get this to a text file? I was also anxious to test the claim that an OLEDB provider was faster than DAO.I (1) discovered how to do it (2) tested it and it was much faster.first, set up your provider (I amd using ACCESS Tables), and create twoobjectscConn = "Provider=MicroSoft.Jet.OLEDB.4.0; DataSource=C:\OBSCC\TABLES\SUMMARY.MDB"DB = ObjectOpen("ADODB.Connection")RS = ObjectOpen("ADODB.Recordset")DB.Open(cConn)cSQL = "SELECT * FROM <Table>" // or use any query SQL expressionthen create your recordsetRS = DB.Execute(cSQL)Now, using either fopen(), or something to create an ASCII file<!-- m --><a class="postlink" href="file://I">file://I</a><!-- m --> am using Winbatch here, but you get the pointfle = FileOpen("test35.txt","WRITE")<!-- m --><a class="postlink" href="file://I">file://I</a><!-- m --> choose to put the 'field' names firstcRc = ""FLDS = RS.FieldsnCount = FLDS.Count()For i=0 to ( nCount-1 )nField = RS.Fields(i)cName= nField.NamecRc = strcat(cRc,",",cName)NextcRc = StrSub(cRc,2,-1)FileWrite(fle,cRc)Finally, I discovered that MDAC 2.5 permits you to use the GetStrin() methodcRest = RS.GetString()FileWrite(fle,cRest )FileClose(fle)ObjectClose(RS)ObjectClose(DB)This is so fast, I was amazed. In reality, getstring() takes five parameters, but I was able to get by with the default. By using a Recordset, you never create temporary queries or tables in your Database, you simply manipulate and export data. And, by using the Provider=, I am able to perform the same task with Oracle and SQL Server Tables.P.S. - this is not something you can only do in Winbatch, it should be easily accomplished with the FiveWin OLE Class. Stan Littlefield Of course I "read this". Your postings are always interesting. Yes, it looks great.In relation to "read this" I just want to share the following. After spending two nights to get FWOle working with Excel I gave up and went to VB. I got it for a few hours as this was my very first experience with VB. However I needed to pass some start-up parameters to my VB application but did not know how to handle them in VB and I posted a message in one of the VB forums on the M$ news server and surprise - I got 2 replies for just a few minutes + a web link with a history with all the message and a search engine posted to my private email. It was such a good filling. Stan, tell me, does WinBatch need run time files when you distribute your software.Winbatch is an 'interprative' language - but you have the ability to compile and distribute standalone EXES with no royalties. It is, more or less C/C++ DLLS and wrapper functions to the WINAPI. In the 'basic' library there are over 500 functions covering strings, binary and ASCII file management, OLE, Netware and NT functions. In addition, Wilson WindowWare makes avaialble for free 'extender' DLLS - covering areas like ADSI, FTP/SMTP, ODBC.In itself, Winbatch does not have a datbase engine, but I saw possibilites to extend my stable FiveWin apps into areas like ODBC/OLE/ADO where I was having problems, but needed results.Talk about support, two days after I requested that they consider a separate section in their NewsGroup for OLE/ODBC/DDE etc... they put it there. Most questions I post are answered within hours. Outside their newsgroup they have an extensive section of code snippets (really 'scripts', not code, although they have While...EndWhile, For...Next, Switch...EndSwitch, If..else..endif built into the language.I know a lot of FiveWin users have purchased and are using Winbatch the same way I am, not as a replacement, but as an add-on. One user, who posted a script which showed how to perform 32-bit SMTP on WIN98 with FiveWin and Winbatch - wrote, "it is almost a crime, how ridiculously easy it is to accomplish something I have been trying for months to accomplish with FiveWin alone".Two other points: (1) Winbatch has a dllcall() function similar to the DLL32 in FIveWin, but without the thunking; it is easy to pass structures with 32/64bit Longs.. (2) like Clipper's extend system,Winbatch has an SDK, so you can write your own 32bit DLL's (they are limited to 100 functions each) which can be included in your scripts by simply writingAddExtender( "<your DLL>" )If you have tried any of my demoes like WBDEMO or DBF2ACC, you will see it is difficult to tell where FiveWin ends and Winbatch starts.Right now, I am in the planning stages of using Winbatch OLE to populate multiple sheet Excel files with data from legacy DBFS. The Excel files are templates, with 1-3 main database sheets, a graph sheet, a summary sheet. In essence the Excel file functions as a standalone app for specific results (all sent as SQL queries, so there is no need to modify one line of my FiveWin code which produces the DBF's) Stan you made a GREAT job with odbc and ADO/DAO.. i read that you are working on winbatch.... Did you have any working code on fivewin, using ado or dao via OLE connection?-------------------------------------------------------------------------------- The other week I posted some code that illustrated the RecordSet method getstring(), which converts a given RS( where RS = SELECT.... FROM )into a CSV file. At first, I didn't think that was very impressive, but in one of the applications I used it with, the end-users want the Recordset displayed by the browser (on an Intra-Net). Please note, before you read any farther, this will only work with IE version 4.0 or higher.I thought about writing code to loop through the Recordset, and create an HTML page, with a simply table. That is when I discovered the Microsoft TDC (table display component). This OCX, which is called from an HTM page via a CSLID number, can autoformat a CSV into a DHTML web table. I discovered that by adding a piece of JavaScript code, the resulting file would display the Recordset in the Browser as 'pages', contains buttons to go back and forth, and can even sort by column headings. (see attached JPG). ( DHTML.ZIP )The attached zip file contains RAO.TXT and the template TEMP.HTM to produce the paged display.Be sure to modify the line in the HTM file<PARAM NAME="DataURL" VALUE="C:\TEMP\Rao.txt">To indicate where you placed the RAO.TXT file. I call TEMP.HTM a template, because with very little effort you could probably1. load it into a memvar2. Modify or Set the DataURL3. Modify/Set the sort and DATAFLD'sObviously, this would be used only in places where users needed a list of names, or a log-file display, and it will work with any comma-delimited file, not just ones created with getstring(). What's the easy way to get all the possible methods, and variables from the TDC.OCX. Can you fix the column widths???TDC is just something to know is out there; RDS is probably a better way to go, since it will also work with NutsScrape 4+;The only TDC Method I am aware of is reset(); and I think the Column Size could be set within the<TABLE> ... </TABLE> as COLSIZE= (just straight HTML) We tested the TDC.OCX and it looks very good. The only problem is it appears that the brings all the data to the client. Have you come accross any types of OCX, or Active X controls which will provide browse capability but only send the number of rows required to be drawn on the screen. We currently do this with ASP but maybe there is something you have seen.I'm not sure what you are exactly after. In the template I provided you could easily add.filter()to the javascript, or since the original dataset is based upon an SQL query, put a WHERE clause there.The example file is every Revenue Accounting Office for Telecom in the U.S. - I set it up as an example, but wanted to avoid getting in trouble with my company - in reality, we query this by state and include the phone numbers. I discovered that you could actually write a small ASP script to pass the Data Source to the HTM code without having to modify the template file. What I am after is an OCX which is server based and only sends HTML code to the client for screen updates. Similar to what TBrowse did on the monitor of a PC. This OCX will send all data requested, and filter it on the client side not the server side. Dont get me wrong, I like this one but it may not work for all applications.Are you talking about situations where users perform remote data-entry? Or situations where users request information ( i.e. "I want to buy a Car? What Kind of cars Do You have?") then can filter to what they are after and perhaps finally submit a request.I think, as following the specifics of this particular thread, that we are talking about ADO and disconnected RecordSets. It sounds so easy, but I am still a little confused, the more I read into it. I have another example, I am working up whcih contains a 'Filter' window, I'll post it soon.-------------------------------------------------------------------------------- Access to Data Sources Through ADOIn the not so distant past, it was only the biggest websites which featured interactive forms, personalization, and search capability. Now it is becoming a requirement of any website. As websites have evolved from business novelty to business necessity, the architecture of these sites has become increasingly complex and therefore more costly, particularly in terms of the development cycles. Naturally enough, end users’ expectations follow hard on the heals of technological developments, and site visitors have are increasingly discerning in their requirements, expecting the functionality hitherto associated with traditional software from the websites they visit. Businesses are compelled to keep up to speed with their sites if they want to hold onto their traffic. And this means fast and efficient data access.ADO is a series of ActiveX Data Objects, a technology that can access data stores such as relational databases or message stores, with speed, clarity and ease. It is an instance of Microsoft’s strategy for dealing with a huge variety of data sources - Universal Data Access (UDA) - and a higher level of model to that of OLEDB, which is a COM (Component Object Model - a set of object orientated interfaces). The upshot is that ADO is much easier to use, and because of the ActiveX component, ADO can be used from within any other language supporting COM - Visual Basic, VBA, Scripting languages, VC++ and VJ++, and allows data retrieval with sometimes as little as one line of code.The ADO object model comprises three main objects, the Connection object, the RecordSet object and the Command object. These last two can be used without the user explicitly creating a Connection object, despite their hierarchical dependence upon it, and in these cases ADO creates the connection behind the scenes as and when it is needed.The RecordSet object allows data to be marshalled between tiers easily and without the need for custom code. It is bested suited to updating records, or multiple fields in a record, and for complex data manipulation. The Command object calls complicated stored procedures, and is used for single commands, in particular those that require parameters. The Connection object, the workhorse of ADO, is used to establish a connection to a data source, and can be used to execute SQL statements, stored procedures, delete a record, or perform simple updates.Each use of a Connection string to access the data source creates a new connection, so if you are going to be running several commands, or creating several record sets, then it is good practice to create a Connection Object directly. This you can use throughout your code without worrying about the number of connections you are creating. It’s faster, more efficient, and reusable.Creating the ConnectionEstablishing a connection to a database is an expensive process, both in terms of the CPU processing time required to create the connection, and the memory used to maintain it. When establishing connections to a database (or instantiating objects with ASP) the first thing to consider is the impact they will have on the system’s resources. Used over enthusiastically, connections can be responsible for the crashing of an otherwise hardy server.One way to alleviate this fairly disastrous side effect is through Connection pooling (enabled by default in IIS4 if you install the latest ODBC drivers and ADO 2.0), where connections that have been returned to the pool can be reused. A connection from the pool will be reused if all the connection details exactly match, irrespective of how the connection was made. Connection pooling decreases the wear and tear on the CPU and memory, since it reuses connection that has been established beforehand.While ADO doesn’t require that connections be explicitly created, because using the RecordSet or Command objects implicitly creates them, there are instances where it is more efficient to do so. If, for example, you are creating several record sets, then calling an explicitly created Connection object means that it can be reused, and you do not need to worry about the number of connections that would otherwise be created.The syntax for creating the Connection object depends upon your preference. You can call an object that has been implicitly created by ADO previously, or use a ConnectionString, comprising either Data Source Name (DSN) or individual parameter=value pairs detailing how the connect to the data source should be established:.ConnectionString = "provider=SQLOLEDB; Data Source=DatabaseName; Initial Catalog=Pubs; User Id=sa; Password="or&#9;ConnectionString = "DSN=Pubs"Once the connObj is created we need to open the connection with the following syntax:connObj.Open ConnectionString,UserID,PasswordThe advantages of using a System DSN to connect to a data source, is that you only need to change code in one place in order for all the references to that code to be effected. Naming of the individual parameters, however, creates a direct connection, is slightly faster, and, of course, the code is clearer to read. You could also transfer the parameters in the ConnectionString to an include file, which would combine the advantages of both systems.Retrieving InformationSince we are interested in retrieving information, the next step is to create a recordset. The three ADO objects can return a recordset, so the one you use depends entirely on what you need to do. In this example, we are going to display the information we collect in an HTML page. The most efficient way to do this is use the Connection object, which returns a recordset with a read-only forward-only cursor. The syntax would be:Set rsObj = connObj.Execute (CommandText,RecordsEffected,Options)CommandText is the SQL statement you send to the database, RecordsEffected returns the value of how many record(s) effected and Options indicates the type of statement you are sending, (0 unkown - default – driver must try to figure out what you are sending slows performance, 1 SQL statement, 2 Use to open a table, 4 Stored Procedure). In this example, we are sending a SQL statement and don’t need to know how many records where effected.sql = "SELECT Name,Email FROM Demo"Set rsObj = connObj.Execute (sql,,1)Displaying InformationNow that we have a recordset (rsObj), a combination of ADO properties and VBScript will look through the recordset and collect the information. VBScript offers several tools to trawl collections, For-Next, For-Each, Do-While, and Do-Until. Which one you choose depends on what you want to do. In this case we'll use the Do-While Loop to iterate through a recordset. Let’s display the information in a table.<table border="1" cellspacing="2" cellpadding="2"><tr><td><b>NAME</b></td><td><b>Email</b></td></tr><%Do While NOT rsObj.EOF%><tr><td><%= rsObj.Fields("Name") %></td><td><%= rsObj.Fields("Email") %></td></tr><%'Move to the next recordrsObj.MoveNextLoop%></table>One great thing about ASP is that it allows you to mix HTML and VBScript on one page, which makes coding a lot easier. The draw back, however, is that forcing the ASP parser to switch between HTML and ASP slows performance. The code written here could have easily been written entirely in ASP in order to increase performance. However, for clarity I choose to break it up to make it easier to read. An extract looks like this:rsObj.MoveFirstDo While NOT rsObj.EOF‘Chr(13) & Chr(10) is a carriage return and line feedResponse.Write("<tr>" & Chr(13) & Chr(10))Response.Write("<td>" & rsObj.Fields("Name") & "</td>" & Chr(13) & Chr(10))Response.Write("<td>" & rsObj.Fields("Email") & "</td>" & Chr(13) & Chr(10))Response.Write("</tr>" & Chr(13) & Chr(10))rsObj.MoveNextLoopTidying UpThe last step is to free-up memory resources by closing all-open objects and setting them to nothing. While in ADO.2 setting the connObj to nothing removes the connection from the pool, in ADO 2.1, the connection only becomes inactive and waits in the pool until, or if, it is needed. The final bit of code for this is:rsObj.CloseSet rsObj = NothingconnObj.Close-------------------------------------------------------------------------------- About a month ago, I asked about interest in a FiveWin XML class.Seems Microsoft made it easy with ADO (2.5) just setadPersistXML = 1then create an Ado Recordset whereRS = SELECT <something> from DATA_SOURCEthenRS.save("myfile.xml",adPersistXML)and laterRs.Open("myfile.xml")can restore the RecordSet.hope to post a very 'practical' demo in the near future. stan littlefieldand I just figured out how to put the XML file back into a Recordset, and Insert it into another table. This means that if I perform a QUERY on a 2 million row Oracle table, return a RecordSet of Say 800 rows (grouped,sorted, etc...) then save it as XML -I can re-create the data in (1) another Oracle Table (2)ACCESS (3)Excel (4)DBF (5)Sybase or any other Client-Server with a OLE DB Provider option - all with once generic script. This, I found, is what is meant by a disconnected Recordset.-------------------------------------------------------------------------------- Unless you have ADO 2.5 and or MDAC 2.5, read no further.I have put together a demo which illustrates a generic procedure to reconstruct a recordset from a .XML text file (created from the ADO 'stream'). The demo will1. load the XML file as a Recordset2. Create a new ACCESS Database3. INSERT the Recordset into an new Table4. Then do the same only this time creating a DBFI am not going to post this, but will send a zip file with instructions in response to direct e-mail requests. stan littlefield I'm definetely interested Stan. I've just finished creating new array (2 dim) and text file data drivers abstracted the data source for data in reports) where you can now do anything with those arrays or text files (comma delimited) just like you do with DBFs in GX. It is quite something. If a textfile is delimited, you can treat it just like a dbf where the different columns are accessed with a FieldGet() method the data array. So now, I'm looking for more data sources - I think the first should be Access and it looks like you have the ticket. Only one thing though - I'm going to have to write some type of parser that will create sql expressions from std expressions we use in clipper to obtain a scoped recordset.I'm not sure where the convergence is between XML and GX, but the demo is on its way...I have a 'freebie' - if you try and successfully yest the XML demo I will send you an EXE that will allow you to select any MDB file in the path, and a corresponding XML file will be output detailing the 'schema' of the MDB -i.e. all tables, links,views....--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Adventage Database Server-------------------------------------------------------------------------------- is anybody using ADS in an novell net and running Windows NT on a workplace with Fivewin apps? I use ADS in Novell net with Win95/98-machines and have no problems with my FW apps. Since yesterday we have on one machine Windows NT and the DOS-version of my apps are running normal but the fivewin version cannot open the databases (DBFCMD-error). Any comment? What protocol are you using to access the NT ?, FiveWin Apps should use TCP/IP, not IPX protocol in order to access ADS Data, ADS Client includes the DOS IP, a program that must be running on you client PC to access the ADS NT Server. I disagree with René because ADS internally was writen around IPX so you will get best performance with IPX. ADS on NT has half the speed versus ADS on Novell. (God save Novell) I think the problem you experiment is caused by the absence of some DLL in the windows\system directory. Check your documentation and put all those dll. Sorry to disagree with you this time, in our test under NT, ADS seems to be faster using TCP/IP than IPX, specially with Win98, those terminals (win98) doesn´t seem to work properly with IPX. (Tested with 150 concucurrent users on an Wan enviroment). This is a subjective matter. IPX is horrible on WAN but god in LAN. The way you access the databases is other theme to see.-------------------------------------------------------------------------------- I am obtaining mistakes when I am going to use ADS with my application , I am going to describe my steps to create the program , if someone can help me , I would stay very thankful :1) My environment :ADS 5.1 Windows NTRDD 5.0Fivewin 2.0Clipper 5.3b ( I use files CDX do Clipper 5.3b )Blinker 5.1Net Windows NT 4 Service pack 5 ( protocol unico TCP/IP in all estaçoes)Terminals Windows NT Workstation and Windows 982) Link Script# Blinker 5.10 ScriptBLINKER INCREMENTAL OFFBLINKER EXECUTABLE COMPRESS 9BLINKER EXECUTABLE EXTENDED#MAP A,SPACKCODEPACKDATANOBELLNODEFLIBDEFBEGINname FiveWindescription 'Windows Fivewin'exetype Windowscode moveable discardabledate preload moveablestacksize 12500heapsize 2048segment 'PLANKTON_TEXT' nondiscardablesegment 'EXTEND_TEXT' nondiscardablesegment 'OM_TEXT' nondiscardablesegment 'OSMEM_TEXT' nondiscardablesegment 'SORTOF_TEXT' nondiscardablesegment 'STACK_TEXT' nondiscardableDEFENDNOBELLFILE __________, DBFCDXAXSEARCH Five, FiveC, ObjectsLIB DBFAXSLIB WinApi, Clipper, Extend, DbfCdx, _Dbfcdx, Terminal , Barlib , CtpLIB AXSC2WIN3) Alterations in the ProgramREQUEST DBFCDXAX / I used DBFCDXRDDSETDEFAULT([DBXCDXAX]) / I used _DBFCDX#INCLUDE "DBFCDXAX.CH" / it is necessario ?I use the following function for not link RDD default (DBFNTX) :ANNOUNCE RDDSYSINIT PROCEDURE RDDINITRETURNMust continue using ? I copied DLL AXCOMM16.DLL and ADSIP16.DLL in directory where the application is executed . I didn't find DLL AXSCOMM.DLL , it is the same that AXCOMM16 ?4) Result :I obtain the following message :Blinker 1004 : SYSCTRL.OBJ(SYSCTRL) : RDDSYS IS DUPLICATED INDBFCDXAX.OBJ(DBFCDXAX)And the program generates a GPF when it executes. 1. solved the problem :I can't use SEARCH , I Have to use LIB in the following script line :SEARCH FIVE,FIVEC,OBJECTS ............if I uses SEARCH occurs a GPF. -------------------------------------------------------------------------------- When opening my files with ADS , one of the files doesn't have index , just a MEMO (FPT) , when the program is going opened him occurs the following mistake :ERROR DBFCDXAX 1020 : WORKAREA NOT INDEXED.all of the files used for ads has to have one Index ? EXACTLY !!! all the files must have an index in order to use ADS support, remember, an RDD is normally used for indexing support. NO, NO, NO !!!!! You don't need and index to use ADS. I use ADS everyday with no index on some files.-------------------------------------------------------------------------------- Please I need a link script to use Advantage database server with Clipper 5.2e, FW 1.95 and Blinker 5.1. BLINKER CLIPPER SYMBOL OFF PACKDATA PACKCODE MAPBLINKER INCREMENTAL OFFFILE C:\OPTOWIN\OPTOWIN.OBJFILE C:\OPTOWIN\ADR_100.OBJFILE C:\OPTOWIN\ALL_100.OBJFILE C:\OPTOWIN\ART_100.OBJFILE C:\OPTOWIN\BAN_100.OBJFILE C:\OPTOWIN\BRI_100.OBJFILE C:\OPTOWIN\CON_100.OBJFILE C:\OPTOWIN\CHA_100.OBJFILE C:\OPTOWIN\DBF_100.OBJFILE C:\OPTOWIN\DBF_300.OBJFILE C:\OPTOWIN\DTA_100.OBJFILE C:\OPTOWIN\ERR_100.OBJFILE C:\OPTOWIN\ELG_100.OBJFILE C:\OPTOWIN\EXL_100.OBJFILE C:\OPTOWIN\ERL_100.OBJFILE C:\OPTOWIN\EML_100.OBJFILE C:\OPTOWIN\EMA_100.OBJFILE C:\OPTOWIN\FAS_100.OBJFILE C:\OPTOWIN\FIR_100.OBJFILE C:\OPTOWIN\GBS_100.OBJFILE C:\OPTOWIN\GLC_100.OBJFILE C:\OPTOWIN\GLP_100.OBJFILE C:\OPTOWIN\GLS_100.OBJFILE C:\OPTOWIN\INV_100.OBJFILE C:\OPTOWIN\INS_100.OBJFILE C:\OPTOWIN\IMG_100.OBJFILE C:\OPTOWIN\KST_100.OBJFILE C:\OPTOWIN\LOG_100.OBJFILE C:\OPTOWIN\LST_100.OBJFILE C:\OPTOWIN\LIN_100.OBJFILE C:\OPTOWIN\LIP_100.OBJFILE C:\OPTOWIN\REF_100.OBJFILE C:\OPTOWIN\BRP_100.OBJFILE C:\OPTOWIN\MES_100.OBJFILE C:\OPTOWIN\MLT_100.OBJFILE C:\OPTOWIN\MYL_100.OBJFILE C:\OPTOWIN\MYC_100.OBJFILE C:\OPTOWIN\RASDIAL.OBJFILE C:\OPTOWIN\PAC_100.OBJFILE C:\OPTOWIN\PAS_100.OBJFILE C:\OPTOWIN\PAS_200.OBJFILE C:\OPTOWIN\POS_100.OBJFILE C:\OPTOWIN\PRE_100.OBJFILE C:\OPTOWIN\QBE_100.OBJFILE C:\OPTOWIN\REC_100.OBJFILE C:\OPTOWIN\REG_100.OBJFILE C:\OPTOWIN\REP_100.OBJFILE C:\OPTOWIN\REPO.OBJFILE C:\OPTOWIN\RPT_100.OBJFILE C:\OPTOWIN\SCH_100.OBJFILE C:\OPTOWIN\SCH_200.OBJFILE C:\OPTOWIN\SER_100.OBJFILE C:\OPTOWIN\SNR_100.OBJFILE C:\OPTOWIN\STT_100.OBJFILE C:\OPTOWIN\SYS_100.OBJFILE C:\OPTOWIN\TDM_100.OBJFILE C:\OPTOWIN\TER_100.OBJFILE C:\OPTOWIN\TEX_100.OBJFILE C:\OPTOWIN\TRT_100.OBJFILE C:\OPTOWIN\TRT_101.OBJFILE C:\OPTOWIN\TDT_100.OBJFILE C:\OPTOWIN\TGET.OBJFILE C:\OPTOWIN\MGET.OBJFILE C:\OPTOWIN\UEB_100.OBJFILE C:\OPTOWIN\USE_100.OBJFILE C:\OPTOWIN\USL_100.OBJFILE C:\OPTOWIN\UTW_TER.OBJFILE C:\OPTOWIN\WININET.OBJFILE C:\OPTOWIN\XCO_100.OBJFILE C:\OPTOWIN\EDTFUN.OBJFILE C:\OPTOWIN\INFSCR.OBJFILE C:\ACT\OBJ\BIVBX.OBJFILE C:\ACT\OBJ\PREDT.OBJFILE C:\ACT\OBJ\REGIST.OBJFILE C:\ACT\OBJ\TER.OBJLIB C:\ACT\lib\DBFCDXLIB C:\ACT\LIB\_DBFCDXLIB C:\ACT\lib\DBFAXSLIB C:\ACT\LIB\FIVEDB53.LIBLIB C:\ACT\LIB\NINETY5.LIBLIB C:\ACT\LIB\FIVELIB C:\ACT\LIB\FIVECLIB C:\ACT\LIB\OBJECTSLIB C:\ACT\LIB\WINAPILIB C:\ACT\LIB\AXSC2WIN.LIBLIB C:\ACT\LIB\TER.LIBfile C:\ACT\OBJ\MPAR.OBJDEFBEGINname Optowindescription 'Kill your memory'exetype Windows 3.1code moveable discardable preloaddata preload moveablestacksize 9500heapsize 2048segment 'PLANKTON_TEXT' nondiscardablesegment 'EXTEND_TEXT' nondiscardablesegment 'OM_TEXT' nondiscardablesegment 'OSMEM_TEXT' nondiscardablesegment 'SORTOF_TEXT' nondiscardablesegment 'STACK_TEXT' nondiscardableDEFENDBLINKER CLIPPER SYMBOL OFF Thanks for your response but the link script you post is for Clipper 5.3 and I need for 5.2e.-------------------------------------------------------------------------------- I want to try Advantage Xbase Server. Does anyone know where I can find it? <!-- m --><a class="postlink" href="http://solutions.advantagedatabase.com">http://solutions.advantagedatabase.com</a><!-- m -->-------------------------------------------------------------------------------- Does FiveWin work with Advantage? Yes it does! Rene Flores uses it frequently. Rene? Yes it works great, as it does with Dos clipper, we have been using it for some time now. My only grip is its expensive (in SA) which is making us look at alternative products YES; no problems at all. You need a special link-script and in your app. these rows:REQUEST DBFCDXAXRddSetDefault("DBFCDXAX")SET AXS LOCKING OFF ADS works superb with FiveWin (faster than in DOS, super stable and great with data transactions), we have been using it for a long time ago (almost 4 years) in several projects with our apps with FW, we are testing actually with Xbase++ (in DOS mode) and seems to work good. Keep in touch, Extended Systems (the producers of ADS) are planning to create a Driver for Harbour and if it works as Harbour will do, boy, you will have a great DataServer. there is already a ads rdd driver in harbour and it works good...... Are they writing their own DBFCDX, does anybody know? I would be much happier if I knew I could buy COMIX for Harbour and use that which I know is proven in what is such a critical part of the whole product DBFCDX is actually working in harbour already before DBFNTX and it is part of harbour so there is no need to buy it separately. My point is ...Did they re-write it from scratch?? and if so its bound to be buggy, and database handling has to be 100% perfect......... Look at Clipper5.2e DBFCDX which was buggy so CA when they released Clipper 5.3 licensed COMIX and used that in 5.3 as DBFCDX instead of their own buggy version. To me COMIX is king (for local /small network access) and that is what s/be in Harbour Is COMIX still alive?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> My version is from 1997. yes, for 5.2 if you have Clipper 5.3, the DBFCDX in Clipper 5.3 is Comix. I think Bruno is about done with the cdx driver for harbour. i don't know if it will support all the comix stuff <i hope so> is it likely that one person can get right in a short time what has evolved and been developed by many over a long period of time....., what's the likelihood?-------------------------------------------------------------------------------- It's possible to know how can you work with Borland Control without Fivewin/3 error?because i made a little aplication, and this crash when reopen some dialog with Borland Control , I renamed the Bwcc.dll to miBwcc.dll and load in the begining of the main program, and free on then end, but this not work correctly (FiveWin/3 error). The strange is that the aplication work fine in my pc where i develop this, but in other machine (same version and revision of windows 95) don't work, i copied the Bwcc.dll, ctl3d.dll..... but don't work, How do you do? Avantage doesn´t use borland controls, they use modifications to TBTNBMP class to make the buttons look like borland's. Suggestion: stop using Borland controls, they only give headaches !!!-------------------------------------------------------------------------------- You can probably improve memory usage if you use ADS by upgrading your client to 5.5Below is extract from Advantage upgrade docWhat's New in v5.5a) The amount of DGROUP used by the DBFAXS.LIB library has been drastically reduced. Older versions of DBFAXS.LIB could use over 5K of DGROUP. Version 5.5 of DBFAXS.LIB will only use approximately 1.5K.-------------------------------------------------------------------------------- I'm using clipper 5.3 (DBFCDX) With Fivewin 2.3. I want to go to ADS 5.5 (Client) + 5.7.2 (Server)With DBFCDX my application is very fact ( using OrdKeyNo and OrdKeyCount )With DBFCDXAX my application is Sloooooooooow ( using Ax_KeyNo and Ax_KeyCount )Why ?May Ax_ function are not well implemented ?BAD ! Do you use the function Ax_driver() in your Skipper() function ? This really slows down the application.I have no problems with Ax_KeyNo() and Ax_KeyCount()no i do not use ax_driver() in the skipper function. I'm using WBrowse, is wbrowse use ax_driver ?thanks for reply ! If you mean the class twBrowse() from wBrowse.prg; it does not use ax_driver().My ads browses are fast and I also use client version 5.5. If you send me your sloooooow code I will take a look at it.Thanks fo reply. I solve my problem not using ax_keyno().-------------------------------------------------------------------------------- I am using ADS and need to have Raw Save method without implicit locking andunlocking. I need to control the locking and unlocking myself. Earlier Mr.James Bott was kind enough to post a solution subclassing TData, using anundocumented save method. I lost this posting and not able to relocate it.I shall be glad if Mr. James Bott advises how to subclass TData so that Ican have a save method without locking or unlocking. You don't have to subclass, just call the saveData() method instead of the save() method.Thank You-------------------------------------------------------------------------------- I am using ADS. Though the error I am trying solve is an Advantage error, the source of the problem is the behaviour of Refresh() and Paint() methods. The error is Advantage DBFCDXAX/6619, which means that "The client comm layers was busy with one database operation when a second database operation was requested".Our applications have sevaral browses and the users have choices to change 'orders', choose different filters, etc while viewing the browses. While the refresh operations are fast on LAN, the refresh operations take between 1 to 2 seconds on WAN (64 kbps connectivity thro permanent / ISDN). When a user over WAN initiates a filter or change of order, the refresh takes about a second and if he triggers another change (filter or order) before theearlier refresh finishes, the above error occurs.In the DOS TBrowse, there is a vaiable TBrowse:stable. In such a case, we can check for :stable before changing the filter or order to avoid the above error. But either in TWBrowse or TSBrowse, I could not find any such vaiable and through my program I am not able to decided if the Refresh() andPaint() operations were completed.If there is a way to query the browse object, to find out if the browse is stable ( or if the refresh or paint operations were completed ) it ispossible to hold up the second request for change of filter/order till the browse is stable.Can Mr.Manuel Mercado or any other help please? There are some issues on the website of advantage on this problem. The main problem is that ads supports multitasking, this can lead to error6619 in some cases. This problem can also occur in normal network-conditions. I solved this problem by changing the adsipx16.dll and the adsip16.dll on every workstation to the versions that do not support multitasking. These are not the default .dll files; I got them from advantage.Also, I have modified the errsysw.prg to support some other ADS errors. I also made a function that auto-copies the .dll files to the workstation if these are not present. If you are interested I can send you these files; send me an email.I am very thankful for your reply. I have been struggling with this problem for quite sometime.I shall be extremely thankful if you can kindly send the dlls and your modified errsysw.prg. I do hope this will avoid the errors we are facing.Thanks in advance Files have been sended to you. Succes.-------------------------------------------------------------------------------- If I do this "Set _3DLook On" with ADS and NT 4.0, the 3D controls are disabled but if ADS not linked seems OK on NT4.0. How can I fix this? My AP working fine on WinXP.Below:INIT FUNCTION App_Init()RddRegister( "ADS", 1 )RddSetDefault( "ADS" )Set SERVER LOCALSet FILETYPE TO CDX........Set _3DLook ONSet Resources to 'KIDS32.dll'......Return NilExit Function Exit_Init()Set 3dLook OffSet Resources toReturn Nil have you try using my ctl3d.lib?Sorry to bother.I forgot to copy the Ctl3D.Dll to my working directory <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->))Thank you for all your support.Jose, I'll try your Ctl3D. OK? <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->))-------------------------------------------------------------------------------- My apps hanging on tsbrowse right click mouse on Fw2.1c and ADS 6.0 client.What should i do?It's OK now. I Have to call AX_TagOrder() before TSBrowse. Strange......Thanks anyway.-------------------------------------------------------------------------------- Did somebody use Advantage Local Server with Fivewin/Clipper? There are ACE functions ADSSetServerType and ADSConnect, but how to use these ACE functions under Fivewin? can not be used with 16bit clipper/fivewin applications. But can be usedwith 32bit Harbour applications-------------------------------------------------------------------------------- I'm trying to implement the ADS local server and I seem to have too many #include files. I'm getting the following compiler error.Fatal C3048 Preprocessor table overflowI can't seem to find any help in the Norton Guides.Using 5.2eincluding: FIVEWIN.chTSBROWSE.chTSBUTTON.chADSNTXAC.ch put these defines before all your include files#define _VIDEO_CH // if you are not using videos in your prg.#define _DDE_CH // if you are not using DDE's#define _TREE_CH // if you are not using Trees#define _DLL_CH // if you are not defining DLL functions#define _OBJECTS_CHand then#include "fivewin.ch"now please tryThank you - that worked well.-------------------------------------------------------------------------------- I am looking for a List of functions for the ADS library but can not find them. A Manual of functions to call? Can anybody help bygiving me the Address for the Page on the Web. Were the Functions are listed.Thank you.PSI have pick up some of the Functions. But don't know all the Par. to pass to the functions.If you downloaded the ADS client for Clipper the there's a Norton Guides with all the functions documentation.In other clients, such Delphi one, a HLP file is provided. I am using the DLL for Harbour and Fivewin 2.3 is it the same as the ADS Client for Clipper?-------------------------------------------------------------------------------- I am finamy going to convert a program from Comix 3.0 single user to ADS client server.I have already a client server Fortress. That should be working better for Comix users. But that application did'nt work fine becauseof a problem with the ipx drivers. The clients were W98 WME and W2000. Fortress was fast to sell but when I contact them with a problem they never reacted. This happend several times.I often use the CmFilter() in my application that has to be changed. Is there an equivalent in ADS. Is there a fast way to convert.Sorry, I have more questions.Is the server also able for later use with Harbour ?I think ADS works also with IPX. Are there any problems known with this driver in collaboration with internet. Have they already aTCP version and is this working stable.Is the local server working in a client server situation while developping. I mean data on Pc1 and program on Pc2 ?I know, many questions, but here is the place to ask so. Yes your coADS code will work the same with Harbour.I am finamy going to convert a program from Comix 3.0 single user to ADS client server. I have already a client server Fortress.That should be working better for Comix users. But that application did'nt work fine because of a problem with the ipx drivers. Theclients were W98 WME and W2000.Fortress was fast to sell but when I contact them with a problem they never reacted. Thishappend several times. What a shame. I often use the CmFilter() in my application that has to be changed. Is there an equivalent in ADS.Is there a fast way to convert. I don´t remember but you can make a question in his news forum. Check <!-- w --><a class="postlink" href="http://www.advantagedatabase.com">www.advantagedatabase.com</a><!-- w --> for the link Sorry, I have more questions. Is the server also able for later use with Harbour ? Yes I think ADS works also with IPX. Yes. The only trouble you can have is with Windows Me and XP Home Edition because it cant be connected to a server, just peer to peer. Are there any problems known with this driver in collaboration with internet. No, I never got any problems but got some problems whit protocols and the like. Have they already a TCP version and is this working stable. Yes Is the local server working in a client server situation while developping. I mean data on Pc1 and program on Pc2 ? I never test the Local Server but I know many user of FW have done that. We have installed over 500 ADS licenses during the las 5 years and let me tell you that is a superb product. >I have already a client server Fortress. That should be working better for Comix users. But that >application did'nt work finebecause of a problem with the ipx drivers. The clients were W98 WME and >W2000. ADS runs on both, IPX or TCP/IP, if your app is a Clipper FiveWin one, it will automatically detect the protocol and will work with anyproblem.>Fortress was fast to sell but when I contact them with a problem they never reacted. This happend >several times. ADS has a wonderful tech support team, a huge, enormous knowledge base with almost all the problems you can find solved, anews group is also available and your questions are solved within the next 24 hours you posted them.>I often use the CmFilter() inmy application that has to be changed. Is there an equivalent in ADS.>Is there a fast way to convert. ADS has one thing called Advantage Optimized Filters (AOFs), they are incredibly fast no matter how big is you database.>Is theserver also able for later use with Harbour ? Yes !!!!, you bet, the same server can be used with Clipper, Harbour, VisualBullshit, Delphi, or C.>I think ADS works also with IPX.Are there any problems known with this driver in collaboration with >internet. Have they already a TCP version and is this workingstable. As I told you before, ADS works great on both (IPX would be my choice, it's faster) but if you have TCP/IP installed it will work, andalso if you have IPX installed. ADS has a plug-in called Advantage Internet Server (AIS), boy, this is a great tool, just put you ADS server in the internet runningAIS, and the same client program you use in your local area network will be using your remote data via internet, no matter where inthe world you are. this is cool.>Is the local server working in a client server situation while developping. I mean data on Pc1 and >program on Pc2 ? Nop, Local Server doesn't include client/server capabilities, it's only provided for you to test your programs. >I know, many questions, but here is the place to ask so. You can also go to :http://solutions.advantagedatabase.com to get more technical help on this issue. Local Server is for 32 bit only <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->( but if you have one PC like i have, use VMware to create virtual network and test your app from vmware's client OS (3.1,95,98,ME,2K,XP or even Linux). That's great! Good luck on your convertion. I tested ADS for Win9x/Me in a stand alone PC, i conected two FW application to the server in the same machine this work, i testd transaction and work. I useed ADS 6.11 5 users Trial for win9x/me-------------------------------------------------------------------------------- I have installed the evaluation version of ADS 6.11 on my W2000 server. When I press CTRL ALT DEL on the server I see ADS is runningI made a small test program in FiveWin.I found it strange that there is no point in the source code that points to the servermap were the data is stored.The test program gives an error"FIVEWIN veroorzaakte een algemene beschermingsfout in module herbs.exe op 0009:7DC2"Can someone tell me what I forgot.I can't find ideal settings for stack and heap. May be the problem is there. I use this the check everything:{If ax_Loaded( "\\server\path\" ) rddSetDefault( "DBFCDXAX" )ax_RightsCheck( .F. ) // by-pass NT rights checking. ("\path\" not even shared or users have no idea this path exist)ax_AXSLocking( .F. ) // share locking to other appsElseQuitEnd}On your link:{<others>FILE DBFCDXAXFILE AOFLIBRARY AOFLIBRARY DBFAXS<fivewin lib>LIBRARY AXSC2WIN}Thanks I think I just made my first connection to a dbf via Ads.Every time I start the small test program my firewall tells me that"NTVDM.EXE" tries to connect to internet.It begins with NT, so it could be a part of W2000.Someone any idea what this is. Remember that you can't run your program in a local drive (where are the server)-------------------------------------------------------------------------------- I am converting my first application from COMIX to ADS.The orderDetail file has about 100.000 records and is indexed on 9 different indexes.Only index 6 has a function --> StrZero(Coef,6,4) I think StrZero() is known by Clipper and ADS.All the others indexes consist of 1 to 3 character fields.An important screen contains initially all de order details. The user can choose a period, client, clienttype and so on.Every time I change something in the query I have to wait more than a minit. With comix this was only a few seconds with 3simultan users.Several times when asking some queries the program finisch without any error. All program screens simply disappears.My stacksize is 10000and the heapsize is 1024I think I am doing something wrong but I cannot find it. Are you opening and closing your files while you're doing your queries? One of the things that ADS requires is that you should open your tables only once because it takes longer time to open the filesthrough ADS.That depends on the contents of the query. When you query on the. When you choose a dealer the program first opens dedealerfile. Returns the number (string) of the dealer to compare in the query. After choosing the dealer the dealer file is closed.I try too change the concept today. Becauwe I always use a Is_Open_Dbf(file,index,...) I can change that to open all files at thebeginning and the Is_Open_Dbf() can be a select.I Think that cannot be the cause because the Order detail file is also indexed on periode plus day. When I fill in the from-period"20020515" 15 may 2002. The program just need that one index. It should go fast but it does not.Anyway I will open all files at the beginning. I let you know the result.The program is changed now. All files are opened at the beginning.I still need 50 seconds for a simple query in 100000 records. Each record = 103 Bytes. So it is not a big one. Are you using filters or scopes?If you're using filters try using the ones from ADS. If you think the problem is the strzero() index try changing that index by creating your own strzero(). However, I doubt it is thestrzero() function. I have indexes using local functions and my queries have woked fine with ADS.> If you're using filters try using the ones from ADS. I have changed CmFilter() from Comix into AofSetFilter()For the complex queries I use filters because it is impossible to solve everything with scopes I don´t agree with you. My experience is that ADS with Novell is rather fast. And I don´t think that the right way is to open all database when you start the app. I can not imagine how you work in an eventdriven environment without an oDbf-object (I use TData !) for every new dialog/window: so you must open the databases you need forevery dialog/window in a new area - or am I wrong? Maybe I'm wrong but what I have learned from ADS it is that whenever a file is being open it takes much longer than any other driver.In a local network environment this may not be the problem but in an wan evironment it is rather slow. Maybe in newer versions ofADS this has been improved but I worked this with Novell ADS with version 4.0. I agree with you that with an event driven environment files must be kept opening and closing. However, the less you keep openingand closing the better. Also when you use the TPS with ADS you should not open any files or create any files during the transaction.I am changing my application. That means that I am adding some new characterfields which contains expressions, so I canindex straight on that expression. The result is very fast but it is a big change.Maybe it is a good tip for everybody. When setting up an application build extrafields on which you can build simple indexes. Itis the cornerstone of fast applications.I still have to change several child tables from AofSetFilter to Scopes. A simple orderdetail goes faster with scopes.In a stand alone comix situation I could not see a difference but of course that is a stand alone situation.Thanks to all who helped me in this beginner situation. I think you were right from the beginning. I just remember that ADS does not support some expressions specially when you useUDF's in your index expression. I just found this in the ADS NG for version 4.2. I think this is important to remember. I don't know ifwith newer versions of ADS this can be supported. In any case what I told you about the opening of files is also another important issue to consider.Yes I found it. I used the function Asc() in an expression. Now it isalready working better.Not all of the proplems are solved but ADS keeps me busy for just a fewhours and everything needs his time.Thanks for your support.-------------------------------------------------------------------------------- I have ADS 6.11 , Clipper 53.b, FW 2.3 , Blinker 6.0 , TCP/IPI made a small test program in FiveWin.Function ax_Loaded( "\\server\path\" ) always return .F. !during that the same inDOS version is O.K. ( by ADSDOSIP.EXE )"\\server\path\" is also O.K.link:{<others>FILE DBFCDXAXLIBRARY DBFAXS<fivewin lib>LIBRARY AXSC2WIN} never occured to me this situation. can you post that small program so we can test. Do you have installed the comunication DLLs needed for a FiveWin app?ADSIP16.DLL, ADSIPX16.DLL y AXCOMM16.DLLIf so, where did you place them ?-------------------------------------------------------------------------------- My first Client server becoms a fact. Indeed it is going fast. But I stil have some problems.When I keep pushing navigation buttons. PgDn of PgUp or when I am going fast through a table with scrollbars, the program crasheswithout any error. The program simply disapear from the screen.It happens with W2000 as a client and also with WME. It happens in a complex table with relations but also in a simple clientlistthat uses only 1 dbf without lookups and so on.have some additional info on this error. Now the program crashed but there was an error description"ERRORDIAL (0) unrecoverable error 650 : Processor stack fault"The word "Dial" in the error and the fact that the program tries to make a internet connection at startup makes me think that it hassomething to do with the fact that the server is still a trial version. I received a trial from ADS 2 weeks ago. This error occurs when the errorsys does not have enough memory to show de dialog error but perhaps exist the error.log filecheck these one. On the other hand, are you using TCBROWSE? it have memory problems, use TSBROWSE instead.here was no error log created.I do'nt use TcBrowse()Maybe I have to look also for an alternative error system that uses less memory. It´s easy, make your own errorsys function displaying the error and quiting the program. Later put again the standard errorsys. > On the other hand, are you using TCBROWSE? it have memory problems,What memory problems?Gustavo says that the reason I am getting a 650 is a memory fault. In this case it is not the result of using TcBrowse() because I donot use it. I use TWBrowse and TsBrowse().I think he means that the error system also need memory.Interesting point is that some bugs does not result in an error-dialog but only consumes some memory. When that occurs in a loop(maybe that is what happens in my problem situation - PGDN read several records and refresshes the screen in a loop) there is anerror from the point the program is runned out of error.When typing this I also read Axel's answer. That is an interesting point I first go to test that. The f*kng 5333.¡¡Si habremos hablado por este tema!!, despues aparece A.L. promocionando no se que nuevo super browse, si le van a dar soporte comose lo dieron al TCBrowse bien embromados vamos a estar. De no haber sido por el TSBrowse tuyo y de Manuel no se que sería de mi aplicación. Si puedes traduce esto al Ingles, que mi furia me lo impide. sometimes Ive got the same error 650. I dont work with ADS. Maybe the reason was much traffic in the net. Dont know. But since Ilink with Blinker 5.1 and increased the stacksize to 4096 I have no error 650. Correction:stacksize: 9500heapsize I increased to 4096The problem is not solved but this time I have a log file(b)ERRORSYS (0) Unrecoverable error 650: Processor stack fault (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 ERRORDIALO 0000 (b)ERRORSYS 0000 (b)SETFILTER 0000 TWBROWSE:PAGEDOWN 0000 TWBROWSE:KEYDOWN 0000 TWBROWSE:HANDLEEVEN 0000 _DBSKIPPER 0000 (b)SETFILTER 0000 TWBROWSE:SKIP 0000 TWBROWSE:PAGEDOWN 0000 TWBROWSE:KEYDOWN 0000 TWBROWSE:HANDLEEVEN 0000 DIALOGBOX 0000 TDIALOG:ACTIVATE 0000 KLANTTAB 0425 (b)MAIN 0101 TBTNBMP:CLICK 0000 TBTNBMP:LBUTTONUP 0000 TBTNBMP:HANDLEEVEN 0000 WINRUN 0000 TWINDOW:ACTIVATE 0000 MAIN 0158 The problem start in the line where you define the filter expression. If you are not putting any filter expression then the problemis on TwBrowse so you will need to compile the TwBrowse with line numbers to check exactly in wich line is the error.I have added some memory into the server. The server has now 256 MB. It makes no difference. The problem stays.I think the program always calls the setfilter method from TWBrowse() I have changed the program so that there was absolutely nofilter in the database.The call to SetFilter always stays. I placed a simple Browse() after opening the file. I results in the same error. I have a friend who had the some problem and he discovered that there is a problem in TWBrowse using NTX indexes. He moved to CDXand solved the problem.use already CDX.I was using FW2.2 and I have just installed FW2.3. There is a difference now. The errorsys gives a ADS 6619 error6619 Client comm layer was already busy with one database operation when a second database operation was requested.So I found the nature of the error but the errorlist does not gives a solution. I sugestt you to contact the ADS supplier. Some time ago I got these errors and was the dlls on the client side whith large databases.Ads informed me that I have to make a ADS.INI wth contents[SETTINGS]MULTITASKING_OFF=1This does not help. Does anybody has know if there has to be a call to that INI from within FW. As I know the .Ini does not apply to 16 bits applications. My firewall software confirms that ADS tries to make an Internet connection when the fivewin programa starts up.I have a full two user version installed.-------------------------------------------------------------------------------- Does someone use ADS serverW2000 + TCP/IP + Clipper 5.3b + adsdosip.exe ( DOS without FiveWin)Changing compilation from 5.2e to 5.3 happened the work strongly slower.Adsdosip.exe showstransmission more quantity of packs with identical activities looking over the base.The libraries Dbfaxs.lib are dated - 25.09.2001 ADS libs for 5.3 are not the same that the ones for 5.2., did you checkedyou are using the right ones ?On the other hand, what version of Clipper 5.3 are you using, service pack "a" or SP "b".--------------------------------------------------------------------------------
Boris Pekic - NG's archive
ALLTEXT-------------------------------------------------------------------------------- Some days ago I bought the Alltext 4.5 vbx control (standard) and it works very well except for a detail... I doesn't know of how to print the content of the control. I am using Fivewin 1.9.5, Clipper 5.2e and Blinker 3.30 I don't know that specific control, but I guess you may try:&#9; <oControl>:HardCopy( <nFactor> )-------------------------------------------------------------------------------- Can anyone tell me how can i save a five with the correct fonts in it ? I can't get the FontTableGet to work, and if i grabe the info in the ftext, it returns a none RTF format. First in the dialog where you have defined the Alltext Vbx you have to change the property SelFtype to 13 and the you can use oVbx:Ftext:= textowhere texto is the text you have previously stored in a memo field.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Windows API functions-------------------------------------------------------------------------------- Do you have any other function documentation about system calls ? Or is any public document on the internet where I can found this kind of information ? <!-- m --><a class="postlink" href="http://www.geocities.com/SiliconValley/Foothills/7260/Download/Code/ControlP">http://www.geocities.com/SiliconValley/ ... e/ControlP</a><!-- m --> This is another site for Windows api : <!-- m --><a class="postlink" href="http://skyscraper.fortunecity.com/transmission/45/api/">http://skyscraper.fortunecity.com/transmission/45/api/</a><!-- m --> <!-- m --><a class="postlink" href="http://skyscraper.fortunecity.com/transmission/45/api/">http://skyscraper.fortunecity.com/transmission/45/api/</a><!-- m --><!-- m --><a class="postlink" href="http://home1.swipnet.se/~w-10159/files/win32hlpfiles/">http://home1.swipnet.se/~w-10159/files/win32hlpfiles/</a><!-- m --><!-- m --><a class="postlink" href="http://www.geocities.com/SiliconValley/Foothills/7260/Download/">http://www.geocities.com/SiliconValley/ ... /Download/</a><!-- m -->-------------------------------------------------------------------------------- I am working on a Class for the Microsoft Crypto API for encrypting/decrypting data & files using microsofts implementation of MD5 and RC4 algorithms of RAS Data Security Inc. I need to be able to encrypt data at 128bit. I am having a problem with my first 32 bit DLL call. Does anyone have any ideas why this never returns a handle?#include "FiveWin.ch"#define PROV_RSA_FULL 1************************************Function Main()local hCryptProv := 0AcquireContext(@hCryptProv,'','',PROV_RSA_FULL, 0)MsgInfo(hCryptProv)if hCryptProv > 0ReleaseContext(hCryptProv, 0)endifreturn nilDLL32 Function AcquireContext( @hProv AS LONG ,;cContainer AS LPSTR,;cProvider AS LPSTR,;nProvType AS DWORD,;nFlags AS DWORD ) ;AS BOOL PASCAL from "CryptAcquireContextA" LIB "ADVAPI32.DLL"DLL32 Function ReleaseContext( hProv AS LONG,;nFlags AS DWORD ) ;AS BOOL PASCAL from "CryptReleaseContext" LIB "ADVAPI32.DLL" Never messed with the Crypto API but [jump ahead, where you define AcquireContext) Thanks for the suggestion. I forgot all about AS PTR as a type. That was it. BTW it still needs the @ though. Now I have another problem. Here is the Encrypt Function description:#include <wincrypt.h>BOOL WINAPI CryptEncrypt(HCRYPTKEY hKey, // inHCRYPTHASH hHash, // inBOOL Final, // inDWORD dwFlags, // inBYTE *pbData, // in/outDWORD *pcbData, // in/outDWORD cbBuffer // in);ParametershKeyA handle to the key to use for the encryption. An application obtains this handle by using either the CryptGenKey or the CryptImportKey function. This key specifies the encryption algorithm that is used.hHashA handle to a hash object. This parameter is used only if a hash of the data is to be computed at the same time the encryption is being performed. See the "Remarks" section for more information. If no hash is to be done, this parameter must be zero.FinalThe Boolean value that specifies whether this is the last section in a series being encrypted. This should be TRUE if this is the last or only block, and FALSE if it is not. See the "Remarks" section for more information.dwFlagsThe flag values. This parameter is reserved for future use and should always be zero.pbDataThe buffer holding the data to be encrypted. After the encryption has been performed, the encrypted data is placed back in this same buffer. The size of this buffer is specified by cbBuffer. The number of bytes of data to be encrypted is specified by pcbData. This parameter can be NULL if all you are doing is determining the number of bytes required for the returned data.pcbDataThe address of the data length. Before calling this function, the caller should set this parameter to the number of bytes to be encrypted. Upon return, this address will contain the number of bytes of encrypted data. If the buffer specified by pbData is not large enough to hold the data, the function returns the ERROR_MORE_DATA error code (through GetLastError) and stores the required buffer size, in bytes, into the variable pointed to by pcbData. If pbData is NULL, then no error is returned, and the function stores the size of the data, in bytes, in the variable pointed to be pcbData. This lets an application determine the correct buffer size unambiguously. When a block cipher is used, this data length must be a multiple of the block size, unless this is the final section of data to be encrypted and the Final flag is TRUE.cbBufferThe number of bytes in the pbData buffer. Note that, depending on the algorithm used, the encrypted text can be slightly larger than the original plaintext. In this case, the pbData buffer needs to be sized accordingly. As a rule, if a stream cipher is used the ciphertext will be the same size as the plaintext. If a block cipher is used, the ciphertext will be up to a "block length" larger than the plaintext.Here is my code:pbBuffer := space(dwBufferLen)dwCount := fread(hSource,@pbBuffer,dwBlockLen)Encrypt(hKey, 0, feof(hSource), 0, @pbBuffer, @dwCount, dwBufferLen)DLL32 Function Encrypt( hKey AS LONG,;hHash AS LONG,;lFinal AS BOOL,;nFlags AS DWORD,;@cData AS LPSTR,;@nLen AS DWORD,;nSize AS DWORD ) ;AS BOOL PASCAL from "CryptEncrypt" LIB "ADVAPI32.DLL"I Get a GPF everytime I call this function. I have tried all sorts of ways of defining the function and no matter what I do I get a GPF. I have tried Padr() of the buffer. I have tried AS PTR for the @ variables. I haved Any ideas? I'd be very intresting to see this work. Keep us posted ok? I personally wouldn't even use CryptoApi since there are 2 keys that can break it - one at Microsoft and one at the NSA ( no such agency ). The prefered option is PGP - the choice of hackers.Yea, except that most of the world is Microsoft based. If you want to install an app on any machine out there and know that the encryption will work stick with a standard. By the way they use RSA Data Security Inc.'s encryption which is the industry standard for encryption. I would rather go with the masses on this one than stand alone. I am being forced by our industry to prove data security and the best way is to use what microsoft has already done. PGP works - you can download the source - and - export out of North America is now allowed. Two things you can check:a.- Find out if the strings have to be NULL terminated, ie, add a Chr(0) at the endb.- Raise your heap and stack sizes in your link script. For example using Crystal or ODBC requires something like StackSize 17500 and HeapSize 4096. Of course, you'll have to play a little bit with the numbers. Good luck, since GPF when interacting with the WinAPI can be a nightmare finding. Hope you pull that stuff though before going nuts.Here is a working example of using the Microsoft Crypto API to encrypt and decrypt a file. I will be working on this to create a class and improve its functionality. We need to encrypt/decrypt a buffer as well as a file and want to test for 128bit encryption. ( CRYPTO.PRG )-------------------------------------------------------------------------------- How do you create winapi.lib ? What lib it is to import ? We do use Borland implib.exeI know. But what dll to import ? Syntax ? > I know. But what dll to import ?Many of them. One for each used Windows API.> Syntax ?implib YourLib.lib WindowsAPI.dll-------------------------------------------------------------------------------- Did someone already use a tool to SPY Windows API (not windows message) ? If so can you provide a URL or if it's a free tool you can send it by Email atSylvain, go to <!-- m --><a class="postlink" href="http://ww.programmers-tools.org">http://ww.programmers-tools.org</a><!-- m --> or <!-- m --><a class="postlink" href="http://protools.cjb.net">http://protools.cjb.net</a><!-- m --> ... there you will find many useful and free tools.<!-- m --><a class="postlink" href="http://www.programmers-tools.org">http://www.programmers-tools.org</a><!-- m --> gives a 'Cannot find server or DNS Error' Is this the correct URL ???No, it's <!-- m --><a class="postlink" href="http://www.programmerstools.org">http://www.programmerstools.org</a><!-- m -->-------------------------------------------------------------------------------- I have FW 2.2c in Windows 98 & Outlook Express 5.5. I get a return code -1 using TESTMAIL.PRG (Class TMAIL).On a system with Outlook 97 it works fine. In MAPI.C is loaded MAPI.DLL but on my system there is only MAPI32.DLL. have the same problem. No need to search a mapi.dll. I took a MAPI.DLL from a Win95 CD but without success. I have Windows 98 with Outlook 97 installed and it works fine ..... I think Mapi.dll is present as a result of Outlook 97. I have several apps that need the Mapi.dll ....... and all are working. I think the Mapi.dll is from Outlook 97 due to the date of the file OOPS forgot to mention Outlook Express 5.5 is also present on my Windows 98 system.-------------------------------------------------------------------------------- If I have the name of a Windows API function, how will I know which dll it comes from? It may seems like a "brute force" solution but it works:Generate the DEF file for all DLLs on windows directories:impdef.exe name.def name.dll (you may use a batch file to automatize it) and later on look for the name on the DEF files <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Most of the time it's indicated in the MSDN ! Wich function I can verify if I have the DLL name !Thanks, found it it MSDN. They gave as requirement user32.lib, which I guessed meant user32.dll is the one, and I guessed right <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.<!-- w --><a class="postlink" href="http://www.allapi.net">www.allapi.net</a><!-- w --> Thanks, forgotten about that site.-------------------------------------------------------------------------------- I found API that are working well under all Windows operating system, If you are interested to received a program to test on your operating system and report the result here before I send the new gettasks.prg to Antonio. Send me an Email at <!-- e --><a href="mailto:srobert@logava.com">srobert@logava.com</a><!-- e --> I'll send it back by Email for test. The message is:C:\ARQUIV~1\ARQUIV~1\SYSTEM\DIRECTDB.DLLC:\ARQUIV~1\OUTLOO~1\MSOE.DLLC:\WINDOWS\SYSTEM\BROWSEUI.DLLC:\WINDOWS\EXPLORER.EXEC:\WINDOWS\SYSTEM\COMCTL32.DLLC:\WINDOWS\SYSTEM\SHLWAPI.DLLC:\WINDOWS\SYSTEM\MSHTML.DLLC:\WINDOWS\SYSTEM\INETRES.DLLC:\WINDOWS\SYSTEM\USER.EXEC:\ARQUIV~1\MICROS~1\OFFICE\MSO97.DLLC:\ARQUIV~1\MICROS~1\OFFICE\WINWORD.EXEC:\ARQUIV~1\ARQUIV~1\MICROS~1\MSINFO\IEINFO5.OCXC:\WINDOWS\SYSTEM\OLE32.DLLC:\WINDOWS\SYSTEM\WINOA386.MODC:\WINDOWS\SYSTEM\MSIDENT.DLLC:\ARQUIV~1\ARQUIV~1\SYSTEM\WAB32.DLLC:\WINDOWS\SYSTEM\URLMON.DLLC:\ARQUIV~1\OUTLOO~1\MSOERES.DLLC:\ARQUIV~1\ARQUIV~1\GMT\EGIEEN~1.DLLC:\WINDOWS\SYSTEM\DDEML.DLLC:\ARQUIV~1\ARQUIV~1\CMEII\GMTPROXY.DLLC:\ARQUIV~1\ARQUIV~1\GMT\GMT.EXEC:\ARQUIV~1\MICROS~1\OFFICE\FINDFAST.EXEC:\ARQUIV~1\MICROS~1\OFFICE\OSA.EXEC:\WINDOWS\SYSTEM\DESKCP16.DLLC:\WINDOWS\RUNDLL.EXEC:\WINDOWS\SYSTEM\SYSTRAY.EXEC:\WINDOWS\TASKMON.EXEC:\WINDOWS\SYSTEM\WEBCHECK.DLLC:\WINDOWS\SYSTEM\RPCRT4.DLLC:\ARQUIV~1\MCAFEE\MCAFEE~1\AVCONSOL.EXEC:\ARQUIV~1\MCAFEE\MCAFEE~1\WEBSCANX.EXEC:\ARQUIV~1\MCAFEE\MCAFEE~1\VSSTAT.EXEC:\ARQUIV~1\MCAFEE\MCAFEE~1\AVSYNMGR.EXEC:\WINDOWS\SYSTEM\MMSYSTEM.DLLC:\WINDOWS\SYSTEM\MSTASK.EXEC:\WINDOWS\SYSTEM\SPOOL32.EXEC:\WINDOWS\SYSTEM\MSGSRV32.EXEC:\ARQUIV~1\ARQUIV~1\CMEII\CMESYS.EXEC:\ARQUIV~1\ARQUIV~1\MICROS~1\MSINFO\MSINFO32.EXEC:\WINDOWS\SYSTEM\SHDOC401.DLLIt seems to be ok, but just a note. If you get the tasks from MS Word (Help, About...) there is lots more of DLLs and tasks.Sorry, for sure I'm not following the idea.The new API follow the same rules than the previous one to find the task, thetask must have a Window open in the Z order ! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->The ultimate way to have the REAL result is with psapi.dll but it need a CALLBACK function and I'm not enough comfortable with C to do it ! ;-(Wich operating system did you test ? I think it's Windows 98 because with Nt,W2k,XP and the 16 bit version of the program you'll have less task, but with the 32 bit version you have a complete list of task that have a Window in the Z order. I dind't want to change the way Gettasks() is working I just change the GetModuleFilename( GetWindowWord(hWnd,GWW_HINSTANCE) by something that is not loosing memory under NT,W2K and XP ! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->After a Lot of request on my private Email asking me to publish the solution ASAP, I publish the source code for the new Gettasks.prg, justcompile it and add it to your link script to replace the Fivewin Function. Be aware that Antonio didn't review those modification and I didn'treceived much feedback. But my inhouse test under 98,Nt,W2K,XP reveal NO PROBLEM AT ALL, that function won't work under 95 and lower version of Windows and for NT you need at least SP3,as stated in the MSDN library !. If you found a problem don't hesitate to report it here I'll take care of it as soon as possible, any comment and suggestion are ALWAYS wellcome ! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->I tested it with Fivewin 2.3a in 16 and 32 bit and it's working very well !Hope it will help the Fivewin community !;-)) GETTASKS.PRG Nice work Sylvain.Thank's Rene, your comment is always appreciated !After reviewing the source there is a need to standardize the variable name ! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->So here is the formatting correction ! ( The same name - GETTASKS.PRG ) Report for Win98SE:TrueThanks for your nice job! I would have preferred a more general working solution but nice work anyway!Enrico,I think that just adding a few IF that check the Windows version can do the trick with older operating system we can do what is in the original Gettasks() ! Right! Simple and effective!Here you have it !, I tested it on Windows 3.11 and it's working the old fashion ! can you please test it under Windows 95 and if possible Windows ME (The same name - GETTASKS.PRG )Enrico ask for a more generic solution there it is ! (The same name - GETTASKS.PRG ) It seem's that is a problem only With Windows 95 I'm searching the cause and will post the solution. In Windows 95 it follow the new technique but it must follow the older one !This is the Final version also working on Windows 95, the only Windows version that isn't be tested is Windows ME. (The same name - GETTASKS.PRG )Thank's to Enrico for his precious comment, this is the latest version of Gettask(), I removed the cTask:=space(200) from the loop and added a Task name buffer that will be initialized only ONCE if Needed ! ( no one is perfect ! ;-0 )Sylvain Robert (The same name - GETTASKS.PRG ) This solved one of my major problem!I never thought it gettask().You are one of the best!--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Arrays-------------------------------------------------------------------------------- Does someone have a Array2C() and a CtoArray() function that is real fast? Patrick i use a marshall() / unmarshall() functions to convert Array->String <> String->Array .... this functions are very fast in my cases .... i found this functions on a socket sample files.....(very old sample files....) I dont remember the author but i can send them to you monday morning to check them out. Look at the attachment. C2ARRAY() is Clipper and is fast enough. ARRAY2C() is C (source and OBJ attached). Let me know if that's what you need. ( ARAY2C1.ZIP )Can it also store multidimansional arrays with multi type of variables? like 1,2,3,{"A","B","C"},{{1},{2},{3,4}}} and so on... No, it handles character array only. Look at the attachment. It's a ATOC and CTOA function fast as clipper do. BTW it works with any data type and multidimensional arrays. I hope it's what you need. ( ATOC.PRG )Thanks, but this only works for small arrays. Because the macro can only be 256 characters long.-------------------------------------------------------------------------------- Is anybody has a function which can extract a unique (str) element on an array? (Sorry for my english) Sort your Array first and scan it:PRIVATE aArray:={{"Hi",1150},{"ABC",34},{"00",54}}ASORT(aArray, {|x,y|x>y})IF (nI:=ASCAN(aArray,{|uA|uA[1], cSearch))>0cResult:=aArray[2]ELSEcResult:=""ENDIFI'm not sure about the sintaxis-------------------------------------------------------------------------------- i´ve got a strange problem browsing an array using tsbrowse or tcbrowse. compiling it as a standalone program it runs fine, but if i includethis module in a bigger application, i got the following error:Error description: Error BASE/1449 Syntax error: &Args:[ 1] = C {|x| IF(PCount() > 0, oBrw:aArray[oBrw:nAt, 1] := x,oBrw:aArray[oBrw:nAt, 1])}The error occured in the line, the columns are added. I have no idea, why the same code worked standalone and failed in an application.I changed the order in the link-file, but no result.I attached my code and the error.log. I am using FW 1.95 and Ms-Link.I hope anyone can can help me.//------------------------------------------------------------------//// Modul : Rechnungsverwaltung ////------------------------------------------------------------------//#include "TsBrowse.ch"#include "FiveWin.ch"//procedure main ()// rechnung()//return//------------------------------------------------------------------FUNCTION Rechnung ()LOCAL oDlg, oBrwLOCAL nNetto := 0.0, nBrutto := 0.0LOCAL aData := {{"Artikel 1",0, 0, 8, 20},;{"Artikel 2",0, 0, 7, 10}}//Msginfo ("Testmodul Rechnung")AEval( aData, {|x| nNetto += x[4], nBrutto += x[5]} )DEFINE DIALOG oDlg FROM 100,50 TO 400, 500 PIXEL Title "Rechnungsliste"@ 0,0 BROWSE oBrw SIZE 225, 150 PIXEL OF oDlg COLORS CLR_BLACK, GetSysColor( COLOR_BTNFACE )oBrw:SetArray (aData)ADD COLUMN TO BROWSE oBrw DATA ARRAY ELEMENT 1; // <--- Line 44TITLE "Artikel" ; // ERRORFOOTER "Summe";3DLOOK TRUE, TRUE, TRUE;SIZE 120ACTIVATE DIALOG oDlgRETURN (nil)Application===========Path and name: D:\PROJEKTE\WIN\WINTYRE\WT.EXESize: 1,227,776 bytesMax files handles permited: ( SetHandleCount() ) 255Error ocurred at: 17.01.02, 19:51:14Error description: Error BASE/1449 Syntax error: &Args:[ 1] = C {|x| IF(Pcount()>0, oBrw:aArray[oBrw:nAt, 1] :=x, oBrw:aArray[oBrw:nAt, 1])}next curiosity, under the debugger the app runs fine, no error. without the debugger it crashes. Aren't you using static variables in your program that are not visible to other prgs ?Check that the statement: oBrw:SetArray() precedes columns definition. I suggest to put it inmediately after the browse definition/redefinition.Have you tried with #include "TSBrowse.ch" before #include "FiveWin.ch"?In the command line that invokes MS-Link, check that SBrowse.lib precedes FiveWin libs.Do you have the last version 4.0 of TSBrowse?I strongly recommend you to use Blinker instead of Ms-Link. Let me know the result of your tests.thanks for your tips. I am using the latest version of TsBrowse (4.0). I will check hints and report you.> Have you tried with #include "TSBrowse.ch" before #include "FiveWin.ch"> In the command line that invokes MS-Link, check that SBrowse.lib precedes> FiveWin libs.I tried both, but no result <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->(Late last night I discovered a workaround, but its no solution of the problem. If i build all obj-files new, the app runs, building only the changed module, the app crashes. Very strange.I found it, compiling the module with the /zswitch of clipper solves the problem.thanks Be careful because that switch suppresses shortcutting, therforesomething like this:If a .and. bboth parts of the expression will be evaluated even if a returns FALSE.-------------------------------------------------------------------------------- I need help to browse an array. the array stucture is bellow(each array item has 3 value){Name,Description,location} This is part of a program i use to browse arrays with TSBROWSE (Thank's to Manuel Mercado's great job) RC.PRG Namy thanks late but hopefully not too lat (had some problems with my DSL, could receive but not send), a snip of my programs.-------------------------------------------------------------------------------- I want to fill a multidimensional array with data from a dbf (to automatic create tsbrowse's)When I hardcode the arry, it works the filling from the dbf is not yet working (any hints)function NewLbx(oLbx,cType)Local aTmp:={}cType = upper(alltrim(cType))// fill from dbf want work !!!!!!!!!!!!!!!!FOR I = 1 TO 6AADD(aTmp,{})NEXTuse lbxdata index lbxdata alias lbxtmp shared newif !lbxtmp->(dbseek(cType))msginfo("not found")endifDO WHILE lbxtmp->type = cTypeAADD(aTmp[1],alltrim(lbxtmp->head) )AADD(aTmp[2],'"'+alltrim(lbxtmp->veld)+'"' )AADD(aTmp[3],lbxtmp->size )AADD(aTmp[4],lbxtmp->edit )AADD(aTmp[5],alltrim(lbxtmp->index) )AADD(aTmp[6],lbxtmp->centercell )lbxtmp->(dbskip())ENDDOclose lbxtmp// fill will workAADD(aTmp,{"Document","Document","Order","Klant","Toestand","Memo"} ) // 1. HoofdAADD(aTmp,{"Document","Datum","werkbest","Klant","toestand","memo"} ) // 2. FieldAADD(aTmp,{70,78,78,100,100,100} ) // 3. SizeAADD(aTmp,{.F.,.T.,.F.,.F.,.T.,.F.} ) // 4. EditAADD(aTmp,{"Factinfo","","","Factklant","",""} ) // 5. IndexenAADD(aTmp,{0,0,0,0,0,0} ) // 6. Align Cell (0 L, 1 M, 2 R, 3 V)*/FOR I = 1 TO len(atmp[1])ADD COLUMN TO oLbx ;MOVE DT_MOVE_RIGHT ;EDITABLE ;ALIGN DT_RIGHT,DT_CENTER,DT_RIGHT // cells, header, footeroLbx:ACOLUMNS[I]:CHEADING := aTmp[1][i]oLbx:SetData(I, FieldWBlock( aTmp[2][i], Select() ) )....bla bla blaNEXTaTmp:={}return You need to use detached locals.Also it's better to pass the alias name to Select(), or the progam might end up looking for the field in the wrong table!> FOR I = 1 TO len(atmp[1])> ADD COLUMN TO oLbx ;> MOVE DT_MOVE_RIGHT ;> EDITABLE ;> ALIGN DT_RIGHT,DT_CENTER,DT_RIGHT // cells, header, footer>> oLbx:ACOLUMNS[I]:CHEADING := aTmp[1][i]> //oLbx:SetData(I, FieldWBlock( aTmp[2][i], Select() ) )oLbx:SetData( I, fillCol(i) )>> ....bla bla bla> NEXT> aTmp:={}> returnStatic Function fillCol( aLbx, I )Return FieldWBlock( aTmp[2][i], Select( lbxtmp ) ) Function Dbf2Arr( cAlias )Local nFields := (cAlias)->( FieldCount( ) )Local aData := {}Local aFields := {}Local n := 0(cAlias)->( DbGotop( ) )While !(cAlias)->( Eof( ) )aFields := {}For n := 1 To nFieldsAAdd( aFields, (cAlias)->( FieldGet( n ) )NextIf Len( aData ) < 4000Aadd( aData, AClone( aFields ) )ElseMsginfo("Only first 4000 records grabbed")ExitEndif(cAlias)->( DbSkip( ) )EndIf Empty( aData )aData := { ARRAY( nFields ) }EndifReturn( aData )-------------------------------------------------------------------------------- I want to save an array to disk and than restore it from disk!!!It's a three dimension array [4,92,3]Which function is OK to use and what the parameters to call them ? I think Six RDD has this function. At least you can save each single array item to a DBF (one item per record). why don´t you save your array in a dbf and restore it from there? Take a look in windows.prg. There are two functions asave() and aread(). ASave() translates an array to a string and ARead() does the opposite. I'm not sure if they can handle three dimensional arrays, but you may be able to modify the code to handle them.If that doesn't work, let me know. I know I have another routine that Roger Donnay wrote years ago to save a load arrays. I will have to dig through my archives to find it.You might also try Oasis at: <!-- m --><a class="postlink" href="http://www.the-oasis.net/">http://www.the-oasis.net/</a><!-- m --> I have attached a zip file containing the 16-bit and 32-bit object code andthe source code for saving/restoring arrays. It will save and restore multidimensional arrays with no problems.Works in FW and FWH. ASAVE.ZIP--------------------------------------------------------------------------------
Boris Pekic - NG's archive
AVI-------------------------------------------------------------------------------- How can i play an avi video with a continous loop ? can i transform a animated gif in an avi video ? With what software ? I have an answer to your first question.> How can i play an avi video with a continous loop ?cBuffer := SPACE(200)DEFINE WINDOW oWnd FROM 1, 5 TO 20, 75DEFINE TIMER oTimer INTERVAL 1000 ACTION Endloslauf() OF oWndACTIVATE TIMER oTimerACTIVATE WINDOW oWnd MAXIMIZED ON INIT ShowVideo()FUNCTION ShowVideo()mciSendStr( "OPEN AVIVIDEO!"+Upper(Alltrim(cFile))+" ALIAS VIDEO STYLEPOPUP", @cBuffer, oWnd:hWnd)mciSendStr( "WINDOW VIDEO HANDLE "+Alltrim(str(oBmp:hWnd)), @cBuffer,oWnd:hWnd)mciSendStr( "PLAY VIDEO FROM 0", @cBuffer, oWnd:hWnd)RETURN (.T.)FUNCTION Endloslauf()LOCAL nLaenge, nPositionmciSendStr( "STATUS VIDEO LENGTH", @cBuffer, oWnd:hWnd)nLaenge := VAL( cBuffer )mciSendStr( "STATUS VIDEO POSITION", @cBuffer, oWnd:hWnd)nPosition := VAL( cBuffer )IF nPosition >= nLaengemciSendStr( "PLAY VIDEO FROM 0", @cBuffer, oWnd:hWnd)ENDIFRETURN (.T.)-------------------------------------------------------------------------------- Does anyone know how to play one of the AVI files that shows the file copy using the VIDEO class using the system default color as the background color instead of the pink transparent color that shows now? I found a good way to display those "flying folder" avi files that are common in Win 9x. Convert the AVI to bitmaps and create a single bitmap resource with the frames appended end to end and end the name with the number of frames like FILECOPY25 . Then using the following code you can display any animation you want.Function Animate(cResource)local oDlg,lOkDEFINE DIALOG oDlg FROM 10, 20 TO 18, 65 TITLE "Testing Animation"@ 3.5, 2 BUTTON "&Ok" OF oDlg SIZE 35, 12 ACTION ( oDlg:End, lOk := .t. ) DEFAULTACTIVATE DIALOG oDlg CENTERED ON INIT Startup(oDlg,cResource)return nilFunction Startup(oDlg,cResource)local oTmr,oBmp,nFrames,nFrameWidth@ 2, 20 BITMAP oBmp RESOURCE cResource SIZE 0,0 PIXEL OF oDlg NOBORDERoBmp:SetColor(GetSysColor( COLOR_BTNFACE ),GetSysColor( COLOR_BTNFACE ))nFrames := val(right(cResource,2))nFrameWidth := oBmp:nWidth()/nFramesoBmp:lTransparent = .t.MoveWindow(oBmp:hWnd,2,20,nFrameWidth,oBmp:nHeight())DEFINE TIMER oTmr OF oDlg ;INTERVAL 70 ACTION ( If( oBmp:nY < -oBmp:nWidth() + nFrameWidth*2,oBmp:nY := 0,;oBmp:nY -= nFrameWidth ), oBmp:Refresh( .f. ) )ACTIVATE TIMER oTmrreturn nilThis works GREAT! No need to have AVI's or BMP's in your install directory or 25+ entries in your resource. It also solves the problem of the transparent color in the AVI. The trick was resizing the oBmp after the Activate because the SIZE x,y doesn't use pixel metrics before the paint. Cool!! Group: attached is a bmp, try with Jeff's module. ( MOVING.ZIP ) How do we convert bitmaps into a single bitmap ? Do you mean we will have only one file intead of 25 ? nd AVI too BMPs, what tool do we need ? You can use PSP tool to catch AVI file and save bitmaps file.This is sort of a manual process we used <!-- m --><a class="postlink" href="http://www.mindworkshop.com/alchemy/gifcon.html">http://www.mindworkshop.com/alchemy/gifcon.html</a><!-- m -->To convert the AVI to individual GIF's. We then went to PAINT and created a single BMP by pasting each GIF appended to the end. We then went to workshop and added a resource for the Single BMP. Kinda "Brute force" but it worked. Once you have build the BMP the rest is easy though.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Barcode-------------------------------------------------------------------------------- How can I print Barcodes in Fivewin 1.9.5 without a spezially True Type Font. Try barlib.lib from Cayetano, attached you'll find it. ( BARLIB.LIB )-------------------------------------------------------------------------------- I purchased fivewin a few years ago and never could figure it out (it's me <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->). I just got a copy of BARLIB and want to try it in a Clipper to xBase++ program I'm working on. The barcode.prg's have #include "fivewin.ch" in them. What I want to know before I re install fivewin just to get the header file is it the version I need ? The fivewin version I purchased is 1.9.2 and if not, how do I get the one I need <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->? I guess you are using Cayetano Gomez BarLib, sorry, this only works with FiveWin, because it uses access to the Windows drawing api via the FiveWin Interface. If you want to use the BarLib with Xbase++, you may need FiveWin++ to make it work (personally I think Xbase++ is a good product for DOS 32 bits programming or for CGI programming, Windowing with it is a real nightmare !!!)-------------------------------------------------------------------------------- Did anyone know how to use BARLIB.LIB from Cayetano to print barcode See sample anexed. ( SAMPLE1.PRG )thanks!!!, but I do not have barcode.ch file, will you mind send me one.-------------------------------------------------------------------------------- Sono un nuovo utilizzatore di Fivewin, volevo sapere se esiste qualche libreria per i Barcode grazie a tutti (Translation?[Boris]: I am the new FW user, I need asistance using Barcode LIB, thanks to all) I'm italian too, but please write in english (this is an english forum). It will be also more usefull for you because more people will understand your messages. About your answer, yes, you can use barcode; however you haven't to search for library functions; barcode are easily accessed trough barcode fonts. i attached here what I have about barcode fonts( DEMO128.TTF, DEMO13.TTF, DEMO39.TTF ) You should look at Rene Pilon GX reports . he has a very powerful library for barcodes.connect to <!-- w --><a class="postlink" href="http://www.gxreports.com">www.gxreports.com</a><!-- w -->The barcode lib is from Cayetano and it's free. 3. Thanks for the info Ricardo, I did not know this.Try this ( BARLIB1.ZIP ) ------------------------------------------------------------------------------------------------------------------------------------------------- Adolfo Lagos publish in the spanish forum this address where you can find free CodeBar fonts:<!-- m --><a class="postlink" href="http://205.177.231.33/sofontes/us/indexframe_us.htm">http://205.177.231.33/sofontes/us/indexframe_us.htm</a><!-- m -->-------------------------------------------------------------------------------- Does anyone know of a way to print barcodes via FiveWin? In FiveWin\Samples is directory "Labels" . Here are many goods samples how to print labels with barcodes . If you want to print barcodeswith TPrinter or another printing method , then simply use one of needful barcode font . I'm using "3 of 9" ( Code 39 ) which is freeware . There are two ways 1 use TTF FOnts with bars2 use a library like BARLIB (its my choice)I send you by private freeware TTF's and this library. Hello Bingen ! If this "BarLib" is freeware , can you send me this ? I want to try this . Ok I send you by email.Bingen Ugaldebere <!-- e --><a href="mailto:bingen@muninser.com">bingen@muninser.com</a><!-- e -->--------------------------------------------------------------------------------
Boris Pekic - NG's archive
BITMAPS-------------------------------------------------------------------------------- It is easy to use a bitmap in a listbox.Local Lbx2Bmp := {ReadBitMap(0,"Leeg.Bmp"),;ReadBitMap(0,"Gevuld.Bmp") }This can be used in a listbox.At this way the program directory contains a lot of files. If possible I want to store all the files in a DLL or if possible in the exe.Is this possible ? Yes! You can add the bitmaps to a RES file (using Resource Workshop) and then add the RES file to the EXE (using Blinker's RC command).How can I access that bitmap. Is there another function such like ReadBitmap()You bet there's such a function: LoadBitmap(Getresources(),"bitmapname")Yes, it's LoadBitmap().-------------------------------------------------------------------------------- Is possible to convert BMP to JPG in FiveWin? Try NCONVERT.EXE. It's a command line driven utility that converts a huge number of graphic formats.-------------------------------------------------------------------------------- perhaps someone of you could help me:I've just upgraded FW from v2.1 to v2.3 and as I recompile my progs, where I've coded MSGITEMS to show bitmaps in themsgbar, I have those results:*******************************************************************1. MSGITEM with BITMAP from FILE:DEFINE MSGITEM oMit OF oWin:oMsgBar SIZE 25 ACTION MsgLogo("CSW", 5) BITMAPS".\bmps\Zot.bmp" TOOLTIP "About CSW..."This doesn't work at all! The program crashes (Error.log attached)*******************************************************************2. MSGITEM with BITMAP from RESOURCES:DEFINE MSGITEM oMit OF oWin:oMsgBar SIZE 25 ACTION MsgLogo("CSW", 5) BITMAPS"CSW" TOOLTIP "About CSW..."This makes the exe work but the bitmaps are not properly shown in the bar*******************************************************************3. MSGITEM without BITMAP:DEFINE MSGITEM oMit OF oWin:oMsgBar SIZE 31 ACTION MsgLogo("CSW", 5) PROMPT"CsW" TOOLTIP "About CSW..."This works with no problem...<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->*******************************************************************Is this a bug in FW2.3 or there is something that escapes to me? Please help! Please try with the file attached. TMSGITEM.ZIPIf you continue having errors please send us a little sample and a JPG showing the error. This is a 2.2 error that curiously nobody noticed it before.Many thanks for your feedback,Thank you Ignacio, now it works!I've patched the five.lib with the command TLIB FIVE +-TMSGITEM and it's allright.But to patch fiveh.lib what do I've to use and what's the right commandline? TLib FiveH.lib -+TMsgItem /0 /P32,,-------------------------------------------------------------------------------- I´m trying to put a bitmap on a MDI windows. To do that I was testing with the samples on the \fw22\samples directory, specifically with the TESTBMP3.PRG. The program run fine until I put the MDI sentence on the define windows comannd: DEFINE WINDOW oWnd FROM 0,0 TO 10,20 TITLE "Test Class TBitmap" // RUN DEFINE WINDOW oWnd FROM 0,0 TO 10,20 TITLE "Test Class TBitmap" MDI // NOT RUN How I can put the bitmap on the desk of my application like the example attached?. Non MDI Window:DEFINE WINDOW oWnd FROM 0,0 TO 10,20 TITLE "Test Class TBitmap"@ 0,0 BITMAP oBmp FILENAME "..\bitmaps\Tutanka1.bmp" OF oWnd ;SIZE 0,0 PIXEL SCROLLMDI Window:DEFINE WINDOW oWnd FROM 0,0 TO 10,20 TITLE "Test Class TBitmap" MDI@ 0,0 BITMAP oBmp FILENAME "..\bitmaps\Tutanka1.bmp" OF oWnd:oWndClient ;SIZE 0,0 PIXEL SCROLLNow is running but not fine. Let me explain @ 0,0 BITMAP oBmp FILENAME ..... // OK@ 40,40 BITMAP oBmp FILENAME ..... // NOT OK The second example does not put the image on the position desired, continues with 0,0 (with clause pixel or without). Also if I put the clause color on the command define windows like this: DEFINE WINDOW oWin TITLE "Pruebas con BMP's" ; COLORS CLR_BLACK, RGB(145,15,15) MDI the colors are ignored.-------------------------------------------------------------------------------- I am changing an application. The goal is to have a minimum number of files in the program directory.One of the points is to include bitmaps in the dll of exe.I have tried several things but it does not workIn the main prg I useDEFINE BUTTON FILENAME LoadBitmap(GetResources(),"BROWSE") OF oBar;MESSAGE "Lijst met rubrieken" ;Tooltip "Lijst met rubrieken" ;ACTION PropTab()There is a bitmap with the name Browse in the dll. This does not work. There was no bitmap shown.Then I tried to export the dll to a Rc and to a Res fileI added the line Rc -K HwDev to the batch file after the rMakeThis results in an errorHWDEV.RC(13) : error RW2002: File not found: DISCARDABLEDoes anybody have an idea. What am I doing wrong. Hello, Willy!Try followingDEFINE BUTTON RESNAME "BROWSE" OF oBar;MESSAGE "Lijst met rubrieken" ;Tooltip "Lijst met rubrieken" ;ACTION PropTab()Resourse is your EXE file.That does not solve the RC errorHWDEV.RC(13) : error RW2002: File not found: DISCARDABLE but I'vr tried to incorporate the bitmap in the dll and called it with DEFINE BUTTON RESNAME "BROWSE" OF oBar; that works already fineI have the same problem in listboxes.Local aBmp := {LoadBitMap(Getresources(),"Leeg"),;LoadBitMap(Getresources(),"GROEN"),;LoadBitMap(Getresources(),"Oranje"),;LoadBitMap(Getresources(),"Blauw"),;LoadBitMap(Getresources(),"Purper"),;LoadBitMap(Getresources(),"Rood") }Redefine ListBox oLBX1;Fields ;aBmp[Max(Q->Kleur,1)], Q->Txt2;Headers "", "Dossiernaam";Select Q->QId For aQ[1,1];On Left DblClick (nRekNr := Q->(Recno()),EditJobFrm(oLbx1,Q->SetId) , QVisie(oCmb001:nAt,oLbx1,ocVan,ocTot,nRekNr) );On Right Click EditJobFrm(oLbx1,Q->SetId);Sizes 14, 500;Id 101 Of oDlg This does not work Someone an idea.-------------------------------------------------------------------------------- Does anyone know how to put a BMP into a dialog as a background ? There have been several discussions about this in recent threads. Getting the bitmap on the dialog is not hard, but then you have the problem of making all the SAYs and checkbox and radio text display with transparent backgrounds. If you are willing to get into all this then review the recent threads and you will find your answers. Unfortunately they seem not to be working. Or, at least, I was unable to obtain transparent checkbox and radio so far, even with thatsuggestions... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> I have asked Patrick Mast how he did his dialogs (shown in another thread). Perhaps he has a simpler solution.Don't forget we also need a transparent group too. Let me be more clear. I don't need (until now) a transparent bitmap. I need a bitmap as a background in a dialog, where I can put my SAY's and GET's over it. If you have any suggestions, I'm waiting. I understand what you want, but you cannot put any text including SAYs or other labels like are used with groups, checkboxes, or radios because the text is shown in a box and the box is the default dialog color. You need text with a transparent backgound so the bitmap will show through. FW itself cannot do this--you need third-party solutions.Here is how to put a bitmap on a dialog:ACTIVATE DIALOG oDlg ON INIT PutBmp(oDlg)function PutBmp(oDlg)@ 0,0 BITMAP oBmp FILE "AGUA2.BMP" of oDlg ;SIZE oDlg:nWidth(), oDlg:nHeight() ADJUSTreturn nil I did it more simple.. I did NOT use transparant says.Just be sure that the Say covers only ONE color on the bitmap. Than make the background of the Say in the same color as the area of the bitmap where the Say is on.More samples:<!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-Verkoop4.gif">http://www.winfakt.com/WinFakt-Design-71-Verkoop4.gif</a><!-- m --><!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-Artikel.gif">http://www.winfakt.com/WinFakt-Design-71-Artikel.gif</a><!-- m --><!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-Leverancier.gif">http://www.winfakt.com/WinFakt-Design-7 ... ancier.gif</a><!-- m --><!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-Prospect.gif">http://www.winfakt.com/WinFakt-Design-71-Prospect.gif</a><!-- m --><!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-Tels.gif">http://www.winfakt.com/WinFakt-Design-71-Tels.gif</a><!-- m --><!-- m --><a class="postlink" href="http://www.winfakt.com/WinFakt-Design-71-klant5.gif">http://www.winfakt.com/WinFakt-Design-71-klant5.gif</a><!-- m -->I'm working on an English version of WinFakt! So you guys can try it yourself! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->That's exactly what I need. Do you have any code example to show this? redefine say oSay...oSay:setColor(COLOR_WINDOWTEXT,rgb(nRed,nGreen,nBlue))Where nRed,nGreen,nBlue are the colors of the area.Of course, this will only work on dialogs with solid areas of color.-------------------------------------------------------------------------------- I am having trouble in my program where I am using LoadBitmap( GetResources(), "BMP_SYS_BRWSPOINTER" )My problem is LoadBitmap is returning a NUMERIC value instead of a Handle ValueI can not find the problem that is causing this, has anyone had a simular problem In Clipper, handles *are* numeric values. It's fine that LoadBitmap() returns a numeric value that is the handle to the loaded bitmap. What isexactly your problem?OkMy problem is that any BitMaps that I use in a Browse to not show up in the browseWhen I excute this code in my applicationTest := LoadBitmap( GetResources(), "BMP_SYS_BRWSPOINTER" )MsgAlert(Test)/* I get 9976 */MsgAlert(ValType(Test))/* I get N */And the browse does not display the BitmapsWhen I excute the same piece of code in one of the Fivewin examples I get this errorError description: Error BASE/1132 Bound error: array accessCalled from LOCKERRHAN(0)Called from (b)INITHANDL$(0)Called from TCBROWSE:DRAWLINE(0)Called from TCBROWSE:PAINT(0)Called from TCBROWSE:DISPLAY(0)Called from TCBROWSE:HANDLEEVEN(0)Called from MSGALERT(0)But the Bitmaps do appear in the browse (after I comment out this code) I expect that LoadBitmap should return a Poimter in memory to the BitMap and not just a straight numeric valve.This thing driving me crazy. Brad,the handle ( a numeric value ) is actually an address where your resource (bitmap) is loaded. in your process space. I had similar problem.Try to put the BMP "BMP_SYS_BRWSPOINTER" as file "B_SYS_BR.BMP" in your disk out of resources and...hTest := ReadBitmap( 0, "B_SYS_BR.BMP" )......ADD COLUMN TO oBrw NOBAR;BITMAP DATA hTest...... > When I excute this code in my application> Test := LoadBitmap( GetResources(), "BMP_SYS_BRWSPOINTER" )> MsgAlert(Test)> /* I get 9976 */> MsgAlert(ValType(Test))> /* I get N */This is correct. You are supposed to get a numeric value.I am concerned at the length of your resource name. Try shortening it to 8 characters.> And the browse does not display the Bitmaps.Can we see your code. How are you specifying the browse?> When I excute the same piece of code in one of the Fivewin examples I get> this error> Error description: Error BASE/1132 Bound error: array access> Called from LOCKERRHAN(0)> Called from (b)INITHANDL$(0)> Called from TCBROWSE:DRAWLINE(0)> Called from TCBROWSE:PAINT(0)> Called from TCBROWSE:DISPLAY(0)> Called from TCBROWSE:HANDLEEVEN(0)> Called from MSGALERT(0)> But the Bitmaps do appear in the browse (after I comment out this code)After you comment out what code?> I expect that LoadBitmap should return a Poimter in memory to the BitMap and> not just a straight numeric valve.No, it is supposed to return a number. The handle seems to be a valid one. Maybe the problem is elsewhere.> But the Bitmaps do appear in the browse (after I comment out this code)Which code?> I expect that LoadBitmap should return a Poimter in memory to the BitMap and> not just a straight numeric valve.It's the same thing. As I said, an handle is nothing more than a numeric value.Found it !!!!When I define my window browseDEFINE WINDOW ::oWindow MDICHILD FROM 0,0 TO oRect:nBottom-30 , oRect:nRight-10 ;TITLE cTitle ;STYLE nOR( WS_THICKFRAME, WS_CAPTION, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, WS_SYSMENU) ;PIXELThe STYLE parameter did it !! ???This is from some old code left in my objectsI removed it and my problem went away.Thanks for all your help.-------------------------------------------------------------------------------- got this problem with win98. the bitmap which i define in a menu item seems disappearing slowly each time i move the mouseto the item.Any workaround? I'm using Fw2.1c, 5.3b and Blinker 6.0 Strange things with bitmaps start happening when your resource memory is low. Does the problem go away after a fresh reboot?I am using FW2.1c Clipper 5.2e and Blinker 5.1 and I have never seen anything like that.> low. Does the problem go away after a fresh reboot?NO. > I am using FW2.1c Clipper 5.2e and Blinker 5.1 and I have never seen> anything like that.I tested it in 5 computers and all the same results. Fading Bitmaps. Is it about stack size? I don't know. Why don't you try changing the stack size to see if it solves the problem.You could also create a small test program just with a sample menu. Then see if it still happens. If so, then I expect it is not stack but code, eitheryours or FW or Clipper. Perhaps you could try it with Clipper 5.2e. I tried it on 5.2e and it all the same, fading bitmaps on menu (win98). I also tried TFolder bitmap (by J.Lalin) and it has the same problem (fading bitmap). What could be wrong? How about making a small test program that shows the problem and posting it here. I will try a test compile with my software and see if I get the same thing.I solved the problem. And is very strange!I compiled the program under win98 and fading bitmap disappeared!But when i compile in Wint 4.0 SP6 and run in win98, then fading bitmap occurs. It's crazy and i don't know the cause of it.I'll trim down the menu and post a sample. Tomorrow. Have tried to F(ile)C(ompare) the two EXEs?No not yet. I haven't had the time to do so, but it's not so important. I would be looking for different versions of FW, Clipper, Blinker and any third-party libs you may be using.Basics,FW2.1c, 5.3b, Blinker 6.0, Delphi button class, TFolder Bitmap class, TSBrowse 6, btnget class, ctrl3d fw2.1c library (doesnot require ctr3d.dll), ADS 5.5 client.I don't know which one is the culprit.-------------------------------------------------------------------------------- Does anybody know how to use oPrn:SayBitmap() with a bitmap stored in a Workshop DLL? Thanks for any help! Just put the name of your bitmap resource as the third parameter.-------------------------------------------------------------------------------- This is a newbie question.I am trying to draw a bitmap file on the main screen of a application with no success I have tried different samples found on the FW23 Sample directory but with no success. I am utilizing Clipper 5.3b Blinker 4.1 and FW2.3 with its latest patch. I am developing this application on a machine with XP.Here is the code;Static oWnd, oBmp, bSupervisor, tUserNameFunction Main()Local oMenu, oIcoPublic dbDirectory, dbInDirectoryIf file("System.Dbf")Use SystemStore System->DATA_DIR to dbDirectoryStore System->DATA_IN to dbInDirectoryUseElseStore "" to dbDirectoryStore "" to dbInDirectoryEndifSet Century OnSet _3dlook OnSet Procedure to CommProc.PrgtUserName := WNetGetUser()DEFINE ICON oIco FILENAME "ICON\Money.ico"oMenu := Buildmenu()DEFINE WINDOW oWnd MENU oMenu MDI FROM 5,19 to 40, 120 TITLE "Commission Pay Program" +;" - User logged in the system : " + tUserName ICON oIco//@ 8, 22 IMAGe oBmp File "Icon\ams.bmp" of oWnd//@ 5, 5 BITMAP oBmp FILENAME "Icon\ams.bmp" ADJUST SIZE 280, 200 OF oWnd;//ON CLICK ( oBmp:lStretch := ! oBmp:lStretch, oBmp:Refresh(.t. ) )oBmp := DrawBitmap( oWnd, "Icon\ams.bmp",5,5)Set message of oWnd to "Sales Commission Program Version 1.0" Keyboard Dateactivate window oWnd valid( MsgYesNo( "Do you want to exit?") )//ON RESIZE oBmp:Center()Return(Nil)I have some lines in comment where I have tried different options. Bitmap on main window:DEFINE BITMAP ::oBMP filename "logo.bmp" of ::oWndDEFINE WINDOW ::oWndACTIVATE WINDOW ::oWnd ;on paint drawBitmap( ::oWnd:hdc, ::oBMP:hBMPPal, nRow, nCol )::oBMP:end()I tried the change but still the bitmap will not appear, I also change the bitmap just in case any additional help will be appreciated. Here how the code looks now; I didn't use the leading double colon because it gave me an error.Function Main()Local oMenu, oIco, oBmpPublic dbDirectory, dbInDirectorySET CENTURY ONSET _3dlook ONSet PROCEDURE TO CommProc.PrgtUserName := WNetGetUser()DEFINE ICON oIco FILENAME "ICON\Money.ico"DEFINE BITMAP oBmp FILENAME "logo.bmp" of oWndoMenu := BuildMenu()DEFINE WINDOW oWnd MENU oMenu MDI FROM 5,19 to 40, 120 TITLE "Commission Pay Program" +;" - User logged in the system : " + tUserName ICON oIcoSET MESSAGE OF oWnd TO "Sales Commission Program Version 1.0" Keyboard DateACTIVATE WINDOW oWnd ;ON PAINT DrawBitmap( oWnd:hdc, oBMP:hBMPPal, 10, 22 );VALID( MsgYesNo( "Do you want to exit?") )oBmp:end()Return (Nil) try the following, works on all windows flavours and harbour also.ACTIVATE WINDOW OWND MAXIMIZED ;ON INIT DRAWIMAGE(OBMP,OWND,yourfilename)FUNCTION DRAWIMAGE(OBMP,DWND,DFILE)@ 0,0 BITMAP OBMP FILE DFILE OF DWND ADJUST NOBORDERRETURN NIL I didn't notice that you are using a MDI window. Here is how to do it on a MDI window:// Purpose: Draw a bitmap on a MDI Window.#include "fivewin.ch"function main()local oWnd, oBmplocal nRow:=0, nCol:=0define window oWnd MDIdefine bitmap oBmp file "backg.bmp" of oWndactivate window oWnd;on paint drawbitmap( oWnd:oWndClient:hdc, oBmp:hBMPPal, nRow, nCol)oBmp:end()return nil------------------------Here is another way (untested by me):MDI Window:DEFINE WINDOW oWnd FROM 0,0 TO 10,20 ;TITLE "Test Class TBitmap" MDI@ 0,0 BITMAP oBmp FILENAME "..\bitmaps\Tutanka1.bmp" ;OF oWnd:oWndClient SIZE 0,0 PIXEL SCROLLThanks James this worked out.-------------------------------------------------------------------------------- I want (depending on content current record) to place a bitmap in a dialog. I thought it would be "redefine bitmap resname 101 id 1091 of fldetdlg when (fl:del=.T.) update". But this way it does not function. The bitmap is always visible.Suggestion on how to do it, are welcome. redefine bitmap resname 101 id 1091 of fldetdlg when fl:del updateThen when you change fl:del you'll need to issue a ftdetdlg:AEvalWhen().In the mean time I got an even simpler solution, oBitmap:Show() & oBitmap:hide().But thanks anyway.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Browsing - generaly-------------------------------------------------------------------------------- I have build some array and I wanted to display inside a window browse using TCColumn to add the individual column.ADD COLUMN TO oBrow ARRAY ELEM 1ADD COLUMN TO oBrow ARRAY ELEM 2ADD COLUMN TO oBrow ARRAY ELEM 3ADD COLUMN TO oBrow ARRAY ELEM 4ADD COLUMN TO oBrow ARRAY ELEM 5This work fine. But what happen is... my array consist to 15 element so I have try with a shortcut by doing thisFOR n := 1 TO 15ADD COLUMN TO oBrow ARRAY ELEM nNEXT nThis do not work!After some checking, I found that the header file TcBrowse.ch for TCColumn, it is using a code block to pass in the data block. Which mean that the <n> is physically passed in without assigning any value. When it reaches the browse, only the last element is browse through the cell. I have also try this.FOR n := 1 TO 15bBlock := &( "{ | | oBrw:aArray[ oBrw:nAt,"+Str(n)+" ] }" )oBrw:AddColumn( TCColumn():New( "Header", bBlock ))NEXT nThis doesn't work either! It gives me a syntax error at block definition . I have also checked the bBlock code. It cannot eval a class into a code block. Can anyone help! Because if I hard code it, when there is any changes in the number of element and I have maintain the code again. Try :FOR n := 1 TO 15ADD COLUMN TO oBrow ARRAY ELEM &nNEXT nIf that doesn't work, look at your PPO file (compile with /p) and use the method call instead of the command and it should work no probs. First, your method would not work with number. only work with string.Secondly, I do not think you understand my problem. When you issue the command below, all the code block will look like this:FOR nSize := 1 TO Len( aSize )oBrow:AddColumn( TCColumn():New( IF(.F., OemToAnsi( cTitle ), cTitle ) ;{|x| IF(Pcount()>0, oBrow:aArray[oBrow:nAt, nSize] :=x, oBrow:aArray[oBrow:nAt, nSize])} ))NEXT nSizeThe problem is oBrow:aArray[ oBrow:nAt, nSize ] is in a code block. It is going to stay that way until it is eval. By that time nSize is the last number, so when you eval all the code block, the data will be showing thelast element only. nSize is the problem! Only if we can physically change nSize into the content before putting it into the code block, only can this problem be resolved. Otherwise there are no other method. Even if I change the nSize into string and use the <&>, the problem will still exist because the code block still store &nSize which refer to the same variable after the FOR..NEXT loop. Try this one:FOR nSize := 1 TO Len( aSize )oBrow:AddColumn( TCColumn():New( IF(.F., ;OemToAnsi( cTitle ), cTitle ) {|x| IF(Pcount()>0, oBrow:aArray[oBrow:nAt, &(nSize) ] :=x, ;oBrow:aArray[oBrow:nAt, &(nSize) ])} ))NEXT nSize You need to use the detached locals technique, because nSize is called from ithin a code block, the value of nSize at run time will be Len(aSize) + 1 for all columns, certanly not what you wanted to. So you need a function to create that code block inside your For..Next loop:FOR nSize := 1 TO Len( aSize )oBrow:AddColumn( TCColumn():New( IF(.F., OemToAnsi( cTitle ), cTitle ) ;YourCol( oBrow, nSize ) )NEXT nSizeSTATIC Function YourCol( oBrow, nSize )RETURN {|x| If(Pcount()>0, oBrow:aArray[oBrow:nAt, nSize] :=x, oBrow:aArray[oBrow:nAt, nSize])} ))This way nSize will retain its value (1, 2, 3, etc) for each column from your array. This is the only way to solve this problem in a For..Next loop to avoid coding each column separately. Try this:FOR n := 1 TO 15MyAddColumn(oBrow,n)NEXT nPROCEDURE MyAddColumn(oBrow,n)ADD COLUMN TO oBrow ARRAY ELEM nRETURNI've not tried it... but it should work. I have been using this code, partly from old clipper, since four years and works fine: oLbx is a browse object, with redefine from resources or similar titulos: Array with the column titles anchos: Array with column sizesaDatHist: Multidimensional array with the data for the columns. Each subarray has the a lenght of titulos or anchosoLbx:SetArray( aDatHist )FOR i=1 TO LEN(Titulos)oLbx:AddColumn( TCColumn():New( Titulos[i], ABrowseBlock(oLbx:aArray,i,oLbx);,,,, "LEFT", anchos[i], .F., .T.,,,, .F. ) )NEXT iThis is the function you need:FUNCTION ABrowseBlock(a, x, oLbUsr)RETURN ( {|p| IF(PCOUNT() == 0, a[oLbUsr:nAt, x], a[oLbUsr:nAt, x] := p)} )It really works You have to use a "detached local." This means that n must be in its own codeblock then it will stay in scope. I don't have an example handy--check in your Clipper documentation for a description of "detached local." Thank you very much. I have got it working already. The idea is the same by moving the code block outside the For..Next loop.-------------------------------------------------------------------------------- I use wbrowse and REDEFINE LISTBOX ... from a DBF. Now I want to put bitmap "Tick" or "Blank" in first column instead of "Y" or "N" . How do I do that ? I use v1.95 Very easy:a) load your two bitmaps in a handler variable:hBmp1 := LoadBitmap(GetResources(),"name_of_ the_bitmap")hBmp2 := LoadBitmap(GetResources(),"name_of_the_other_bitmap")b) and in the fields clause use the handler number instead of the field name:REDEFINE LISTBOX.... FIELDS dbf->field, dbf->field2, IIF(deleted(),hBmp1,hBmp2),dbf->field3......-------------------------------------------------------------------------------- Is it possible to use a Combobox as a field of a TWbrowse if so how ? If you mean when you edit the cells of the browse with lEditCol() - yes. Just have a look in WBrowse.prg in FW\SOURCE\CLASSES. In metod lEditCol. Check the wdbu source code when you edit a logical field wdbu display a combobox to choose .T. or .F.-------------------------------------------------------------------------------- Anyone know how to overcome error "1513/Operation too complex: " when building a bLine for wbrowse? The line I am tring to compile is 1007 characters long and have 35 fields. bLine:=&("{|| {"+ cLine + "} }") Not perfect, but you could do it like this as a last resort :bLine:=&("{|| {MyBrwLine()} }")FUNCTION MyBrwLine()RETURN {Field1, Field2, Field3.... Field35}-------------------------------------------------------------------------------- Please look at the .JPG: ( WIN3.JPG ) The Browse is outside of control's edge. WHY? What's the problem in my code? The Control is a LISTBOX with the follow mark check:-Notify-Integral height-Multi column-Scroll bar alwaysThe Objet in y code is a TWBrowse. What happen?The LISTBOX REDEFINE is:* BrowseREDEFINE LISTBOX OLBX FIELDS OEMTOANSI(DATO1->LETRA),OEMTOANSI(DATO1->NOMBRE),;OEMTOANSI(DATO1->TELF),OEMTOANSI(MEMOLINE(DATO1->DATO,80,1)) ;FIELDSIZES 50,280,280,280 ;HEADERS 'Letra','Nombres','Telefonos','Datos Adicionales' ON DBLCLICK DATTELF(OLBX,.F.) ID 413 OF ODLG I have the same problem on some browses. Im using Visual Studio to create 16bit dlls...what are you using? Ive noticed that you can fool the listbox sometimes by setting the data widths...it is a trial and error thing. I would certainly be interested in a solution to this.I use Borland Workshop. Yes, I try to change the data width settings. I'll try with several values. I will write here, about this, ok? How do you create your browse control in Borland RW. To me it looks like you are using another style of control and may be this is the problem. I create a browse by clicking on the little key on the bottom of the tools then typing TWBrowse, then OK, then for the style of the new control in the properties dialog :0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL |WS_TABSTOPOnly the first three parameters are coming by default. The rest is up to you. I have never had your problem. Are you shure, the field sizes are OK? They seams too big for me. Try to reduce. You must select customer control when add a new control( not ListBox ) to dialog and Class name is TWBrowse. Seems to me that your mixing two different concepts. Actually it isn't your fault. The problems is the way the TWBrowse class is mapped into a command using the keyword LISTBOX. This tends to be confused with the Windows API ListBox - two different things. Make sure you're defining your browse as a Custom Control (ie the icon with the Key in the toolbar) and that you define it as "TWBrowse" - not as a standard ListBox. I'm sure that's your problem.-------------------------------------------------------------------------------- Still Now, I am using the clipper. So, I will try and learn for Fivewin. But, I have a problem Dos to Windows programing. Becasue, always I used the DBedit function of Clipper. So, I have a lot of problem to modified the our program. If you have a DBedit function of windows, Pls. inform me! I will purchse the function. I can't see where is the problem. Fivewin has 2-3 ways to use a file browse on window....tcbrowse,twbrowse,listboxes.... and too many ways to edit the data.....you can edit them in the browse or you can call another window/dialog to do the modification... i find the convertions from dos to windows veeery veeery easy. :} Fivewin has everything u want about browse/edit.... dbEdit is obsolete even in plain old Clipper. Maybe the easiest way before digging into TWBrowse or TCBrowse classes, give a look at FiveWin's Browse() function. You won't be able to do fancy things but since you have the source code to it, you can learn from it. -------------------------------------------------------------------------------- I have a generic function to all my browses wich work with lCellStyle (very nice!!). I only have two kinds of columns: those only to show and those to show and edit. In the method bkeydown I call to my function tbrKey to trap the keys and do things with them. If you type inside a column that is only to show a dialog appear to search in that column. If you type inside a column that lets you edit, then in that cell start a get. The problem is that the character that start this get is missing. How I can start with this character and include it on the get? Keyboard() is no good solution because it generated GPFs. Try something likePOSTMESSAGE( oGet:hWnd, WM_CHAR, nKey )-------------------------------------------------------------------------------- I want to blink some items on a browse. any idea?... i can imagine a way with bitmaps and a timer to change them but i guess is a very stupid way.... I have a window with a browse i browse a database file with my network users. online or not. now i have a form and i send messages from local user to another my system check with timer if the user has a message(s) waiting .... if yes i want to blink an item on the browse beside the userid column, so the user can see that he has a message waiting. now... the column can be a set of bitmaps who can change quickly so i have a blink effect, or a text blinking item.... Did something similar for a Message bar item, you have to use a timer and repaint the cells once black once white etc. This give the appearance of blinking.-------------------------------------------------------------------------------- I have a big problem for me. How can i create a action if i click on the headerfield of a browse like changing the index information of the field etc Use the ACTION clause of the LISTBOX FIELDS command. Do this :oYour_Brw:aActions := {{|| Action_Col_1()}, {||Action_Col_2()},......And_So_On.....} -------------------------------------------------------------------------------- I have a browse in a windows with buttons: The F9 button do this sentence:order(case(indexord(),1,1,3,3,2,2,4,4,5,5,6,6,7,7,1))then the browse refresh and change the order but the cell lost the focus (look at the grey color): How I can get the focus on the cell again?. Did you tried to ( order(case(indexord(),1,1,3,3,2,2,4,4,5,5,6,6,7,7,1)) , yourBrw:Setfocus() )?-------------------------------------------------------------------------------- a) i have a tcbrowse i am on 5th item on the browse (somewhere on the midle of my browse on the screen).now i refresh the browse with .t. my browse goes to the current record but this record goes to the top of my browse.... how can i refresh the browse with out lost the browse position? (if i delete the records i must go to the next or prev record..)b) how can i disable the horizontal scroll bar on a browse that i create from source code? ( i try everything i can imagine... ) Play around with setting ::oBrowse:nRowPos manually-------------------------------------------------------------------------------- When doing a right-click on an element in the table, the cursorline isn't set to the line I clicked on. How can I do this ? Do this :oYour_Browse:bRClicked : = { |nRow, nCol, nFlags|oYour_Brwse:LButtonDown(nRow, nCol, nFlags) }which will change the highlited row to the new position when you click on the browse with the right mouse button .-------------------------------------------------------------------------------- As I make to magnify the height of the lines in one listbox (tbrowser). Very obliged for the attention. You can't increase the height of the line of a list box and keep the size of the font without changes in the FW C source code. If you increase the size of the font, the height of the lines of the list box will increase automatically.-------------------------------------------------------------------------------- Is there a way to lock a column from being resized in the wbrowse class? Just set ::lMChange to FALSE (this is also valid for TCBrowse)Not for the whole browse just for a single column? I think that can only be achieved with TCBrowse class, not with TWBrowse class since it isn't column based. To make it work under TCBrowse, when a column is frozen, it won't be allowed to be resized. Since you can only freeze columns from left to right, only contiguous columns could be flagged so as to avoid resizing. Check out TCBrowse:MouseMove().-------------------------------------------------------------------------------- Is there any way to speed up the Vscroll bar on a wbrowse when the DBF size is big (30,000 records) ? It is too slow when dragging the scollbar cursor up and down. Yes! You have to modify TWBrowse class - Method VScroll. Substitute::Skip( nLParam - ::oVScroll:GetPos() )with( ::cAlias ) -> ( CmxKeyGoTo( nLParam ) )or the xxxKeyGoto() function provided by your RDD. TWBROWSE is a general CLASS to work with DBF(s) , ARRAYS, Objects and is not posible to put a special code for manage CDX o NTX RDD(s) I thing that is better solution to use a codeblock with the best operation to jump over desired records like::bJump = {|cAlias,nRecno|(cAlias ) -> ( CmxKeyGoTo( nRecno ) )}and in the VSCROLL METHODEVAL(::bJump,::cAlias,nLParam) Since Windows treats the 'thumbpos' of the veritcal scroll as an integer, you will always have problems once your database exceeds 32,367 records. You should consideroBrw:blogiclen:= { || min( 32000,lastrec() ) }when defining your browse, or consider changing the scrllbar class to accomodate large data files.-------------------------------------------------------------------------------- How to size a browse to just fit in a dialog without using a resource in a DLL. I already try GetCoors(), GetClientRect(), GetWndRect() and oWnd:CoorsUpdate()? oWnd:nTop? oWnd:nBottom? oWnd:nLeft? oWnd:nRightfrom EMG, but the browse does not fit. It oversize the dialog. Can you be more specific about your problem. It seams to me now, you have the same problem I as have. My question is: do you create browse from RESOURCE (.RC or .DLL) or you put it on the dialog with @ y,x commands? It is important. If I don't use resources, I can fit browse without problem, but if I use resources, then there are problems, browse doesn't fit always in the dialog! The difference arise when I change the system settings related to the font sizes! (Setup-display-settings-font size). Try:FUNC zAdjDialog( oDlg, oWndMain )* Function..: Ajust and position Dialog in size of window parent* Parameters: oDlg - your dialog* oWinMain - window parentLOCAL nMsgHeight:= 0IF oWndMain:oMsgbar # NILnMsgHeight:= oWndMain:oMsgBar:Height()ENDIoDlg:SetSize( ;oWndMain:GetCliRect():nRight - ABS( oWndMain:GetCliRect():nLeft ), ;oWndMain:GetCliRect():nBottom - ABS( oWndMain:GetCliRect():nTop ) +nMsgHeight ;)oDlg:Move( oWndMain:nBottom - oWndMain:GetCliRect():nBottom - nMsgHeight ,0 )RETU NILFUNC zAdjControl( oCtrl, oWinDlg, nTop )* Function..: Adjust control in window/dialog* Parameters: oCtrl - your control* oWinDlg - window/dialog parent* nTop - Top of controlLOCAL nMsgHeight:= 0IF EMPTY( nTop )IF EMPTY( nTop:= ABS( oCtrl:nTop ) )nTop:= 0ENDIENDIIF oWinDlg:oMsgbar # NILnMsgHeight:= oWinDlg:oMsgBar:Height()ENDI/*oCtrl:SetSize( ;oWinDlg:GetCliRect():nRight - ABS( oWinDlg:GetCliRect():nLeft ), ;oWinDlg:GetCliRect():nBottom - nTop - nMsgHeight ;)*/oCtrl:SetSize( ;oWinDlg:GetCliRect():nRight - ABS( oCtrl:nLeft ), ;oWinDlg:GetCliRect():nBottom - nTop - nMsgHeight ;)RETU NIL Maybe you should consider DIALOG metrics (borders, title-bar, etc.) and subtract them from total size.-------------------------------------------------------------------------------- Can anyone provide a sample piece of code for finding a record in a browse.At the moment I have a browse displaying customers in account order , when the user hits the find button , the index is changed and a get is placed below the browse for the user to type in the customers name , as each letter is typed the browse moves to the required record - but if the user makes a mistake and uses backspace the whole search messes up. Anyone got a better solution.// sample of present codeREDEFINE GET oClient VAR cClient ID EditFndClnt UPDATE picture '@!' color(GETCOL)oClient:bKeyDown := {|nKey|cClient+= chr(nKey),oBrowDlg:Update(),FndClnt(oCust,cClient,oLbx),;oClient:SetPos(len(alltrim(cClient))),oClient:SetFocus()}oClient:bLostFocus := {||oClient:Hide(),cClient := " ",oClient:SetPos(0),;oClient:Refresh(),oCust:SetIndex('ACCNO'),oCust:seek(str(oCust:accno,5)),;lExit := TRUE,oBrowDlg:end()}static function FndClnt(oCust,cClient,oLbx)oCust:seek(cClient)oLbx:Refresh()return(nil) Try adapting the function attached./* DbSearch() performs an incremental search on a character field in a database indexed on that field and visualized with TWBrowse or TCBrowse. After one second since the last keystroke, the seek is restarted.Example:REDEFINE LISTBOX oBrw FIELDS .........oBrw:bKeyChar := { | nKey | IF( DbSearch(nKey,oBrw), oBrw:Refresh(),) }Note: You must define two public or static vars as follows:PUBLIC cArgume := "", nSeconds := SECONDS() */FUNCTION DbSearch(nKey,oBrw)LOCAL cKey := UPPER( chr(nKey) ),;nRecno := RECNO(),;nLapso := SECONDS() - nSeconds,;cArgAntcArgume := IF(nLapso > 1 .OR. nLapso < 0,"",cArgume)cArgAnt := cArgumecArgume += cKeyIF !DBSEEK(cArgume)cArgume := cArgAntDBGOTO(nRecno)nSeconds := SECONDS()RETURN .F.ENDIF !(RECNO() = nRecno)oBrw:UpStable()nSeconds := SECONDS()RETURN .T.ENDnSeconds := SECONDS()RETURN .F. Have you tried my TSearch class? You can get a copy at my FiveWin page at: <!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott/program.htm">http://ourworld.compuserve.com/homepage ... rogram.htm</a><!-- m --> It is a popup search box with dynamic searching as you described, but the backspace works too. I call it from a buttonbar button on a browse. I think there is some example code in the zip file.-------------------------------------------------------------------------------- I have written a few (small but stable) Clipper 5.2e for DOS applications for various clients (I run a small Networking Company inSouth Africa). I have been approached by one of my my larger clients to write an application for them but the main criteria is that is runs under Windows 98. I have downloaded the demo version of Fivewin and would like to purchase the latest version and use this for my application. Before I do this, however, I need to know that I will be able produce the results (as I have never written any application for windows).I therefore have been testing the samples etc. and tried to write an extremely simple bit of code just to scroll through a database (see below) but I am getting strange results and I'm not sure why.In the code below the idea is to click on the '>>Next' and '<<Previous' buttons and display the two test fields. In DOS this would be a breeze but for some reason (in this example) each time I click on either '>>Next' or '<<Previous' the programs seems to keep a history of the records previously used and each time one of the buttons is pressed it seems as though my application displays each previosuly viewed record in quick succession and then stops at the correct record and displays it (it is definately scrolling through the database as I can see my HDD light flickering as I click on the aforementioned buttons). Is this a windows anomaly or do I just not understand the concept of using dialog boxes and button bars etc. Obviously the more records you view the longer it takes to print the results as it appears to start at the first results displayed and sroll through each previously displayed record before displaying the correct information. I have noticed, however, that it does not start at the first record in the database but at the first window displayed ie. if you are at the beginning of the file INVOICE.DBF and press the '<<Previous' button say 20 times and then the '>>Next' button it will quickly display the first record in the database 20 times and then display the next (and correct) record. Try this:@ 5,1 BUTTON '&<<Previous' OF ODLG SIZE 80, 23 ACTION ( DBSKIP( -1 ), ODLG:Update() )@ 5,20 BUTTON 'Next&>>' OF ODLG SIZE 80, 23 ACTION ( DBSKIP(), ODLG:Update() )@ 7,20 BUTTON 'En&d' OF ODLG SIZE 80, 23 ACTION EXIT()@ 2,1 SAY 'Invoice Number ' + STRZERO(INVOICE->IVREF) UPDATE@ 3,1 SAY 'Invoice Remark ' + INVOICE->IVDBREM UPDATE Take a look at the \samples directory. You'll find several small examples about almost everything that you can do with Fivewin. That will speed up your learning curve. I tried your code and it works perfectly fine for me. You may be interested in my "Introduction to FiveWin" article located on my web site (see below). <!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott">http://ourworld.compuserve.com/homepages/jbott</a><!-- m --> You should look into a resource editor. Borland's Workshop is very used by the FW community. It allows you to draw very nice screens including buttons, icons ... You will only have to REDEFINE the buttons, and the actions to be performed. FW is an excellent tool for clipper programmers.-------------------------------------------------------------------------------- I need a Filtered Browse better than the LISTBOX with the clause SELECT (so slow). You can use a conditional index or the Tdbf class with the setscope() method. use class tcbrowse and use methodbGoTopbGoBottombSkipnot very fast, but resolve problem. you see example ( BRWSIP.PRG )BETTER SOLUTION WOULD BE THAT ONE THAN TO CREATE A TEMPORARY INDEX .(alias())->( dbClearIndex() )INDEX ON EspNtx ;TO cNomeNtx ;FOR cCondForIF USE COMIX3 try thiscKey := "0001"PlanPazi->( cmxClrScope( 0 ) )PlanPazi->( cmxClrScope( 1 ) )*PlanPazi->( cmxSetScope( 0, cKey ) )PlanPazi->( cmxSetScope( 1, cKey ) )PlanPazi->( dbGoTop() )while PlanPazi->( ! eof() )*PlanPazi->( dbskip() )ENDIF-------------------------------------------------------------------------------- Question (Probably posted many times) In table view, my numbers are proportionally and not nicely ailing. I need to set a global font for doing it, but How ? The Ng's are not clear for me (use negative number ?) Please, post the syntax. Courier is not a proportional font. Try this.DEFINE FONT oFont NAME "Courier" SIZE -0,10 If you are referring to TWBrowse, try setting oBrw:aJustify. It's an array containing a series of logical values, one for each column. True value means right alignment (good for numbers).-------------------------------------------------------------------------------- When adding a record to a browse, the browse repositions so that the new record is the only one displayed. Does anyone have some hints on having the record added to the bottom of the existing list without scrolling all other items out of view. Try thisGoLastIn()oBrw:UpStable()oBrw:ResetBarPos()oBrw:SetFocus()oBrw:Refresh()FUNCTION GoLastInLOCAL nLastRecno:=0,cOldOrder:=( cAlias )->( OrdName() )( cAlias )->( DBSETORDER( 0 ) )( cAlias )->( DBGOBOTTOM() )nLastRecno:=( cAlias )->( RECNO() )( cAlias )->( ORDSETFOCUS( cOldOrder ) )( cAlias )->( DBGOTO( nLastRecno ) )RETURN nLastRecno I sending a BrwBottom() Function Which is your want <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Function BrwBottom( oBrw )local nSkippedlocal nLines := oBrw:nRowCount()local nlocal bChange := oBrw:bChangeoBrw:bChange := NILoBrw:goBottom()oBrw:lHitBottom = .t.oBrw:lHitTop = .f.Eval( oBrw:bGoBottom )nSkipped = oBrw:Skip( -( nLines - 1 ) )oBrw:nRowPos = 1 - nSkippedoBrw:GetDC()for n = 1 to -nSkippedoBrw:DrawLine( n )oBrw:Skip( 1 )nextoBrw:DrawSelect()oBrw:ReleaseDC()if oBrw:oVScroll != niloBrw:oVScroll:GoBottom()endifoBrw:bChange := bChangeif oBrw:bChange != nilEval( oBrw:bChange )endifReturn nil-------------------------------------------------------------------------------- Anyone have a way to browse an array on resource bitmaps. i can't seem to get it at all <ok so i'm stupid> Here is somewhat of an answer. To load the resource bitmaps:aadd(aBmp, loadBitmap( getResources(), "CUSTOMER"))Then use a standard listbox with an array. If the data isn't character, listbox automatically recognizes it as a bitmap.-------------------------------------------------------------------------------- Hi for all ! I have a problem with Dialog and Browse coordinates .Here is the source codelocal oButlocal oDlglocal nHorRes := GetSysMetric( 0 )local nVerRes := GetSysMetric( 1 )// Dialog window with coordnates .DEFINE DIALOG oDlg FROM 0, 0 to nVerRes - 100, ;nHorRes - 50 PIXEL TITLE 'Browse dialog'// Here I want to create column browse with less cooordinates@ 0, 0 COLUMN BROWSE oBrw ALIAS GO SIZE oDlg:nRight - 10, ;oDlg:nBottom - 50, nRow PIXEL OF oDlgADD COLUMN TO BROWSE oBrw DATA ... HEADER ...etc..// At the bottom of dialog window I want to put some buttons .@ oDlg:nBottom - 25, 10 BUTTON oBut PROMPT ' ... ' ;SIZE 80, 12 PIXEL OF oDlg ACTION but_push1()etc..My problem is that Browse coordinates don't appears trully . I can't understandant in which way I can operate with Dialog widow and Browse control sizes . The sizes nVerRes and nHorRes work OK and Dialog window I create for size which I want . But the controls objects in Dialog box like Browse , Buttons and etc . did not understand oDlg:nTop ,oDlg:nBottom or etc. I will be thankfull for any help . Try using oBrw:Move( etc. ) in ACTIVATE DIALOG's ON INIT clause. Do the following and it will work wella) Create all your controls without worrying about position and size in your window definition ie.@ 0, 0 control ::oControl1 .......................... SIZE 0, 0 PIXELUse the pixel clause for all controlsb) Add a bDlgInit as follows: oDlg:bDlgInit := {|| ::PositionDlgControls()}METHOD PositionDlgControls::oControl1:Move(10, 10, 60, 18) // Top, Left, Width, Height::oControl3:Move(32, 10, 60, 18)::oControl4:Move(32, 10, 60, 18)::oControl5:Move(32, 10, 60, 18)::oControl6:Move(32, 10, 60, 18)etc etc etc etcreturn nilThis works very well as all your positionaing and sizing for all controls is done in one place, making it much easier to do You must NOT size and position your controls before the init of the dialog, other wise the coordinates are all weird and will confuse the hell out of you-------------------------------------------------------------------------------- The code below doesn´t work because when bskip is called after a couple of times the VAR Linha is NIL causing the error. Can someone help me solving this problem ? Code :LOCAL nRegistos, Linha := 1Nregistos := RegistosPara(mbrowse)mbrowse:bgotop := { || DBGOTO(Nregistos[Linha := 1] ) }mbrowse:bobottom := { || DBGOTO(Nregistos[Linha := LEN(Nregistos) ] ) }mbrowse:bskip := { |nanda| ChavePara(nanda, Nregistos, @Linha) }FUNCTION Chavepara(nanda,nregistos,linha)LOCAL nandounandou :=0* movimento dentro de gama aceitavelIF Linha + nanda < 1* passei topo do bloco !nanda := - Linha + 1ELSEIF linha + nanda > LEN(Nregistos)* passei o fim do bloco !nanda := LEN(Nregistos) - LinhaENDIFLinha += nandanandou := nandaif nregistos[linha] > 0DBGOTO(Nregistos[Linha] )endifRETURN(nandou) >mbrowse:bobottom := { || DBGOTO(Nregistos[Linha := > LEN(Nregistos) ] ) }Isn't this supposed to be "bGoBottom"?That´s right but but in the program that is correct. What I pretend to know is that if this is in fact a valid code just like it is in standard clipper. When buiding the array of records and display it the 1st time everything works weel, but when I move the browse cursor it immediatly gives an error. I´ve found out that the VAR Linha in the blockmbrowse:bskip := { |nanda| ChavePara(nanda, Nregistos, @Linha) }is becoming NIL but I can´t find why. I can´t see where in this code the value is changed to NIL. Maybe you could give a clue. I don't understand your using Linha:= as an array postion. This will return .T. or .F. not a number.>>mbrowse:bgotop := { || DBGOTO(Nregistos[Linha := 1] ) }If you want to go to the first record and set Linha to 1, then I would do it like this:mbrowse:bgotop := { || (Linha:=1, DBGOTO(Nregistos[Linha] ) ) } > > mbrowse:bgotop := { || DBGOTO(Nregistos[Linha := 1] ) }> If you want to go to the first record and set Linha to 1, then I would do it> like this:> mbrowse:bgotop := { || (Linha:=1, DBGOTO(Nregistos[Linha] ) ) }The two expressions are semantically equivalent.-------------------------------------------------------------------------------- I would like to shift the position of an item in wbrowse with drag & drop. Up to now I have used an indexed field with the row-number. I mark the line which I want to transfer with the left button, then I click the right mouse-button to select the line. Afterwards I again mark the space where I want to insert the line with the left mouse-button, and finish the change with a right click. But I think this is not the usual procedure. So I tried withoLbx:bLClickedoLbx:bLButtonUp.But bLButtonUp is only sending back the row in pixel. Can someone tell me how I know how to find the record-number of the line? This might help, get text row from pixel rowMETHOD nClickRow ( pnPixRow ) CLASS qBrowser/*return browse row matching pixel row*/return nWRow( ::oBrw:hWnd, ::oBrw:hDC, pnPixRow, If( ::oBrw:oFont != nil, ::oBrw:oFont:hFont, 0 ) )-------------------------------------------------------------------------------- WBrowse. How to make headers active ? Meaning, if I click a header then something can be executed (Mostly used for index order related to that column) oBrowse:aActions:={ {|oBrw,nRow,nCol|MsgInfo("You pressed the 1st column")},;{|oBrw,nRow,nCol|MsgInfo("You pressed the 2nd column")}}Thanks for the hints. Yes it goes now. Any chance we put a bitmap on the headers ? Take a look into CanalFive Grid, quite powerful and amazing way to make your data look sharp !!!! check at: <!-- m --><a class="postlink" href="http://canalfive.ciber-tec.com">http://canalfive.ciber-tec.com</a><!-- m -->-------------------------------------------------------------------------------- do you think that it is a bug or my fault?odbf:=tdatabase():new()obrw:=twbrowse...if i put a scop on a dbf and if there is no record matching the scop then my wbrowse is empty, so all is ok (so the scop is "working") but if i add a record, then delete it my wbrowse show me the deleted record NOT Normal!! if i add a new record then the wbrowse show the new record (and no more the deleted one) any idea? It is normal - after you delete the record - do a DBSkip(0) on the work area. The reason you still see the deleted record is because you have not moved from that record yet...i see the deleted record even if i close the dialog and return after in it I suppose SET DELETED is on?yes sure!the proof is that if there are two records matching the scop one record not deleted and one record deleted the only record that i see in the browse in the not deleted the strange thing is if the only record matching the scope is a deleted record, then it appears in the browse-------------------------------------------------------------------------------- Is there any way to create relation on browse with arrays? for example i have 2 arrays with this recordsArray(a) Array(b){"Test1",100,200} {"Test1",1000,2000}{"Test2",200,200} {"Test2",50,100}i want to create relation with items Array(a)/First Item & Array(b)/First Item ... b:nAt:=ascan(a[a:nAt,1],b) ???-------------------------------------------------------------------------------- I tried to replace TWBROWSE in an app I'm working on with TSBROWSE. When compiling, I get: treeview.ch (14) "Fatal C3048 Preprocessor table overflow". It works fine using TWBROWSE.My includes are ordered as follows:include fivewin.chinclude tsbrowse.chinclude treeview.chinclude font.chAny idea what to try other than reducing number of includes, which can't be done with the current form being displayed.Whoops, I meant TCBROWSE, not TWBROWSE. Try by including the folowing lines at the begining of your program:#define _DDE_CH // if you don't use DDE in your program#define _VIDEO_CH // if you don't use VIDEO in your program#define _TREE_CH // if you don't use TREE in your program#define _ODBC_CH // if you don't use ODBC in your program#define _OBJECTS_CH#include "FiveWin.ch" We have the same problem. We compile the module with Clipper 5.2e and linked it with other modules compiled with Clipper 5.3b. It worked fine But with "#define" thing, we completely compiled our modules with 5.3b. What causes these? Is there any other way? (like for example i'm using all those objects) Guess you're using Clipper 5.3. Either copy fivewin.ch and comment out some of the rarely used #includes at the top:#include "Folder.ch"#include "Tree.ch"#include "Print.ch"#include "DLL.ch"#include "ODBC.ch"#include "DDE.ch"#include "Video.ch"or add stuff like the following BEFORE #includeING fivewin.ch#define _FOLDER_CH#define _TREE_CHand so forth. Can you move some sections of code into separate PRGs? Like the tree for instance?Alternately, you could move the tree into a separate file, preprocess it and put it back (and thus be able to remove the ch include).I think if you can free up more RAM it would also help.This is a single module from the others that handles user/group security system, and I'm using a tree to select from. Guess with a little work I could break it into another module. What do you mean on preprocessing it in another file and then putting it back.... I don't quite understand what you mean exactly. I'm willing to try anything to make it work..... The ch files are used to translate a lot of the Clipper and Fivewin syntax to other more arcane functions and OOP calls. So, for instance all your tree syntax is translated into class syntax. You can get the preprocessor output by compiling with Clipper using the /P parameter.clipper myapp /pThe output file will be the same name as the PRG but with a PPO extension.Now if you have a stable section of code, like the tree, you can copy out the tree section from the PRG and paste it into a temp PRG file, preprocess it, then copy it back into the original PRG (I would leave the original code in but comment it out). Now you can also comment out the #include "tree.ch" since this code has already been preprocessed.This is not an elegant solution. If you need to change the code in the preprocessed section, you have to go through all this all over again. Thebetter solution is to move sections of code into other modules.I don't know how you do things, but I have seen entire large applications written in 1 or 2 PRGs. This is when you are going to really get intotrouble with preprocessor overflows. My applications are more likely to be 50 PRGs. I program in OOP syntax which promotes the use of smaller PRGs. OOP also makes it is also easier to break your code down into smaller modules since you can pass entire objects around (containing lots of code).Ok, I understand what your telling me now..... I'll look into that solution to see if I can break my prg down a little more. I do as you on breaking my code into modules. I typically have a module for each type of action in my prg and use a lot generic functions to handle actions used across many modules. I haven't used a lot of OOP for each module, though I know I should. This module is rather large because it does a lot, but I think I can break it down some. Once you start using OOP you will quickly wonder how you ever did without it. There is an article on basic OOP on my website (see URL below).To get you started thinking about it, imagine having a class for each business object somthing like this:class TCustomer from TDatamethod newmethod addmethod editmethod browseendclassTData is my enhanced database class. After creating the above you can just do: define button of oBar... action TCustomer():new():browse() to get a child window browser. On that window you can have add, edit, delete buttons:define button of oBar action ::add()define button of oBar action ::edit()define button of oBar action ::delete()So simple!And you can pass the entire object around:oCustomer := TCustomer():new()whatever(oCustomer)Then within the whatever() function you can call oCustomer:edit() or oCustomer:print(). You'll love it.Thanks for the reply Manuel and Luis. I knew that was one thing to do, but in my old age it slipped my memory. What little is left. <G>-------------------------------------------------------------------------------- Hi FW users ! I want to make use possibilities of TcBrowse Seek and etc methods . But in FW\samples directory I did not found any sample with this . I'll be thankfull , if you can send me any sample how to exhaust oBrw:Seek , oBrw:ResetSeek and etc methods . And another question is about TcBrowse aActions data . How to make codeblocks for TcBrowse columns and then how to use them ? Did you look at TestTcbr.prg? It shows quite clearly how to use the seek feature inside TCBrowse.I'm searching how to select some rows with mouse or Shift+arrows or Ctrl+push in TcBrowse class . As I saw in ListBox class thispossibility is , but in TWbrowse and TcBrowse - no . Maybe is another solution to do this ? May thanks for ant advice ! With best regards ! Here is a message from my archives telling how to do this:I tried it with arrays... And it works !!!Then, I thought, if I can do it with arrays, I should be able to do it with a file in a TWBrowse. I did it !!!By adding a new field to my database, I update that field when I select the record. When the field is updated, I also created a oLbx:Pane(IIF field = .T., RGB(red), RGB(blue))... Works even better... I can now go to the database and process all records with this field at .T.-------------------------------------------------------------------------------- I'm using oLBX:bChange := { || ShoInvRec() } to display some data in the dialog box that is associated with the current record in the browse.I know it is evaluating this function for every record in the database. As I scroll down the list, I can see the associated data scrollingthrough until it reaches the current record.My question is how can I control the scope so that it evaluates only the current record? Or, can I incorporate the function in oLBX:bLine? I do thisredefine get oG1 var cName id ........redefine listbox oLbs fields DBF1->number, ....... on change SeekAnyData( )function SeekAnyData( ) // Seek the key number into MyFile and display it in oG1MyFile->(Dbseek(DBF->Number))cName = MyFile->NameoG1:Refresh()return( Nil) In only my third week of using Fivewin, I'm still Jimmy source code not Jimmy resource editor, but I think I follow what you are saying.> redefine get oG1 var cName id ........First define a Get object with the data I want to display.redefine listbox oLbs fields DBF1->number, ....... on change SeekAnyData( )Second, use the ON CHANGE clause to call the function.> function SeekAnyData( ) // Seek the key number into MyFile and display it> in oG1> MyFile->(Dbseek(DBF->Number))> cName = MyFile->Name> oG1:Refresh()> return( Nil)Finally seek the key for the record, reinitialize the GET vars and then refresh the oGET.I see what you're saying but why do we seek at all? I thought we were already positioned on the appropiate record.I followed your suggestion, but my oGET:Refresh() doesn't seem to be working. I posted a new message with more detail.Thanks in advance for any suggestions. Try this:redefine get ....... of oDlg UPDATE ......Change oGet:Refresh( ) to oGet:Update( ) or oDlg:Update( )-------------------------------------------------------------------------------- I can't seem to get my GETs to be repainted as I scroll through my dbf. here's what I'm doing:// first I load my memvars from the databaseLoadVars()// then I do my GETs@row,col get oGET VAR mITEMCODE pict ... of oWND... more gets ....// then I do my LBX@row,col listbox oLBX ...// to repaint the GETs, I use:oLBX:bChange := {|| LoadGets() , oGET:Refresh() }I'm certain that LoadGets() is initializing my memvars properly, but oGET:Refresh() doesn't seem to be working for me. I'm sure I must be leaving something out. I use this in my code.1. put your get object in an arrayaObj := { oGet1, oGet2, oGet3 ... }on your bChange,oLbx:bChange := { || DoRefresh(aObj) }2. create a function with parameter to hold aObj.function DoRefresh(aObj)local ifor i = 1 to len(aObj)aObj[i]:Refresh()nextreturn nil... or if you want more complex, use oGet:VarPut() to update the object b4 refreshing the obj.-------------------------------------------------------------------------------- I have a listbox (Wbrowse), i want to drag a line to an other line. Swap between line 3 and line 5.I begin the drag on line 3 and drop on line 5. The start line is found with oLbx:nRowPos, but how can i identify the dropline ?? I have the var nRow but is in pixel, or how can i convert the nRow in nRowPos ? Use NWROW() function (look inside WBROWSE.PRG for a how to use sample).-------------------------------------------------------------------------------- I have an array wich is filled from a dbf off 9 fields depending on the configuration wich can be changed the record amount is 14. The stucture of the browse MUST be downwards the fieldget( 1....9 ) and as column the records.i create a dialog and then the column browse and here is the problem.@ 1, 2 COLUMN BROWSE .....oBrw:SetArray( .............Then i want to do something like this :For n := 1 To Len( aArray )ADD COLUMN TO oBrw ARRAY ELEM nNext nThis doesn't work <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->is there a method to work around this problem ? Remember the array you will be browsing has to be a nested array, not a simpleone.That is it must be like this{ { field1, field2, fieldN } ,;{ field1, field2, fieldN }... }In which each subarray is the "record" to be browsed.If you array is like this:{ field1, field2, fieldN }That's why nothing is browsed. Your correct Luis, but the array is correct while when i define :ADD COLUMN ARRAY ELEM 1ADD COLUMN ARRAY ELEM 2.................this works but i don't know how many cols there are since it is config dependable so i thoughtFor n := 1 To Len( aArray )ADD COLUMN ARRAY ELEM nNextshould do the trick but it won'tThanks anyway for the responce your trouble seems to come from the 'detached local'-problem. Please have a look to the following source. May be it helps.STATIC gaStatArr := {;{ "Line 1", 12345.67, 123 },;{ "Line 2", 12345.67, 123 },;{ "Line 3", 12345.67, 123 },;{ "Line 4", 12345.67, 123 } ;}.........LOCAL aHeader := { "Header 1", "Header 2", "Header3" }LOCAL aSize := { 20, 20, 40 }LOCAL aPict := { "@!", "@E 999.99", "999" }.........REDEFINE COLUMN BROWSE oBrow ID 40 OF oDlg...oBrow:SetArray( gaStatArr )......for n := 1 to len( aHeader )oBrow:AddColumn( TCColumn():New( aHeader[ n ], MakeBlock( n, oBrow ), aPict[ n ],,, If( !.T., "LEFT", Upper( "RIGHT" ) ), aSize[ n ],.F., .F.,,,, .F. ) )next.........STATIC FUNCTION MakeBlock( n, oBrw )RETURN ( { | x | if( pcount() > 0, oBrw:aArray[ oBrw:nAt ][ n ] := x, oBrw:aArray[oBrw:nAt ][ n ] ) } ) Should've thought of that... Detlef hit the nail right in the head. You need to use detached locals to solve your problem. Thanx Luis and Detlef for the responce, i tested it yesterday and it works like a charm <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->), Now i got it working like i wanted but the most important question remains why do we need to use detached locals for it why cant we do it like the first thought of mine in a loop. Because the loop counter got a fixed value at the end of the loop. Such value is the FOR statement upper limit plus one. You should get yourself hold of Rick Spence's "Clipper 5.2 Power Programmer's Guide" if you want more insight on Detached Locals and other Clipper's stuff. (Enrico's explanations is just fine)-------------------------------------------------------------------------------- In Tcbrowse.ch there are an " #translate VALID ...... " defined. Help needed please!If this, the valid-clause of an GET or a DIALOG are not ok when the clause are in the form:....VALID if(xy=z,.T.,.F.) or ...VALID if(xy->(dbseek(z)),.T.,(msginfo("Not OK"),.F.))In this case, there are both results of the if() evaluated! If I disable this directive, all is OK. I don't understand what you mean exactly1- What version of tcbrowse are you using (ie if it's FW original, from which version; if it's the one I changed, what date is it from)?2.- Can you post the whole line where you are using the VALID clause since the snippet isn't at all clear, because it seems you're using the VALID keyword twiceIn any case the first valid should be simplified just asVALID ( xy == z ) // the if() is redundant Guenther refers to a #xtranslate statement in TCBrowse.ch which comes from original FiveWin version since 1.9.5 ( or prior versions, I don't know ).Inclusive the class you modified, comes with that statement, and more, TSBrowse also preserves it.I actually haven't ever used such command. I left it there for compatibility. I now realize what he meant.I've never used it ever either, but certainly seems to be not very useful and quite obnoxious.-------------------------------------------------------------------------------- When I use the for to clause in a browse, the record pointer is always on the first record of the scope. I want to open such a browse but the last record should have focus. did you try "GO BOTTOM" before opening the browse? Try:ACTIVATE DIALOG oDlg CENTERED ;ON INIT ( oBrw:nLen := 1, oBrw:GoBottom() ) ;ON PAINT ( oBrw:SetFocus() ) ;Ok, I've just tried and that works fine-------------------------------------------------------------------------------- This change was brought on by a funny, which has now bugged me long enough.When moving your mouse around the browse, it changes to a left-right cursor when you are on top of a column boundary. If your last column is defined narrow enough, it would do this somewhere inside the last column.I've changed the mousemove method inside wbrowse to counter this behaviour.METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TWBrowselocal nColPos := 0local aColSizes := ::GetColSizes()if ::lDragreturn Super:MouseMove( nRow, nCol, nKeyFlags )endifif ::lCapturedCursorWE()::VertLine( nCol )return 0endifif ::lMChange .and. AScan( aColSizes,;{ | nColumn | nColPos += nColumn,;nCol >= nColPos - 1 .and. ;nCol <= nColPos + 1 }, ::nColPos,Len(aColSizes) - 1 ) != 0CursorWE()elseSuper:MouseMove( nRow, nCol, nKeyFlags )endifreturn 0-------------------------------------------------------------------------------- TwBrowse Release Candidate I (beta) Harbour compatible available from: <!-- m --><a class="postlink" href="http://www.dbwide.com.ar">http://www.dbwide.com.ar</a><!-- m --> There is no source or no documentation with it. How should you expect us to test it? <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->WHY another browser? What is better in this browser? Patrick, is the same browser, but 100% compatible with Harbour. In few days, Hernán will put in its Page, the Final version.-------------------------------------------------------------------------------- I use several 'redefine brose ....' and more or less by accident I found some strange things.e.g. I had a browse which enabled about 40 lines, while at that time the databse only has about 15 records. Things like pageup/down (and similar went weird, if I clicked on the place of an empry row, a row (identical to another) would appear. And so on.All this went away the moment I changed the height (in the resource) of the browse and increased the number of records.is there some rule that a browse may not have more than X lines? Not at all. It may have as many rows as needed.Do you have deleted records ? If so, please remember that you have to set <oBrw>:bLogicLen to return the proper amount ofrecords (without the deletes ones).> Do you have deleted records ?it is in a test situation, it happens often that there are even more deleted than actual records. It would explain, that at a fresh start (only adding) all is fine.>> set <oBrw>:bLogicLen Also if all I do is " redefine browse obrw ....." and no special clauses whatsoever?-------------------------------------------------------------------------------- I have a question that I tried many way to keep a numeric value right in TWBrowse or TListbox but it didn't work. I need like PADL(n,w,d) function or Str(n,w,d) function. Thanks in advance for any help, In TWBrowse, set the aJustify elements for the numerics to True, like so:oBrow:aJustify := { .F., .F., .T., .F., .T. }Those cells will now appear right-justified. I use "align right" for that.-------------------------------------------------------------------------------- I try to use 2 TBrowse object and 2 alias from 1 file. I use cmxsetscope() for query database. When I click on left browse but right browse do not query correctly.Example:Clipper 5.2e, FW 2.0dindex expression is GROUP+CODEGROUP CODE NAME GROUPCODE NAME'M ' 'CAR' 'CAR name''CAR' 'TOY' 'Toyota''M ' 'PEN' 'PEN brand''CAR' 'HON' 'Honda''PEN' 'CRO' 'Cross''PEN' 'PAR' 'Parker'Procedure ConMCode()local oDlg, oBrw1, oBrw2, oBtn, oSayOPENFILE('CCRCODE','SUB')OPENFILE('CCRCODE','MAN')MAN->(cmxSetScope(0,'M '))MAN->(cmxSetScope(1,'M '+chr(122)))DEFINE DIALOG oDlg RESOURCE 'CONMCODE'REDEFINE LISTBOX oBrw1 FIELDS MAN->cod_code, MAN->cod_desc ;HEADERS 'Code', 'Description' ;FIELDSIZES 50, 180 ;UPDATE ;ID 101 ;ON DBLCLICK EditMan(.F.,oBrw1)ON CHANGE oBrw2:UpStable() ;SUB->(cmxSetScope(0,MAN->COD_CODE))SUB->(cmxSetScope(1,MAN->COD_CODE+chr(122)))REDEFINE LISTBOX oBrw2 FIELDS SUB->cod_code, SUB->cod_desc ;HEADERS 'Code', 'Description' ;FIELDSIZES 50, 180 ;UPDATE ;ID 102 ;ON DBLCLICK EditSub(.F.,oBrw2)ACTIVATE DIALOG oDlgThanks in advance for your help, The call to cmxSetScope() has to bee done inside the ON CHANGE clauseDEFINE DIALOG oDlg RESOURCE 'CONMCODE'REDEFINE LISTBOX oBrw1 FIELDS MAN->cod_code, MAN->cod_desc ;HEADERS 'Code', 'Description' ;FIELDSIZES 50, 180 ;UPDATE ;ID 101 ;ON DBLCLICK EditMan(.F.,oBrw1)ON CHANGE ( SUB->(cmxSetScope(0,MAN->COD_CODE))SUB->(cmxSetScope(1,MAN->COD_CODE+chr(122)) ) )....Activate Dialog oDlg On Init Eval( oBrw1:bChange )I try to use this but it's still not work.REDEFINE LISTBOX oBrw1 FIELDS MAN->cod_code, MAN->cod_desc ;HEADERS 'Code', 'Description' ;FIELDSIZES 50, 180 ;UPDATE ;ID 101 ;ON DBLCLICK EditMan(.F.,oBrw1) ;ON CHANGE ( SUB->(cmxSetScope(0,MAN->COD_CODE)) , ;SUB->(cmxSetScope(1,MAN->COD_CODE+chr(122)) ) ) Does the second browse have a index on the COD_CODE field?The second browse use the same index file.Database CCRCODE.DBFIndex file CCRCODE.NTXExpression COD_TYPE+COD_CODEField name Type WidthCOD_TYPE C 3COD_CODE C 3COD_DESC C 30The first browse key is 'M '+COD_CODEThe second browse key is COD_TYPE+COD_CODE * the COD_TYPE will relation to COD_CODE in first browse I don't think cmxSetScope() works with the NTX RDD.I'm sorry the index file is CCRCODE.CDX-------------------------------------------------------------------------------- I use Clipper 5.2e / FW2.0d / Comix / Blinker 4.10. I tried to browse 2 databases that has relation but it doesn't work. Pls see my sample below, I don't know what I do wrong. Thanks in advance for any idea,#include 'FiveWin.ch'#include 'set.ch'#include 'cmx52.ch'Static oDlg, oBrw1, oBrw2*------------------*Procedure MainSET RESOURCES TO "BWCC.DLL"SET RESOURCES TO "FWDBG.DLL"SET RESOURCES TO "TEST2.DLL"DBUSEAREA(.T.,,'CCRTRN','TRN',.T.)TRN->(OrdSetFoCus(1))MsgInfo(OrdKey())MsgInfo(OrdName())DBUSEAREA(.T.,,'CCRTBL','TBL',.T.)TBL->(OrdSetFoCus(2))MsgInfo(OrdKey())MsgInfo(OrdName())TBL->(cmxSetScope(0,'O'))TBL->(cmxSetScope(1,'O'+chr(126)))DEFINE DIALOG oDlg RESOURCE "TESTBRW"REDEFINE LISTBOX oBrw1 FIELDS TBL->TBL_RMNO, TBL->TBL_LAST ;FIELDSIZES 60, 150 ;HEADERS 'ROOM' , 'NAME' ;ID 101 ;OF oDlgoBrw1:bChange := { || oBrw_Con( oBrw1, oBrw2 ) }REDEFINE LISTBOX oBrw2 FIELDS TRN->TRN_TRNO,STR(TRN->TRN_UNIT*TRN->TRN_QTTY) ;FIELDSIZES 60, 100 ;HEADERS 'TRN#' , 'AMOUNT' ;ID 102 ;OF oDlgACTIVATE DIALOG oDlg ON INIT Eval( oBrw1:bChange )TBL->(DBCLOSEAREA())TRN->(DBCLOSEAREA())RETURN*-----------------*Function oBrw_Con( oBrw1 , oBrw2 )Select TRNTRN->(DBseek(TBL->TBL_INTNO))* oBrw2:SetFilter( 'TRN->TRN_INTNO' , TBL->TBL_INTNO , TBL->TBL_INTNO )TRN->(cmxSetScope(0,TBL->TBL_INTNO))TRN->(cmxSetScope(1,TBL->TBL_INTNO))oBrw2:UpStable()oBrw2:Refresh()Select TBLTBL->(DbGoTop())oBrw1:SetFocus()return nil Put a "SELECT TRN" before the REDEFINE for oBrw2, or specify the alias as in oBrw2:alias := "TRN"SELECT TRNREDEFINE LISTBOX oBrw2 FIELDS TRN->TRN_TRNO,......SELECT TBLoBrw2:alias is going to be TBL because that was the active table when the listbox was defined.Thanks a lot, I've got it and work nice.. : >-------------------------------------------------------------------------------- Suppose I wish to browse a file. Not so much allow modifications. Just browse it. Any suggestions on the best way to do so. I'm not sure this is "best", but TWBrowse is certainly "easy":redefine listbox fields alias "Customer" id 101 of oDlg-------------------------------------------------------------------------------- I have a browse (redefine .... browse ....) and I would prefer it to have no scrollbars (neither hor. nor vertical). Using MS Visual Dev to generate the resource and have already set there to use no scrollbars. Yet they appear.I managed to eliminate one with obj:lNoHScroll:=.T., alas there appears to be no obj:lnoVscroll.Who knows how to fully eliminate them? Try:oBrowse:oHScroll:setRange( 0,0 )oBrowse:oHScroll := niloBrowse:oVScroll:setRange( 0,0 )oBrowse:oVScroll := nilTried both, no success. I also liiked into tcbrowse.prg but could not find a data field suggesting to be useble.> Ps. Op ons laatste gesprek kom ik binnenkort terug, het was wat hectisch de> laatste tijd !!Okay no hurry, I completely overhauled my app since that time. Several independent browses into a dialog, sending SMS messages, 'intelligent' buttons, etc. I use twBrowse() and the suggested statements works for me !Maybe a :refresh() ?FW2.3b + Clipper 5.3 + Blinker 6.0That is the same as a listbox? Bit difficult in my case then, the browse is supposed to show entries from a database and putting that in an array would be a very tedious thing. > That is the same as a listbox?Yes.>Bit difficult in my case then, the browse is> supposed to show entries from a database and putting that in an array would> be a very tedious thing.You can use arrays but you can also use databases. I do most of my database browses using TWBrowse which is defined as either @ 0,0 LISTBOX... or REDEFINE LISTBOX... Listbox doesn't have all the capabilities of TCBrowse, but often you don't need them.I haven't used MS Visual Dev, but I know that in Workshop you must define a custom control as TWBrowse instead of using the standard "listbox" that Workshop has or you will have strange problems like you are experiencing.Also in workshop you can disable the scrolling by editing the style. You take out these. WS_VSCROLL | WS_HSCROLL.I changed it to a "Listbox" (I discovered that there were 2 helpitem on listbox, one for use as regular and one for use with a dbf). But thescrollbar remains. Although (as far as I can see) the problem (scrolling going haywire) has disappeared, and I wanted to eliminate the bar as aworkaround.>>> custom control as TWBrowse instead of using the standard "listbox" thatIn MSDev I can define a customer control, but then I get a runtime error.-------------------------------------------------------------------------------- I have an empty database with a character field len 20, and a browse to show that field in a dialog with a buttonbar. The first button in the bar, it's used to diaplay a dialog to add a record with data entered by the user. Now, the problem is that when i add the first record in the database, the browse doesn't show it after the refresh, but if i close and open the dialog with the browse again, it shows it normally. The curious thing is that when i add a register and there are other records in the database, there isn't any problem. I am using oBrw:Refresh() and i tried oBrw:UpStable and oBrw:BugUp() too, and any combination of those methods to refresh the browse after i add the record, but it doesn't help. This problem happens with arrays and databases, and it doesn't matter how many items or the size of each one. What can it be?Note: i don't want to use tsbrowse's autoappend functionality, because i must do it with the buttonbar. Check your alias...define browse... alias cAlias=> cAlias must be your database alias name-------------------------------------------------------------------------------- In a browse I can (in the column statement) define an "order indxname" which defines the actual index to use when the columnheader is double clicked.This is nice, however I want (when the column header is clicked) to have the control.Question is, "Is there a way to define an action when a certain column header is (double) clicked?" I had the same necessity; for this reason I modified for my personal use the tcbrowse and tccolumn classes.I attach them here, just to show you how I did. Search for ::bHeadclick inside both classes. I don't expect you can compile and use this code, probably it calls more functions from my personal library or other pieces of code. But you should to get some idea about how to do.Since The NG do not allow me to send whole code inside one zip, search two zip files in following messages <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->TCC.ZIP TCB1.ZIPI will check them out, although I remember that in 1.9x there was a defaultcodeblcok which could be changed for such purposes.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Btrieve-------------------------------------------------------------------------------- Maybe someone can help me, For a new project I have to convert BTRIEVE-files (Windows 16 Bit version) to DBASE-Files. The only way to convert I found was some DOS-Tools. But they all need the DOS-Btrieve-drivers. But they are not installed on the computer of my customer. So I need a Tool to convert the Btrieve- Files without any drivers. You can search an ODBC for BTRIEVE on the web and convert data via ODBC Try RaSQL, the RDD works good under Clipper DOS and FiveWin Windows: <!-- m --><a class="postlink" href="http://www.rasql.com/rbcss1.htm">http://www.rasql.com/rbcss1.htm</a><!-- m -->--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Button Bars-------------------------------------------------------------------------------- Is there anyway to manage button bars for mdi windows the same way you manage menus? I'd like to show a different button bar on the main window depending on which mdi child has focus. Fivewin automatically manages the menus why doesn't it manage a different button bar? Is there any way to achieve this effect? I am using this just to change the pictures on the buttons, but I am sure we can even remove buttons or add new ones. You can change dynamically all the settings of your toolbars and buttons at run time. Just have a look in the help file for tbar and tbtnbmp classes for the data var's.At what point do you change the button's pictures and actions? If you have two different MDI Child windows how do you make the appropriate buttons appear on the main window toolbar depending on which mdi child has focus? Otherwise it looks confusing, for example:Open main window with tool bar and mdi child. Toolbar buttons on main window are all functions for the mdichild. Open another unrelated or different mdichild window. The toolbar buttons are not relevent to this window. The main menu changes as the menu for the new mdi child is different but the toolbar remains the same. I need to change the toolbar dynamically depending on which mdi child has focus. I've tried using the gotfocus and lostfocus method but these are both called when the mdi child is created and therefore doesn't work. Try the TESTBAR1.PRG in the samples directory, it doesn't appear to work properly. Any ideas? Perhaps what I'm trying to do is bad user interface design, I'm open for suggestions... You are on the right way of implementing your idea by looking at the focus, but you have to use the code blockoYour_MdiChild:bGotFocus := { || Change_the_Buttons() }not the method ::GotFocus().Also why are you trying to change the buttons on the MDI window ? For me the logic is to have on the MDI window the buttons to open the child windows (functions or whatever) and then each MDI CHILD window will have its own buttons. This way you will save your self a lot of work and troubles. I think so and I am using that way with no problems so far.I'm trying to use the bGotFocus method but it's not working correctly. I'll keep working on it. I understand your logic about attaching the buttonbar to the mdichild itself but it's kind of an unusual situation. The main mdi child window is a customer screen with folders. This is were the user spends most of their time so I like the button bar being attached to the main window, not the mdi child. The only other mdichild window will only be opened occasionally. Additionally, I don't allow multiple instances of either mdi child window. So, I don't see any purpose in having a button bar on the main window that only opens one of two different mdi windows, one being the main one the user is in 98% of the time. I am using this just to change the pictures on the buttons, but I am sure we can even remove buttons or add new ones. You can change dynamically all the settings of your toolbars and buttons at run time. Just have a look in the help file for tbar and tbtnbmp classes for the data var's.-------------------------------------------------------------------------------- Can you assign a accelerator key to a button on a button bar like to can a menu item Try thisDEFINE BUTTONBAR oBar SIZE 64, 70 3DLOOK BOTTOM OF oDlgDEFINE BUTTON oButton[1] RESOURCE "BIG_STAMPA" OF oBar ;ACTION eval(bActSta) ;TOOLTIP " Stampa estratto"oButton[1]:cargo := VK_F5 // key acceleratoroDlg:bKeyDown = { | nKey | CheckKey(nKey,oBar)}// Controll the keysFunction CheckKey(nKey,oBar)Local nX,nYIF nKey >= VK_F2 .AND. nKey <= VK_F9IF oBar:lActiveFOR ny := 1 TO len(oBar:aControls)IF oBar:aControls[ny]:cargo # nil .AND. oBar:aControls[ny]:lActiveif oBar:aControls[nY]:cargo == nKey*eval(oBtnUse[nX]:bAction())oBar:aControls[nY]:Click()endifENDIFNEXTENDIFENDIFReturn nil-------------------------------------------------------------------------------- I am writing a app. with a buttonbar init, how can i center the bitmaps on the buttons ? There are now at the top of the bottom. You must define the size of buttonbar as "define buttonbar obar buttonsize nwidth, nheight of ownd" where the size (x,y) of the bitmaps must be smaller (very few smaller) than nwidht, nHeight...-------------------------------------------------------------------------------- In the norton guides it says that the class TBAR has Data called aButtons but when I try to access this array I keep getting "No exp.method:TBAR:aButtons". Also, if I check the source code for the TBAR object I see no aButtons defined. Is this a bug or is there another way to access this array? What I need it for is to find out which was the last button pressed. I am trying oBar:aButtons[nI]:lPressed"....Would this be correct or is there an easier way to do it? It is aControls instad of aButtons. Try using aControls instead aButtons.TryoBar:aControls[nI]:lPressed-------------------------------------------------------------------------------- Could someone give an example how to use buttonbars in dialogs? Thanks in advance Quite simple:DEFINE DIALOG oDlg ................... more statements come here...........ACTIVATE DIALOG oDlg ON INIT (DlgBar(oDlg))Function DlgBar(oDialog)DEFINE BUTTON BAR oBar OF oDialog.... more button bar instructions come here .........Return-------------------------------------------------------------------------------- I got strange display if button bar displayed on left or right position, please see the jpg attached. Anything I did wrong ? I think you must be update to FW 2.0,because solve i Upgrade to FW 2.0 to solve the problem!-------------------------------------------------------------------------------- Has anyone had any luck getting the 3rd Bitmap to work in a DEFINE BUTTON RESOURCE "BITMAP1",BITMAP2","BITMAP3"The 3rd button should be the hover attribute. The 1st is normal the 2nd is pressed and the 3rd should be the active one. I am trying to emulate the Outlook buttons where they are Grey Scale and the active button is in color. I have three bitmaps for the button the 1st is a grey normal button the 2nd and 3rd are color. The hover or active attibute looks the same as the non active button? Try Jorge Masson's modification of TBAR class. It looks good to me and it does the think you are looking for. You can download it from <!-- m --><a class="postlink" href="http://www.htcsoft.freeservers.com/">http://www.htcsoft.freeservers.com/</a><!-- m --> as I do not have it right now in home to send it to you. NOP! , third button on the definition of the button bar was used in FW 1.92 to show the button when it's disabled, in FW 1.95 and upper the disable bitmap is automatically painted by FW, the third parameter remains because of a compatibility issue. Try CanalFive Bar (<!-- m --><a class="postlink" href="http://canalfive.ciber-tec.com">http://canalfive.ciber-tec.com</a><!-- m -->) I've tried Jorge Mason's button and it does everything you need! I've put it on the <!-- m --><a class="postlink" href="http://here.as/FiveWin">http://here.as/FiveWin</a><!-- m --> download page, including a sample EXE.Thanks for all your help. George Massons code did the trick. I was on the wrong track with the 3rd parameter.-------------------------------------------------------------------------------- I don't find in manuals and samples how can to change color of buttonbar in source . I will be thankfull for any help . Try oBar:SetColor(CLR_FOREGROUND, CLR_BACKGROUND)-------------------------------------------------------------------------------- My Bar.prg is dated 11.11.1999. FW 2.0 Using the method oBar:GoRight() I get the following error: (Tested with testbtn.prg of the samples.)DEFINE BUTTONBAR oBar OF oWndoBar:GoRight()ApplicationPath and name: C:\CLIPPER\FIVEWIN\SAMPLES\TESTBTN.EXESize: 722,176 bytesMax files handles permited: ( SetHandleCount() ) 255Error ocurred at: 06/01/00, 14:24:41Error description: Error BASE/1083 Fehlerhaftes Argument: *Args:[ 1] = U[ 2] = N Use this method as follow:ACTIVATE WINDOW oWnd ;ON INIT ( oBar:GoRight(), ..... )and it works OK! Another way is to use this method after last DEFINE BUTTON ... It works too.// Defining ButtonBar buttons which uses Bitmaps files from disk#include "FiveWin.ch"static oWndfunction Main()local oBarlocal oBrushDEFINE BRUSH oBrush COLOR nRGB( 12, 129, 87 )DEFINE WINDOW oWnd FROM 1, 10 TO 20, 60 ;TITLE "Testing Buttons from disk" ;BRUSH oBrushDEFINE BUTTONBAR oBar OF oWndDEFINE BUTTON OF oBar FILE "Btn1.bmp" ACTION MsgInfo( "FiveWin 1.2" ) ;MESSAGE "You can place..."DEFINE BUTTON OF oBar FILE "Open.bmp" GROUP ;ACTION MsgInfo( "FiveWin 1.2" ) ;MESSAGE "Any BMP File here..."DEFINE BUTTON OF oBar FILE "Cut.bmp" ACTION MsgInfo( "FiveWin 1.2" ) ;MESSAGE "Reading it from disk !!!"oBar:GoRight()SET MESSAGE OF oWnd TO "FiveWin 1.2 - The Magic of Windows & Clipper 5"ACTIVATE WINDOW oWndreturn-------------------------------------------------------------------------------- I just started using fivewin about three days ago. So far I love it, but I have two simple questions.1) The buttonbar on my main window has a small vertical double line in the far left position - is there any way to get rid of that?2) When my app first loads, I see a DOS box, black screen window open just prior to my main window (maximized) - can I bypass that?Using: Clipper 5.2.e - FiveWin 2.2c - Blinker 6.0 Here we send you a modified wndboxes.obj module that avoid thepainting of such lines. WNDBOXES.OBJ , WNDBOXES.C> 2) When my app first loads, I see a DOS box, black screen window open> just prior to my main window (maximized) - can I bypass that?Could you please test samples\tutor02.prg and confirm is if you still get that DOS box ? If you build and run your app from a batch file, you may see that DOS box.But if click and execute your EXE, directly, you should not get such DOSbox.Could you please check that ?1) Buttonbar issue solved with the wndboxes.obj file.2) I recreated my shortcut for the exe and now I don't get the DOS box.-------------------------------------------------------------------------------- I have FiveWin 2.2c, Clipper 5.2e, Blinker 5.10 The istruction "DEFINE BUTTONBAR oBar DOWN OF oWin" create a bottom Bar thatoverride the status bar. How could I display it correctly? If you already have a status bar then you can not place the button bar at the bottom.The solution is to use a TPanel object as the oClient data, and then place a TButtonBar as the oBottom data of it.Have a look at samples\TestAlig.prg for a working sample.-------------------------------------------------------------------------------- Is it NOT possible to implement a menu and buttonbar definition inside of a dialog box? I can use the @row,col BITMAP for the display but I would like to use tooltips in conjunction with the buttonbar. I'm still new to Fivewin - please forgive my ignorance. Have you tried assigning cTooltip instance variable:oBmp:cTooltip = "My tooltip message"YOU must digit this :...... activate dialog oDlg ;ON INIT MENUBAR(ODLG)RETURN NILFUNCTION MENUBAR(ODLG)lOCAL oBAR.. DEFINE BUTTONBAR oBar 3D SIZE 26, 26 OF oDLG.......RETURN NIL-------------------------------------------------------------------------------- can any one tell me how to add color to a buttonbar...I am trying to compile with harbour and add color to the windows buttonbar...DEFINE BUTTONBAR oBar _3D SIZE 117, 42 OF oWnd CURSOR oCrsHand oBar:SetColor( , CLR_RED )-------------------------------------------------------------------------------- Button bars in windows, without "3D" clause and using 0x4L, look broken. Howcan we getnormal button bar look, without using 3D clause while defining button bars please? Sorry, I don't understand what you mean...Could you please post some screenshoots (JPGs) and a little source code sample to test it here,many thanks for your feedback,The source code is :DEFINE window oWndMain FROM 00,00 TO 30,60 ;TITLE OemToAnsi( "SOLUTRONY - "+dtoc(pany)) ;MENU MenuMain() ;BRUSH oBrush ;ICON oIco ;MDIDEFINE BUTTONBAR oBar SIZE 40,50 of oWndMainDEFINE BUTTON OF oBar RESOURCE "clientes" ACTION cadcli() ;TOOLTIP "Cadastro de Clientes";NOBORDERACTIVATE WINDOW oWndMain MAXIMIZED ON INIT (DlgInicial()) ;valid confirma("DESEJA SAIR DO PROGRAMA ?")I`m sending to you the image of error...P.S.: the error with Button bar is in a main window and no in a dialog... is this my error ???? As far as I know, 3D clause of buttonbar does not use ctl3d.dll, so you can use this clause without any problem. Also, buttonbars are not affected by 0x4L, since the buttons are painted directly by FW code, not windows.BTW, Antonio, has you seen the last msg I sent to you? What is your opinion? What about a drop down list box? Ours all look 2D when on buttonbars. > What about a drop down list box? Ours all look 2D when on buttonbars.try using my ctl3d.lib from <!-- m --><a class="postlink" href="http://www.fivewin.info/~jfgimenez">http://www.fivewin.info/~jfgimenez</a><!-- m --> It makes all controls to be 3D look everywhere (on buttonbar, MDI childs, windows, dialogs,...) I agree with Jose.-------------------------------------------------------------------------------- operating system win. me - xbase++ 1.7 - fivewin++ and fivewin 2.2 I have twice 2 problems 1 with MESSAGE Bar click with the mouse on the date or the time on the bar of the window the used memory appears. and the second problem is with BUTTON Bar in how much the message doesn't appear of TOOLTIP please know how to give me explanations? thanks and regards to everybody The used memory is shown only if you click twice on the message bar.You may disable that behavior doing this:oMsgBar:lInfoRes = .f.oMsgBar:lCheckRes = .f.> and the second problem is with BUTTON Bar in how much the message doesn't> appear of TOOLTIPThat is a known bug just for FW++. We still do not have a solution for it <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->-------------------------------------------------------------------------------- can any one tell me how to add color to a buttonbar...I am trying to compile with harbour and add color to the windows buttonbar...DEFINE BUTTONBAR oBar _3D SIZE 117, 42 OF oWnd CURSOR oCrsHand oBar:SetColor( , CLR_RED )thanks-------------------------------------------------------------------------------- Is it possible to align one or two button at the right of the buttonbar and the rest at the left side if FW195? Try using AT <nPos> clause of DEFINE BUTTON command.The AT <nPos> doesn't work, with this you can give the postition,but this is the place-number of the icon and not the position. With this you can put the button in ex. fifth-position but if you give a number higher than the amountof buttons, an array-error appears. Sorry, I misinterpreted the mean of that clause. I use this:nRow := oButton:nTop()nCol := oButton:oWnd:nWidth() - oButton:nWidth() - 5oButton:move( nRow,nCol )This works great!!!-------------------------------------------------------------------------------- Is it possible to put a separator between buttons in a buttonbar? Is it possible to move these buttons, in order to make two groups of buttons separated by a separator or by some space? Use the "group" keyword when defining a button to separate it a small distance from those to its immediate left.Thanks a lot, Ray. My Fivewin manual is not so complete, so many thanks for your help.-------------------------------------------------------------------------------- Is it possible to put a buttonbar in a dialog? I need some examples. Just put TBtnBmp buttons on your DIALOG.You have to do it with the ON INIT clause:activate dialog oDlg on init buildBar(oDlg)...static function buildBar(oDlg)local oBardefine buttonbar oBar of oDlg...return nil You're right, but this way the result is not as clean as that on the WINDOWSs, from the graphical point of view.So, what do you suggest? If you are asking me, I already suggested to just put some TBtnBmp onthe DIALOG. Try my free EMAG Software IDE to see the result(<!-- m --><a class="postlink" href="http://www.emagsoftware.it/ide.zip">http://www.emagsoftware.it/ide.zip</a><!-- m -->). Looks good. Now we need to see some source example on how to do this. As I said, just put some TBntBmp on your DIALOG. You don't need of a sample to do this.-------------------------------------------------------------------------------- Has anyone an example about how to use menus in a button, inside a buttonbar? Inside a button on a buttonbar? That's unusual... buttonbars are for "one-touch" functionality. I would think that a menu belongs... on the menu!Incredulity aside, here is an actual (and even possibly useful <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> suggestion: You could place a popup menu at the coordinates of the button when it is pushed:menu oPopup popupmenuitem ......endmenu...activate popup oPopup window oBar at nRow, nCol"buttonbars are for "one-touch" functionality. "I agree with you. But in some unusual cases, the client want to have this kind of behavior. So, what can I do? Just learning. Sample of dropdown menu on a buttonbar:...define buttonbar oBar size 26,28 of ::oWnd 3doBar:blClicked:= {|| .t. }define button of oBar resource "new" noborder;action dropInfo():add();tooltip "New";menu ::newMenu()...method NewMenu()local oMenumenu oMenu popupmenuItem "Mail Message" resource "newmail" action ::oMail:add()menuItem "Event..." action ::oEvent:add()menuItem "Contact..." action ::oContact:add()menuItem "Charge..." resource "dollar" action ::oCharge:add()menuItem "Note..." action ::oNote:add()menuItem "Reminder..." action ::oReminder:add()endmenureturn oMenuThanks, James,You're always a good friend. I have learned many things with you and the rest of the FiveWinners.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Buttons and ButtonBmps-------------------------------------------------------------------------------- When I UPDATE() a Dialog, <Whenfunc> of a my Buttons is not updated; <Whenfunc> is controlled by an item of an array (empty or not empty) the array is evaluated every time I update my dialog. The item is rightly displayed on the dialog, but it doesn't change the button enabled/disabled property. Do somebody know why it? There is a MethodAEvalWhen() from TWindowJust dooYour_Bar:AEvalWhen()on all the places you needto refresh the buttons.-------------------------------------------------------------------------------- does anyone knows how to change the button colors? ... For the normal TBtn Class you can't as I know without changes in FW. But for TBtnBmp you can do it with SetColor().I need to change the normal TBtn :}}} But i guess i have to change them on bitmap buttons...-------------------------------------------------------------------------------- I've started playing with TBtnBmp class, and I wonder... is there a way to tell te control where to place the bitmap ?, I mean, align the bitmap to the left or to the right ? I have had quite a problem with the TBtnBmp class starting with 1.9.5. Last night I pulled the fwbmp.obj out of the 1.9.2 FiveC and life came back to normal. As far as I can tell, ADJUST in 1.9.5 is simply broken, yielding a partial image, and failure to use ADJUST on a bitmap that is not perfectly sized gets you nothing. In 1.9.2 you could feed TBtnBmp an off-sized bitmap and it would force a fit. I need this as I have an application with some 5-600 bitmap buttons of varying sizes and user controllable colors. To avoid having to make over 100 bitmaps I simply have one for each color and let ADJUST do what it's advertised to do -- adjust the bitmap to fit the button. I'm having a similar problem with bitmaps in a tcbrowse in 1.9.5. It works fine in 1.9.2 but goes sour in 1.9.5. I have to move to 1.9.5 or possible 2.0 for TCP/IP support but may have to take some 1.9.2 objs with me. Sure wish Antonio hadn't fixed something that wasn't broken. Regarding your question about BMP placement, I think you will have to modify the ::paint() routine. I had to do so to place multiple text objects on the same button and found it rather straightforward. The clause ADJUST of Btnbmp is not present anymore since version 1.95, the reason for that is due the display enhancement when the button is disabled, and also the enhancement that makess the buttons background color the same as your button face color on your windows desktop. ADJUST is certainly present in my copy of 1.9.5. Do you mean 2.0??Fivewin.ch 8/31/98TBtnBmp.prg 9/16/98But as I said, it doesn't appear to work.-------------------------------------------------------------------------------- Does anyone knows how to build a button containing both icon and text (like the ones at the work bar at the bottom of the Windows 95 screen - the Start button, for example)? Use PROMPT clause of REDEFINE BTNBMP command. Take a look at the ::Paint() method in the TBtnBmp Class. That should give you the model.-------------------------------------------------------------------------------- I've had this problem for so long I just forgot about it. Does anybody know why my disabled buttons (in a buttonbar) look this way ? Is there a way to fix it ? ACTIVATE DIALOG oDlg ON INIT ( oBtn:Hide(), oDlg:UpDate())Thanks, I will give it a try. I forgot to say that it only happens in my machine, in others where the program is installed it looks fine. I think it has something to do with some DLL, but I've checked and re-checked that there's only one version of CTL3D.dll in each computer. Recheck APP directory and \windows\system,have CTL3D.dll ??-------------------------------------------------------------------------------- i want to change caption of button, the problem is that button caption is "Ok" and then i press it i am change this with oButton:cCaption:="Save" but caption is not changed. Try oButton:SetText("WhatEver") and then oButton:Refresh() You have to use oButton:cTitle( "newtitle" ) not cCaption.-------------------------------------------------------------------------------- How to change text of Button?? I try oBtn:cCaption := cText, oBtn:SetText( cText ), but, all fail!! oBtn:cTitle := "Your_Text"-------------------------------------------------------------------------------- The tButton.prg class creates buttons with a style that includes WS_TABSTOP How can I de-activate the tabstop property of a button created from source, after it is created?? Reassign nStyle in your source code likeoYour_Button:nStyle := nOr(what, ever, properties, you, need, here) This won't work after the window has been activated. Simply reassigning style is likely to make no effect. OK, OK, I did not see that this is necessary to happen after activate the window/dialog. Of course it would not work just like :nStyle := (....) Attached is a little example with SetWindowLog and how to Deactivate / Activate button properties which of course would work not only for a button. ( T.PRG )Thanks for the suggestions I will play with SetWindowLong and look up the various parameters in the MSDN5. I don't know exactly, but the API SetWindowLong() allows to changeduring run-time some internal characteristic of the controls like style.-------------------------------------------------------------------------------- I want to change BtnBmp button bitmaps,source code below:DialogPUBLIC oBtn := Array(3)Redefine BtnBmp oBtn[1] resource "NEW" of oDlg Action ChangeBMP()Redefine BtnBmp oBtn[2] resource "EDIT" of oDlgRedefine BtnBmp oBtn[3] resource "DEL" of oDlgFunction ChangeBMP()oBtn[1]:LoadBitmaps("OK")oBtn[2]:LoadBitmaps("Cancel")oBtn[3]:Disable()RETURN NILWhen I press first button "oBtn[1]",first button can change bitmap to resource "OK" and Third button can Disable itself.But only Second can't change bitmap to resource "Cancel".If I press Second button,it can auto change bitmap.Why?? ADD "UPDATE" after redefine BtnBmp ......-------------------------------------------------------------------------------- I know FiveWin button style have two,one default windows button below:redefine button ....... CANCELother bitmap button below:redefine btnbmp .......I want to add CANCEL function in BTNBMP button.How do I set? Please help me! As I know you can. You have to change all your valid function to return true and in the function use the oGet:oJump to return to the get you are reading.Something like this:IF Empty(cLiCodigo)c5Stop('El código de libro es obligatorio, no puede quedar enblanco.')oGet:oJump := oGetSysRefresh()Return .t.ENDIF-------------------------------------------------------------------------------- In my applications I use tbtnbmp for the dialog buttons, and I want to use 'direct accelerators' to them. I have accelerators to the tbtnbm buttons putting &Name to the control on Workshop, but when the user press ANT+N the button get the focus but is not pressed. I want if anybody knows how to do 'direct accelerators' to the btnbtm, that means that whr user press ALT-N the tbtnbmp exectures the action clause directly. It can't be done using bgotfocus because when the user select the buton using the tab key the action doesn't have to be done. Any ideas ? You use button or buttonbar ?I use tbtnbmp as buttons in my dialogs. You can see it in <!-- w --><a class="postlink" href="http://www.jsnsoftware.com">www.jsnsoftware.com</a><!-- w --> What exactly do you mean by "puttind &Name to the control on Workshop"? If you could explain that I'll be one step ahead in doing what you want.I define a generic control, and in the name field on workshop I write '&N' if I want the accelerator key to be N - for Nuevo. Didn't know that tip. Let me experiment with it and I'll let you know. This thing works even with a browse...---------------------------------------------------------------------------------------------------------------------------------- I'm using buttons from resourcesDEFINE BUTTON oBTN1 ID 101 .....my problem comes when it gets the focus: How can I change the Tbutton, Tcontrol and / or Twindow classes in order to avoid the black rectangle that surrounds it ? My problem is that I already have tons of code that I can't rewrite again. So the solution (if it exists) have to come on this kind of button.... Uncheck the 'Border' Attribute from resource editor on this button From source define the button bitmap with NOBORDER thank you for your help, but I did a little mistake. The sentence I use isn'tDEFINE BUTTONbutREDEFINE BUTTONinto the .RC it's declared in this way:CONTROL "INDEX", 798, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, coords...so the class I'm using is Tbutton() and not Tbtnbmp(). Tbutton() doesn't have the ::lBorder property so I suppose I should change the style but I don't know how. I think you mustbe use TBtnBmp button to solve your problem.Below:REDEFINE BTNBMP oBtn RESOURCE "BITMAPS" NOBORDER OF ... Try This ( BUTTON.ZIP )you did an excellent job and it will be very useful. But my trouble still remain. I will write you privately explaining what I'm meaning. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> sorry, Giovi, that you will explain with private email... The result may be interesting for many peoples: bitmaps as buttons which dont have the behaviour of standard Borlands buttons.-------------------------------------------------------------------------------- Does anybody know how to change the color of a button? (from a resource) I tried afterREDEFINE BUTTON oButMenu ID 203 OF oDlg the following:SetTextColor( oButMenu:hDC, CLR_RED )SetBkColor( oButMenu:hDC, CLR_RED )andoButMenu:SetColor(CLR_RED,CLR_RED)andoButMenu:nClrText:=CLR_REDoButMenu:nClrPane:=CLR_REDandDEFINE BRUSH oBrush COLOR CLR_REDoBut:oBrush:=oBrushAll without any effect! You cannot change the color of a standard Windows button (TButton class), I think. Have you tried these things In the INIT cluase of the ACTIVATE WINDOW or DIALOG?ACTIVATE DIALOG ON INIT .. ¿ Are you using Borland Buttons ? (you know, the ones with bitmaps inside them), if so, I'm sorry, you cannot change color to Borland Style Buttons since they are based on bitmaps, you'd better use TBNTBMP class.Thank you all for your replies. The ON INIT sugestion does not work, it seems that Tbutton simply does not allow changing its color. The Tbtnbmp works just fine (just do not specify a bitmap) with changing colors, there is only a problem with a refresh after a double click. But this is resolved by adding the method LDblClick(). Further more method LButtonUp() needed a refresh() and a releasecapture().-------------------------------------------------------------------------------- In the process of removing Borland buttons, I'm looking to convert more of my Buttons into BtnBmp buttons (which I've never bothered using until now, as a Borland button + bitmap has been quite suitable).What's the trend? Are you guys tending to favour BtnBmps more and more, or trying to use basic Buttons wherever possible? What are the benefits and disadvantages?(I don't have XP, but a few sample XP screens I saw on Patrick's site seem to mainly have the traditional buttons, albeit with rounded corners). The only one I've used is a calendar in a third-party button get control. I tend to emulate Microsoft's interface styles. Granted MS doesn't doeverything the best way, but almost all computer users use MS products so the closer your program is to what they are used to, the better accepted it will be.MS doesn't use many bitmap buttons.I think you might find the following article on interface design quite interesting:<!-- m --><a class="postlink" href="http://joel.editthispage.com/stories/storyReader$51">http://joel.editthispage.com/stories/storyReader$51</a><!-- m -->I also HIGHLY recommend Alan Cooper's book, "About Face" on interface design. I consider this to be the most important book on programming that I have. It is available at <!-- w --><a class="postlink" href="http://www.Amazon.com">www.Amazon.com</a><!-- w -->.-------------------------------------------------------------------------------- updating from fw 2.0 to 2.3, Buttons from source code are non displayed on dialogs. Obviously I'm doing something wrong, but I don't know what ! Here's the code :DEFINE DIALOG oDlg1 FROM 00,00 TO 50,128 ;OF oWnd ;TITLE c_titolo ;COLORS c_col_txt,c_col_bck.........@ 25,xB1 BUTTON oButCancel PROMPT cPrmCancel OF oDlg1 ACTION CARTELLE_D()SIZE xBut/2,yBut/2.........ACTIVATE DIALOG oDlg1 CENTERED On 2.2 version we had to change the buttons coordinates, to properly adjust to the new fonts management system.You may use previous include\constant.ch and rebuild source\classes\button.prg, or change some contant.ch buttons related values to get a similar look.We apologize for those changes, but there was the only way to implement fonts reuse on FW.-------------------------------------------------------------------------------- Does anybody know how to use a hotkey for a BtnBmp like "&Close" with Alt-C without using the prompt-clause ? If there is a menu, you can make it a menu choice. If it is on a dialog you can put an invisible button on it. Good idea, but how can i disable these hidden buttons from tab in a selfdefinded dialog? Just uncheck Tabstop on button properties.-------------------------------------------------------------------------------- Please help me solve the problem. I have the dialog with LISTBOX and two BUTTONS created. The LISTBOX browses a databse file. I need toenable/disable the button2 depending on the value of the field in the actual record, but it doesn't work. The button2 isdescribed this way:REDEFINE BUTTON oBtn2 ID 140 OF oDlg ACTION MsgInfo('Button2') WHEN davka->pocet=0 //This should disable button depending on the value of the fieldThe ON CHANGE part of the listbox refreshes the oBtn2, but the button2 is always enabled. Add the following to the ON CHANGE clause:oDlg:aEvalWhen()-------------------------------------------------------------------------------- Hello ! I'm using this class is some dialogs . I know that can assign to oBtnbmp:lCancel := .t. . In some cases I need default , but oBtnbmp:lDefault := .t. doesn't work . What to do in this situation ? Try to trap Enter key.Thank for your reply ! I tried your advise , but unsuccesfull .At first I tried oGet:KeyDown := {|nKey| if( nKey == 13 , ... }But I get an error : "No exported method : _KeydownThen I wrote oDlg:bKeyDown := { |nKey| if( nKey == 13, ... }But this can't to trap Enter ! What I'm doing wrong ?Here is my source :function MsgGet( cTitle, cText, uVar, lMask, uPict, oFont )local oDlg, oBut1, oBut2local oGet := uVarlocal lOk := .f.local nK1 := nK2 := n := j := m := nWd := nBt := 0local nRg := 8local nK3 := nK1 + 50local nK4 := nK2 + 50local oFnt := if( !empty( oFont ), oFont, oFont_pagr )local nFh := oFnt:nHeightlocal nFw := oFnt:nWidthlocal nRw := nFh - 1DEFAULT lMask := .f.DEFAULT cText := if( lMask, if( cLg == "L", "Kodas :", "Code ( ID ) :" ), if( cLg == "L", "Kintamasis :", "Variable :" ) )DEFINE DIALOG oDlg FROM nK1, nK2 TO nK3, nK4 PIXEL ;TITLE cTitle FONT oFnt STYLE DS_MODALFRAMEj := oDlg:GetWidth( cText )m := oDlg:GetWidth( strtran( uVar, " ", "W" ) )nWd := j + m + 40j := j / 2m := m / 2@ nRw, 3 SAY cText SIZE j + 2, nFh PIXEL FONT oFnt OF oDlgif lMask == .t.@ nRw, j + 10 GET oGet SIZE len( uVar ) * nFw, nFh PIXEL PASSWORD FONT oFnt OF oDlgelseif !empty( uPict )@ nRw, j + 10 GET oGet SIZE len( uVar ) * nFw, nFh PIXEL FONT oFnt PICTURE uPict OF oDlgelse@ nRw, j + 10 GET oGet SIZE len( uVar ) * nFw, nFh PIXEL FONT oFnt PICTURE "@!K" OF oDlgendifendifnRw += nFh + 4@ nRw, nRg BTNBMP oBut1 SIZE nBut_w, nBut_h ;NAME "Ok" OF oDlg ACTION ( lOk := .t., oDlg:End() )oBut1:cToolTip := cGerainRg += nBut_w@ nRw, nRg BTNBMP oBut2 SIZE nBut_w, nBut_h ;NAME "Cancel" OF oDlg ACTION oDlg:End()oBut2:cToolTip := cCanceloBut2:lCancel := .t.nBt := ( nRw + nBut_h * 2 ) * 2 + 10oDlg:bKeyDown := { |nKey| if( nKey == 13, ( lOk := .t., oDlg:End() ), ) }ACTIVATE DIALOG oDlg ON INIT ;( oDlg:Move( nK1, nK2, nWd, nBt ), oDlg:Center() )if lOk == .t.uVar := oGetendifreturn lOkMany thanks for any help ! There are some errors in your code. This is a working version:#include "Fivewin.ch"FUNCTION MAIN()LOCAL cVar := SPACE( 20 )LOCAL oFntDEFINE FONT oFnt NAME "Arial" SIZE 0, -10MSGGET( "Prova", "Testo", @cVar, .T., , oFnt )RELEASE FONT oFntRETURN NILfunction MsgGet( cTitle, cText, uVar, lMask, uPict, oFont )local oDlg, oBut1, oBut2local oGetlocal lOk := .f.local nK1 := nK2 := n := j := m := nWd := nBt := 0local nRg := 8local nK3 := nK1 + 50local nK4 := nK2 + 50local oFnt := if( !empty( oFont ), oFont, oFont_pagr )local nFh := oFnt:nHeightlocal nFw := oFnt:nWidthlocal nRw := nFh - 1DEFAULT lMask := .f.DEFAULT cText := if( lMask, if( cLg == "L", "Kodas :", "Code ( ID ) :" ), if( cLg == "L", "Kintamasis :", "Variable :" ) )DEFINE DIALOG oDlg FROM nK1, nK2 TO nK3, nK4 PIXEL ;TITLE cTitle FONT oFnt STYLE DS_MODALFRAMEj := oDlg:GetWidth( cText )m := oDlg:GetWidth( strtran( uVar, " ", "W" ) )nWd := j + m + 40j := j / 2m := m / 2@ nRw, 3 SAY cText SIZE j + 2, nFh PIXEL FONT oFnt OF oDlgif lMask == .t.@ nRw, j + 10 GET oGet VAR uVar SIZE len( uVar ) * nFw, nFh PIXEL PASSWORD FONT oFnt OF oDlgelseif !empty( uPict )@ nRw, j + 10 GET oGet VAR uVar SIZE len( uVar ) * nFw, nFh PIXEL FONT oFnt PICTURE uPict OF oDlgelse@ nRw, j + 10 GET oGet VAR uVar SIZE len( uVar ) * nFw, nFh PIXEL FONT oFnt PICTURE "@!K" OF oDlgendifendifnRw += nFh + 4@ nRw, nRg BTNBMP oBut1 SIZE 20, 20 ;NAME "Ok" OF oDlg ACTION ( lOk := .t., oDlg:End() )oBut1:cToolTip := "Tooltip"nRg += 20@ nRw, nRg BTNBMP oBut2 SIZE 20, 20 ;NAME "Cancel" OF oDlg ACTION oDlg:End()oBut2:cToolTip := "Cancel"oBut2:lCancel := .t.nBt := ( nRw + 20 * 2 ) * 2 + 10oGet:bLostFocus := { |nKey| if( GetKeyState( VK_RETURN ), ( lOk := .t., oDlg:End() ), ) }ACTIVATE DIALOG oDlg ON INIT ;( oDlg:Move( nK1, nK2, nWd, nBt ), oDlg:Center() )if lOk == .t.// uVar := oGetendifreturn lOkThank you ! Now this is working OK . you missed the "b" oGet:bKeyDown := ...-------------------------------------------------------------------------------- I need emulate an CLAUSE CANCEL of button class without button, or an function with send an cancel (Gets) of dlg. You may set any control <oControl>:lCancel = .t.-------------------------------------------------------------------------------- how to change the button text color ?==> oBtn:cTitle Have you tried oBtn:SetColor( nForeground, nBackground )?Do it in the On init clause in the Activate Dialog command-------------------------------------------------------------------------------- I try to DISABLE button when user empty edittext and ENABLE while they type something in edittext. But the button did not ENABLE.DEFINE DIALOG oDlg RESOURCE 'TEST'REDEFINE GET oGet VAR cText ID 101 OF oDlgREDEFINE BUTTON oBtn ID 102 OF oDlg WHEN !empty(cText)ACTIVATE DIALOG oDlgThanks in advance for any idea, Try calling oDlg:aEvalWhen() inside the ON CHANGE clause of the REDEFINE GET command.Thanks Enrico, but it's still not work. I don't know why? The problem lies in the fact that ON CHANGE clause is evaluated *before* the pressed key is assigned to the GET variable. TGet class would need a fix. Anyway, this is a (ugly!) workaround:#include "Fivewin.ch"FUNCTION MAIN()LOCAL oDlgLOCAL oGet, oBtnLOCAL cVar := SPACE( 10 )DEFINE DIALOG oDlg@ 1, 1 GET oGet VAR cVar OF oDlg;ON CHANGE ( oGet:Assign(), IF( nKey >= 32 .AND. nKey <= 126, oBtn:Enable(), IF( EMPTY( cVar ), oBtn:Disable(), oBtn:Enable() ) ), .T.)@ 3, 1 BUTTON oBtn PROMPT "Button" OF oDlg;WHEN !EMPTY( cVar )ACTIVATE DIALOG oDlg;CENTERRETURN NIL Try this instead:REDEFINE BUTTON oBtn ID 102 OF oDlg WHEN !empty(oGet:oGet:varget())Note that there is a double oGet (because there is a Clipper get object inside the FW get object). I think you need to use this to get the data frominside the get buffer. I don't think cText is updated until the get is exited. Tried. No difference at all. Anyway, I use cVar in my sample, notoGet:cText() method.> Note that there is a double oGet (because there is a Clipper get object> inside the FW get object). I think you need to use this to get the data from> inside the get buffer. I don't think cText is updated until the get is> exited.As far as I know, the GET variable is constantly updated. Using cVar (the GET variable), oGet:cText() or oGet:oGet:VarGet() should get to thesame result. Sorry, I meant to address my message to Dutch instead of to you.> As far as I know, the GET variable is constantly updated. Using cVar> (the GET variable), oGet:cText() or oGet:oGet:VarGet() should get to the> same result.I tried your example as posted and it worked perfectly. Good work. No problem. I learned a lot from your messages.> > As far as I know, the GET variable is constantly updated. Using cVar> > (the GET variable), oGet:cText() or oGet:oGet:VarGet() should get to the> > same result.> I tried your example as posted and it worked perfectly. Good work.Thanks, but it's really not a solution as clean as I would want to write. My personal TGet class have a better solution inside it.Thanks a lot Enrico and Jame, It's work perfect. I use (in similar cases following:redefine button ........ when edtmodeedtmode is set to .T. or .F. depending on when the button should be enabled.Works perfect. I think so, but first step BUTTON is DISABLE because edittext is empty. When I type something BUTTON should be ENABLE but it's still DISABLE. I don't know why?-------------------------------------------------------------------------------- How can I put a text consisting of 2 lines on a button? Add to Style Button the number 8192----------------------------#define CR Chr( 13 )//FUNCTION uMultLineBtn_Test()local oDlg, oBtnlocal cCaption := 'Botones con...' + CR + ;'caption multilínea.-' + CR + ;'Para conseguirlo basta con emitir la sencilla sentencia...' + CR + ;'oBtn:nStyle := ' + CR + ;'nOr( oBtn:nStyle, 8192 )'DEFINE DIALOG oDlg ;FROM 00, 00 TO 17, 100 ;TITLE cCaption@ 03, 03 BUTTON oBtn PROMPT cCaption ;OF oDlg ;SIZE 100, 070oBtn:nStyle := nOr( oBtn:nStyle, 8192 ) // this works fine!ACTIVATE DIALOG oDlg CENTEREDRETURN NIL Thank's James, i needed this too.Do you know how to do this with a button from resources.... ?I tried (obt:nstyle:=nor(obt:nstyle,8192); obt:settext('Regel 1'+CR+'Regel2')) but with resources it does not work. The CR (I tried 13 & 141) areshown as straight thick lines.Any other ideas?-------------------------------------------------------------------------------- I am still looking for a solution which enables me to put 2 (or even more) lines of text on a button which is created from a .dll resource. I've tried several things but still haven't found a working solution. Haven't tried it, but maybe you can create the buttons as "generic controls" (ie like a TWBrowse or TCBrowse is handled), Then you could add the BS_MULTILINE style there, ie, from inside Workshopa) click on the "key" icon on the Tools floating window (third column, at the bottom)b) In the Class field enter (with quotes): "TButton"c) In the Style field enter (without quotes): 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_MULTILINELet us know it that works. You have to:1. Open your DIALOG resource and go to Edit as text mode.2. Add the value 8192 at the end of the PUSHBUTTON statement (separate it by a comma).3. Inside the ON INIT clause of the DIALOG command use oBtn:cTitle() method to set the caption of the button (separate the lines by a CHR( 13)).That's all.Thanks, works great! Gives a great addition to make-up dialogs Certainly Enrico's code is simpler than my suggestion, mainly because I tried entering BS_MULITLINE instead of 8192, but BRW didn't recognize that constant (just like it doesn't reconginzes SS_SUNKEN). > Certainly Enrico's code is simpler than my suggestion, mainly because I> tried entering BS_MULITLINE instead of 8192, but BRW didn't recognize> that constant (just like it doesn't reconginzes SS_SUNKEN).The weird thing is if you enter 8192 and recompile then BRW replace it with BS_MULTILINE. But if you directly enter BS_MULTILINE then BRW won't recognise it. <!-- s:-? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":-?" title="Confused" /><!-- s:-? --> Exactly. The same happens with SS_SUNKEN. You have to enter 0x1000 and when saved BRW translate it to SS_SUNKEN. Go figure! How can you resolve this if you do not use Workshop? Just using STYLE clause of @ row, col BUTTON command. Thanks for your answer, Enrico. How do you use STYLE Clause? A working sample follows:#include "Fivewin.ch"FUNCTION MAIN()LOCAL oDlgLOCAL oBtnDEFINE DIALOG oDlg@ 1, 2 BUTTON oBtn PROMPT "Multiline" + CHR( 13 ) + "button" SIZE 50, 50oBtn:nStyle = NOR( WS_CHILD, WS_VISIBLE, WS_TABSTOP, 8192 )ACTIVATE DIALOG oDlg;CENTERRETURN NIL Enrico, do you know if it is possible to change the background colour of a button? No. As far as I know, background color of standard Windows pushbuttons can't be changed. Maybe you can paint your own color over the existing one during ON PAINT event (not tested). You can't. That's why Manuel Mercado (among other reasons) created the TSButton class.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
C code in FiveWin-------------------------------------------------------------------------------- Does anyone know what the TC.EXE command line parameters are for createing OBJ's that work with Fivewin? With my old TurboC++ 1.01 I use the following syntax that seems to work perfectly:tcc -2 -G -Iinclude -K -O -Z -c -d -f- -ml -w your_C_sourceOops. I meant BCC.EXE command lines. I am simply doing that :bcc -c -ml my_source.cand it works just fine. You could obtain a list of all the possible options by just typing bcc on the command line. Also testbcc -ml -c -Iyour_include_directory yourcfile.c-------------------------------------------------------------------------------- Does anybody has a sample project for Visual C++ 6 that builds a DLL that is accesable by FiveWin. Or a Borland C++ Builder 4 project?I use borland 5.4 now, but not the IDE, i wanne build the DLL's in a IDE. There is a full working sample at SAMPLES\DLLS\C_LANG\32BITS (for Borland 5 C/C++).Yes I know. And I have managed to build some C functions into a DLL and acces them via FiveWin. Works great! But I want more...<g> I want to build my DLL's with the IDE interface of CBuilder or even better, Visual C++. So If someone has build a DLL accessable via fivewin win the IDE of CBuilder or Visual C++ I wouild love to see the project files. I know you have the Visual C++ Bible from Richard C Leinecker & Tom Archer. Now, if you will turn to page 839, we will begin the lesson. It's precise and to the point, should take you 20 minutes to get a dll up and going. And don't tell me your dog ate your book.I was already at page 840! So I'm gonna read further. Hey man, thanks for the tip!<g> Its been a while since we have done one but we create a DLL in MS Dev Studio 6.0 that we use in Fivewin for accessing the DUN entries. If you are still having trouble let me know and I will look up my settings. The trick is getting the DLL define file correct if I remember.-------------------------------------------------------------------------------- Can anyone send me a resource compiler that works with FW and Clipper? Thanks. i don't have the money to buy Turbo C++ or Visual C++ 16 bits, and is a waste of money since i won't use the C compilers... Somebody sometimes ago asked about it and I've already attached the MS RC.exe as answer to his request. You should be able to find it if you will search for this message. If you won't find it write me and I will send you something. "TOP System srl" <!-- e --><a href="mailto:topsyst@alpcom.it">topsyst@alpcom.it</a><!-- e --> You can go to the Borland site, register and download the Borland C/C++ 5.5 compiler All for free!!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->-------------------------------------------------------------------------------- I'm looking for Xbase++ & Fw++ Compatible C Compiler, because i have some modules coded in .C for Clipper5.3 and I must porting to 32 bits under Xbase ++. I used Bcc55 with the flags Bcc32 xxx.c -a1 -c -u- but alink reports that ' the current xxx.obj is invalid or corruted' is there other free compiler such as Dgjcpp or similar that works with alaska? You may use BCC32.exe -it is the one we use at FiveTech to build FiveWin++- The trick is that as Borland generates OMF OBJs format you do need to turn them into COFF OBJs format. To do so, we do use Microsoft LIB.exe 32 bits that makes it automatically. Then you link the resulting library. If you need it we may provide you the exact syntax we do use with LIB.exe 32 bits.-------------------------------------------------------------------------------- El compilador C que te puede servir es el de Microsoft Visual C++ version 4.0 o posterior. al parecer existen algunos problemas con el de borland. You may use BCC32.exe -it is the one we use at FiveTech to build FiveWin++- The trick is that as Borland generates OMF OBJs format you do need to turn them into COFF OBJs format. To do so, we do use Microsoft LIB.exe 32 bits that makes it automatically. Then you link the resulting library. If you need it we may provide you the exact syntax we do use with LIB.exe 32 bits.If you can say me the correct sintasix please . I'm interested in the syntax too. Please send them to me also. First step is to create the 32 bits LIB:c:\msdev\bin\lib /DEF:lib\YourLib.def /OUT:lib\YourLib.libwhere YourLib.def is an ascii file with these contents:LIBRARY MYLIBNAMEEXPORTSdummy @1Next, you start adding OBJs to it (compiled using Borland bcc32.exe):c:\msdev\bin\Lib YourLib.lib /OUT:YourLib.lib YourObj.objThe syntax we use to call Borland is:bcc32 -c -u- -w-dup -Ic:\FiveWin\include;c:\alaska\xppw32\include YourFile.c-------------------------------------------------------------------------------- As we have explained previously, XBase++ requires OBJs in COFF format. As Borland just generates OBJs in OMF format, we do use Microsoft LIB.exe 32 bits to turn OMF into COFF OBJs. Here it is the way to use it:First step is to create a 32 bits LIB:c:\msdev\bin\lib /DEF:lib\YourLib.def /OUT:lib\YourLib.libwhere YourLib.def is an ascii file with these contents:LIBRARY MYLIBNAMEEXPORTSdummy @1Next, you start adding OBJs to it (compiled using Borland bcc32.exe):c:\msdev\bin\Lib YourLib.lib /OUT:YourLib.lib YourObj.objThe syntax we use to call Borland is:bcc32 -c -u- -w-dup -Ic:\FiveWin\include;c:\alaska\xppw32\include YourFile.c-------------------------------------------------------------------------------- I have some problems when i try to merge xbase code & c code, i have a function created in C makes a simple call to a winapi function ( MessageBox ) and I'd like to execute under xbase. f.e.:Function is called IATest()MessageBox(NULL,"Hello world","Hello",MB_OK);....I put IATest.obj in a 32 lib file with Microsoft lib32. (MyLib.lib)I Link withaLink test MyLib.lib User32.lib(User32.dll provided in \alaska\xppw32\lib says that _MessageBoxA is not declared in user32.dll, but i create and import lib, extracting def file from user32.dll with borlands bcc55 (impdef -a ) and next creating the lib with aimpdef , this time links goes ok.) but when i execute the source a windows dialog box says that not exists a function _MessageBoxA vinculated to the library User32.dll, The mistake is that if i used MessageBeep() , everething is ok. in some winapi functions go and in others nothing. whats wrong. You have use Borland 32 bits this way (for XBase++)c:\bc5\bin\bcc32 -c -u- -w-dup -Ic:\alaska\xppw32\include Yourfile.cAnd don't forget to include <WinTen.h> Winten.h keeps inside a long list for XBase++. Check that the function you need to call is there. If not, place it yourself.-------------------------------------------------------------------------------- sometimes I wish to compile C source code in order to get a clipper compatible OBJ but really I don't know how to do since I don't know C compiler. I have MS C++ 5 (Visual Studio). Does anybody can tell me basic steps in order to make a new file into Visual Studio, compile it and get a clipper Obj ? If you mean MS C++ from Visual Studio 5 it is no going to help you much with clipper + fivewin as it does not create 16 bits obj any more. But with Borland 5.01 I am just using for quick accessbcc -c -ml myfile.cfrom the command prompt or for help just bcc and it will show all the options. For BCC 5.5 I am not sure. Patrick, Antonio, anybody else.... I know that up to version 5.5 it is possible to compile 16 bits, but what about 5.5 ? 5.5 does not provide a 16 bits compiler. This is why we use Borland 5.2 for that. Anyhow, soon we all will be using Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Yes, I thought so. I am using Borland 5.01.> Anyhow, soon we all will be using Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->I really would like to see a proper OLE implementation in FWH. There are so many things we could do with it. We are actually working on enhancing and completing the existing one. Cool, need a tester ?-------------------------------------------------------------------------------- What I do to implement the next code in C ? I don't understand how I send a 2d array to C and use it. This is a simple sample:-----------------------------------------------------------------------aArr = {}AAdd( aArr, { 1, 2, 3 }AAdd( aArr, { 4, 5, 6 }AAdd( aArr, { 7, 8, 9 }? NewSay( aArr ) <- this is the C code that I need.-----------------------------------------------------------------------function newsay( aArr ) // This is the clipper code.local x, y // I need it in C code.local nLenX := len( aArr )local nLenY := len( aArr[ 1 ] )local nRet := 0for x := 1 to nLenXfor y := 1 to nLenYnRet += aArr[ x, y ]nextnextreturn nRet You need this using Harbour Api? if yes I can help. I use this on hbzlibNo. This code is for pure clipper+fivewin application. I made a class to draw buttons like windows XP style, but I need use C wrappers toimprove speed. I don't know how I can read, in C, an 2D array passed for clipper as parameter.-----------------------------------------------------------------------aArr = {}AAdd( aArr, { 1, 2, 3 }AAdd( aArr, { 4, 5, 6 }AAdd( aArr, { 7, 8, 9 }? NewSay( aArr ) <- this is the C code that I need.-----------------------------------------------------------------------function newsay( aArr ) // This is the clipper code.local x, y // I need it in C code.local nLenX := len( aArr )local nLenY := len( aArr[ 1 ] )local nRet := 0for x := 1 to nLenXfor y := 1 to nLenYnRet += aArr[ x, y ]nextnextreturn nRet Can't you pass each single array item to the function? Something likethis:? NewSay( aArr[ 1 ], aArr[ 2 ], aArr[ 3 ] )Hmm... its an idea... a good idea. I'll try it. Thank you for the hint. Try _itemArrayGet() it retrieves an element of an item of type array, see the "Clipper Technical Refrence"I found the solution:AAdd( aArr, { 1, 2, 3 }AAdd( aArr, { 4, 5, 6 }AAdd( aArr, { 7, 8, 9 }1) Convert the 2D array to 1D arrayaArr = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }2) Use a function to converte x, y parameter to an index:static WORD Array2D( WORD x, WORD y )return ( ( x - 1 ) * 3 ) + y; // 3 is the len of each element of 2D array3) Extract the parameter with:_parnl( 1, Array2D( x, y ) )Its working fine here. Thanks for all help.-------------------------------------------------------------------------------- I have a question: I made a function with some moveto(), lineto() functions to draw a folder with windows XP style write in pure clipperand it is working fine. Now I have a question: using moveto() and lineto() in a C function, I improve the speed or no?Simplifying: The moveto() and lineto() have the same speed in C and clipper functions ?My tests here have the same results and I'm very confused... The API in themselves have the same speed without regard to the laguage used. Clipper statements eventually used can be much more slow than the C counterparts. Clipper is VERY fast! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Since the Clipper was made in C language and both all the commands and functions, the speed difference is almost zero, specially if you're using low level functions in Clipper, you maybe cannot see the difference.You are right, my tests here say me that clipper sometimes is more fast than C, specially if I use low level functions.I convert foldtool.c in clipper code and if I call the function that draw the folder inside an for/next structure to measure the time, Idon't see differences with clipper and C, but sometimes, clipper is more fast than C. In my opinion C is more fast than Clipper API Codes As you know or not I made many 3rd pary for FiveWin by myself, which isRelated Graphics....And I reached at a Result, and That is C API code is more faster than Clipper WinAPI code! It is why Anonio use C code for his Graphic working for FiveWin I agree. And the best result is to write the rutine directly in C.Ok. I'll convert my clipper code thar paint my folder to C code and when I finish I display the result here.-------------------------------------------------------------------------------- I am trying to Create a C program that I what to place inside a DLL. To be able to call from my Five Win program. Can someone tale mehow to Create the DLL and then Call it from FiveWin. I have bend able to Call other Functions from DLL with the DLL32 Function Commandbut I want to Create A C program and place it inside the DLL the C program Uses the Shell32.DLL and the User32.DLL or the *.Lib fromC. I can Compile and Run the C program as a *.exe file. You have a several working samples at fw\samples\dlls\c_langI am using Fivewin Version 1.9.2 and I don't have the Directory (Fw\samples\dlls\c_lang) on my version. Can you with a copy ofthat directory.-------------------------------------------------------------------------------- I need use float numbers in my fivewin C functions, but if I try to use float, an error occur when I link my application. What I do:example:CLIPPER XPDEG( PARAMS ){int val1 = _parni( 1 );int val2 = _parni( 2 );float val = val2 / val1;...} "float" is not a valid typedef in CYou better usesigned longorunsigned longThe floating point routines are automatically searched from the library model you are usingThese are integer numeric types not floating-point.> The floating point routines are automatically searched from the library> model you are using??? > > "float" is not a valid typedef in CI should have said C++ (sorry)> What? float is a native C type.Yes, in ansi C > > > "float" is not a valid typedef in C> I should have said C++ (sorry)float is a native type for C++ also.> > What? float is a native C type.> Yes, in ansi CAnd C++ also. BTW, the correct names are ISO C and ISO C++.> > > The floating point routines are automatically searched from the library> > > model you are using> > ???> Here I reproduce a part of Borland C++ Programmer's Guide:> long [int] <identifier> ;> [long] double <identifier> ;> Description> When used to modify an int, it doubles the number of bytes available to> store the integer value.> When used to modify a double, it defines a floating-point data type with 80> bits of precision instead of 64.> The Borland C++ IDE links the floating-point math package if you use> floating-point values or operators anywhere in your program.> Borland C++ 5.0 Programmer's GuideYou said something referring to library models. That is an obsolete concept that have nothing to do with floating-point math. You need Microsoft C of a certain version (5.5?) to succesfully use floating-point math with Clipper. You can not use float types with fiwewin on a C code,directly, whatever the compiler you use. What I do is to make c functions that returns the float number like a string .This functions has to be on a dll. Uhm... I think you're right.Thanks to all for your support.I find in \fw22\source\function\DRIVES.C an use of float in function CPUSPEED. What version of C I need to compile it ? I have BCC 5.0 Well, this demonstrates that it is possible, right? Sorry for myprevious incorrect statement.> What version of C I need to compile it ? I have BCC 5.0I think you need Microsoft C. Maybe version 5.5 but I'm not sure.No problem. I try to use BCC50 and it compile fine. Thanks to all for your help. Maybe only DOS apps need MSC to compile floating-point math operations...-------------------------------------------------------------------------------- I made an small sample in C that use double ( can be float ) but I receive an error when I link my application: F_FTOL@: unresolved externalWhat I need to compile it ? I have BCC 5.0// This is only for sample, do nothing. I need only way to compile and use float or double and convert it to long or int.CLIPPER FLO1(){double nInt;double nDblR;nDblR = _parnl( 2 ) / _parnl( 3 );nInt = nDblR;MoveTo( ( HDC )_parnl( 1 ) , nInt, nInt );} I think you have to link the BCC 5.0 math library. Yes, you are right, linking MATHS.LIB its works. Thanks Enrico.-------------------------------------------------------------------------------- I had to reformat my computer's hard drive and I forgot to backup the Borland C++ 5.5.1 free compiler. Now I can't dowload it from the Borland's web site (don't know why).Does somebody know any other web site where can I download it ? I am able to download it from this link without any problems,<!-- m --><a class="postlink" href="ftp://ftpd.borland.com/download/bcppbuilder/freecommandLinetools.exe">ftp://ftpd.borland.com/download/bcppbui ... etools.exe</a><!-- m -->If you can't get it, I may email it to you.I got it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->) Thanks a lot. Remember you have to create these files yourself in order to get it properly running <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->BCC32.CFG ILINK32.CFG-------------------------------------------------------------------------------- Can anyone guide me what flags I should use with brc32.exe to compile C-code to make 16bit obj files for linking with FW/Clipper applications please? brc32.exe is not a C compiler, is a resource compiler. bcc32.exe is a C compiler but is a 32 bit one and can't compile in 16 bit mode (as far asI know). Thanks. I am sorry, I meant bcc32.exe but not brc32.exe. That was a spelling mistake.So, now I need to hunt for bcc.exe bcc -c -ml yourcode.C >errorc.logThnaks. I have bcc32.exe but not bcc.exe. I shall try to get bcc.exe. Meanwhile, if you can advise me where can I find if free, I shall begrateful You can get Borland C++ for FREE from:<!-- m --><a class="postlink" href="ftp://ftpd.borland.com/download/bcppbuilder/freecommandLinetools.exe">ftp://ftpd.borland.com/download/bcppbui ... etools.exe</a><!-- m --> This is bcc32.exe (32 bit) not bcc.exe (16 bit).Thanks. You are right. Can you please advise me where can I get bcc.exe (16bit) or how to produce 16bit obj files with bcc32.exe ? Sorry, I don't know. If I remember correctly, the old TurboC, that you can use to produce 16 bit OBJ for Windows (even if it is only a DOScompiler), has been released as free software.> or how to produce 16bit obj files with bcc32.exe ?I think that it is not possible.I have downloaded and installed. But the installation produced bcc32.exe only and NOT bcc.exe/ Can I not produce 16-bit .obj files with bcc32.exe? I could not find any help from the documentation about it. Any help please? ´ll have Bcc.exe(Borland C++ 5.01) and i can compile the files for youIs it not possible at all to generate 16-bit obj files with bcc32.exe?--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Canal Five Utilities-------------------------------------------------------------------------------- I'd like to get some feedback from anyone using CanalFive Grid. Can you do Excel type editing? Is it stable? Yes, it is and work fine. I tested the 2.0 w demo version to edit like excel a array of 5 columns and 10 rows without press enter to edit a cell. You must use the clause oGrid:lEditLine := .t. to edit like Excel I use fw195, clipper 5.2e and comix 3.0Thanks for the feedback. I'm looking at the demo now... I am using c5grid since a couple of years for some browsing. The essential feature is that it allows multiline browsing and editing. You can edit like excell, add bitmaps into headers. Too many coding to define a browse, columns, headers ... It is almost stable. A little buggy (Refresh problems) when they are few records in your database, specially when you delete records or append. As soon as you have more than one page browse, it's Ok.You only use it for some of your browses?<<Too many coding to define a browse,> columns, headers ...>>What do you mean by this?> It is almost stable. A little buggy (Refresh problems) when they are few> records in your database, specially when you delete records or append. As> soon as you have more than one page browse, it's Ok.>>Almost stable is not a good sign. I have a number of browse/grids where there is fewer records than will fill the browse, this could be a problem. Are they working to fix it? yes i only use it for very few browses where mostly i need multiline . I prefer standard fivewin browses much more stable. I will send you by e-mail a sample of a program using c5grid.How can you market a product when the default browse behavior is considered more stable? <g> I don't see many msgs concerning CanalFive grid, I though they had a newsgroup or forum somewhere... I have my problems with the standard browse as it is. The problem you mentioned with C5Grid I also have with standard browse. Thanks again and I look forward to your example, i need to buy the grid add-on to fivewin, last week we send you the credit card number and we don't receive anything from you. The name of my compagnie it's Multi-Spheres Informatique could you answer as fast is possible.-------------------------------------------------------------------------------- trying the evaluation version of C5Grid I hit several walls:1. In a dialog defined from resourses I can not set the focus to the tgrid control. Tab-key doesn`t work and adding oGrid:Setfocus() has no effect.2. I don`t what the menu which appears when I click on the grid control with the right mouse button. How can I avoid it?3. I use Comix and when C5Grid has to show a filtered database the first raws are frozen.C5Grid seems to be a great tools, or has anybody bad experiences? what I did:kDlg:bStart = { || kurzList:SetFocus() }kDlg:bGotFocus = { || kurzList:SetFocus() }> 2. I don`t what the menu which appears when I click on the grid control with> the right mouse button. How can I avoid it?take the source-code, change whatever you want and compile and link yourself> 3. I use Comix and when C5Grid has to show a filtered database the first> raws are frozen.//not only for ntx!!FUNCTION ntxpos()RETURN ordkeyno()many thanks for your answer. Everything works except the Comix filter. I useFUNCTION NtxPos()RETURN cmxkeyno()but the grid only works proper with SET ORDER TO 0-------------------------------------------------------------------------------- I have noticed that all CanalFive controls except CanalGrid ( because involves database functions ) are ready to be ported to FWH compatible ( 32 Bit ) ! Rene ? Sure !, in fact, since all the source code is included (in the most of the products), teorically if you are using Fivewin++ with Xbase++ you just have to recompile the sources for 32 bits and you are done. Same happends with C code (there only a couple of functions written in C), CanalFive provides you with the C sources in Borland C++ 5.0 the only thing you have to do is recompile it to be 32 bits compatible..-------------------------------------------------------------------------------- Atached to this post is a file that solves the problems with Canalfive Calendar, Canalfive Meter and CanalFive folders working with Fw2.2 and Fw2.3. After the changes with the Bitmap class, all CanalFive controls weren't working properly when displaying bitmaps. You have to link this obj prior the libraries and C5 Calendar, C5 Meter and C5 Folder will work with the mentioned versions of Fivewin.Regards, José Luis Sánchez C5BMP.OBJ--------------------------------------------------------------------------------
Boris Pekic - NG's archive
SCREEN CAPTURE and ClipBoard-------------------------------------------------------------------------------- Is it possible to do a screen capture in Fivewin 2.2c and then print thecapture ??? You may use <oWnd>:HardCopy( <nZoomFactor> ), where oWnd it may be a window, a dialog, or a control.or save the image to disk:DibWrite( "screen.bmp", DibFromBitmap( WndBitmap( <oWnd>:hWnd ) ) )I often do a SHIFT-PRINT SCREEN or a ALT-PRINT SCREEN.This is standard Windows stuff. Then the actual screen is in the clipboard.You can use Word and add some comments to the screen.Good! I didn't know that. It saves the active window to the clipboard while PRINT SCREEN alone saves the whole screen, right?-------------------------------------------------------------------------------- Has anyone taken clipboard bitmap data, and saved that to a file? Also, how do you know if the clipboard has a bitmap on it? Use this example :#DEFINE CF_BITMAP 2oClipBoard := TClipBoard():New( CF_BITMAP )oClipBoard:Open()hBmp := oClipBoard:GetData()oClipBoard:Close()hDib := DibFromBitmap( hBmp )If Empty( hDib )MsgInfo("I can't create Bitmap","I'm Sorry")RETURNEndIfDibWrite( cBmpFile, hDib )GlobalFree( hDib )DeleteObject( hBmp )Clipper 5.3b , Blinker 5.1 and FW23--------------------------------------------------------------------------------
Boris Pekic - NG's archive
CD ROM with FiveWin-------------------------------------------------------------------------------- Anybody got any routines that can open and then write to a CDR. Would be much appreciated. This is an old story.....a) Use easy cd creator with direct-cd tool .... direct cd is a tool who recognize the cd-rw (not cd-r) as simple drive/hard disk and can read/write/delete data from the cd...b) Use a cd-r program with script support. From your fivewin you can create the script with data (Files/Directory etc..) and then run the application trought winexec() function to start the session... hope this info to help you..-------------------------------------------------------------------------------- Download Zip Backup to CD by clicking here. <!-- m --><a class="postlink" href="http://www.dh.dk/zipbackup/download.htm">http://www.dh.dk/zipbackup/download.htm</a><!-- m -->--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Chart FX-------------------------------------------------------------------------------- Dear friends, I'm trying to use CHART2FX.VBX but I don't know how to set data. This is the code I tried:oVbx:OpenData( COD_VALUES, 1, 12 )oVbx:ThisSerie( 1 )FOR i = 1 TO 12oVbx:Value( i, i * 10 )NEXToVbx:CloseData( COD_VALUES )Any suggestions? Try this, works for me ! :// 1 serie, 12 values, values must be supplied as longoVbx:OpenData[ 2 ] := nMakeLong( 1, 12 )// Series are zero-based, so the first is 0, second is 1, // etc.oVbx:ThisSerie := 0FOR i = 1 TO 12// values must be double, that's why we use nDbl2Flt()oVbx:Value[i] := nDbl2Flt( i * 10 )NEXToVbx:CloseData[2] := 0Methods and instance variables are pretty well documented in ChartFx manual.-------------------------------------------------------------------------------- I tried to compile and link Chart2fx on the sample but it need this one: rcpp Where can I obtain it? Thanks for the info. P.S. I want to include a simple graph for my application. If I'm not wrong, it's part of the Microsoft Resource Compiler distributed with Win16 SDK. I found these files in my \clip5\bin-directory.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Check Boxes-------------------------------------------------------------------------------- I'm use resource define CheckBox, But, I can't change CheckBox caption!! Please, How to change? First you do :DEFINE CHECKBOX oChkBox VAR lVariable ID 101 OF oDlgLater:oChkBox:SetText("New caption") Thank you, already solution!! But, have other question, Hide CheckBox!! I try use oChk:Hide(), but, this method is not use!! How to Hide CheckBox?? If you want oChk:Hide() when first activate time Use with ON INIT oChk:Hide() oChk:Hide() works perfectly for me. Where did you put the call?I have been put this code to ON INIT oChk:Hide(), but....fail!! or, put to:DEFINE DIALOG....:DEFINE CHECKBOX ......oChk:Hide()ACTIVATE DIALOG .....and fail too!! CHECKBOX alway "SHOW"!! Why?? I will crazy.... tryodlg:bstart := {||ochk:hide()}-------------------------------------------------------------------------------- Somebody in the group are using 3 state checkboxes ? (defined in BWS) The ´checked´ state goes to .F. or .T. depending how many times the checkbox is ´clicked´ This is the technique I used:LOCAL oDlgLOCAL oChkLOCAL lVar := .F.LOCAL nVar := 2REDEFINE CHECKBOX oChk VAR lVar;ID xxx OF oDlg;ON CLICK nVar := oChk:SendMsg( BM_GETCHECK )...ACTIVATE DIALOG oDlg;ON INIT oChk:SendMsg( BM_SETCHECK, 2 ) CENTERThe value of nVar will be 0 - for not checked, 1 - for checked and 2 - for don't care state.-------------------------------------------------------------------------------- How do you change the label of a Checkbox when using a resource? The following doesn't seem to work?REDEFINE CHECKBOX oChk VAR lMyVar ID 101 OF aDlgoChk:cCaption := "This is new text"oChk:Refresh()ACTIVATE DIALOG aDLG Redefine CheckBox oChk1 .... blah blah blahActivate oDlg On Init oChk1:SetText( "Who's your daddy") Actualy you should use oChk:SetText( "whatever" ) but for some reason (I don't know if it's a WinAPI or FW bug) it doesn't work either. You would need to tweak TCheckbox class.-------------------------------------------------------------------------------- I want to create a listbox of checkboxs. I know it's possible (the windows has it, when we install the thing that come with windows). Is to possible in Fivewin ? If yes how ? Just use two bitmaps--one checked and one unchecked, then do an ON CLICK. See \samples ownerdra.prg for some examples of using bitmaps in listboxes.-------------------------------------------------------------------------------- Anyone has some prg with an example of using CHECKBOX? I am making a procedure to control all accesses in my system, but I didn't get any success with using this. Please, it's URGENT to me. I need to finish this system today. There are 32 sample files using checkbox in the fw\samples\ directory. What exactly is the problem you are having?I'm concluding a system and I have a procedure to manage all users and passwords. So, I need to put checkboxes in order to give to user thepossibility to choose which menu items will be available (using checkbox) and write them into a dbf. My doubts are about how to create all the fields in the dbf, if they have to be logical or character or just number. Second, how to control this in the clause ON CHANGE in the checkbox command. I am using Resource Workshop to create the dialog. The dialog is below. If you can help me, please... I do like this. I have 48 list of checkbox and break down into 3 part on a single field on my dbf using char as type. Each char evaluate and save as '1' or '0'. if '1' means .t., otherwise .f.So everytime I change something on the checkbox, I evaluate the codeblock to transform the locigal arrays (checkboxes - arr[1]-[48]) into '1' and '0' and save it on a single variable. Works fine with me. You have a very nice button... Are you using TSButton of Manuel Mercado??To Manuel Mercado, sorry if I haven't send my contribution yet. I found that mycard could not be use on International transaction like on the internet <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> . Ialready upgraded it and waiting for the approval of the bank. I will send it assoon as I received it. Western MT, here charges 35% of the amount beingtransfered to Mexico.The buttons were made here in my office by a Web Designer. I'm intending to put all these buttons on a class like TSButton. How can you put a self made button into the application ? (I also use Workshop ?)First you have to design two buttons. Example:You want to define the button NEW. So, you have to create the button in normal state and the second button as pressed (BMP files). After this, you must use Resource Workshop, in the option File, Add to Project and choose BMP files and choose each bitmap file. At this time you rename the button in the normal state as 1100, for example, and the other one, 3100. When you create the dialog, you can use Borland Button Style and in the ID you must put 100 and that's it! Any other questions, I'll be here. The checkbox is a logical field. You can translate this to whatever youwish, but why bother?I would use one record per user and one field per item.I'm not sure what you wish to control using the ON CHANGE command?If you are referring to controlling access to menus, etc. I would create a user class. Then you could use the database to create a user object which you can store as a static var in a function. Then you can do something like this:menuItem prompt "Edit" action ::edit() when user():lEditThis syntax may not be clear. The function user() returns an oUser object and one of the variables of that object is lEdit. Thus user():lEdit is thesame as oUser:lEdit. The reason for storing the oUser object in a function is that you don't have to pass it around or declare it as a public.That's exactly what I need. I solved the problem of my checkbox, and I'll put the idea to control all menus using your suggestion. I'll tell yousoon.What I need to know now is how to enable/disable a menuitem at realtime. Something like this:MENUITEM "&Edit" ENABLE | DISABLEThis is the command. I'd like to know how to put a logical variable that sees the user privilegges and enable/disable the menuitem according to the privilegge. Thanks again, Use oMenuItem:Enable() or oMenuItem:Disable(). MenuItem objects can be retrieved using oMenu:aItems instance variable. That is what this is (I did leave off something in my previous message):menuItem prompt "Edit" action ::edit() when user():lEdit==.t.When user():lEdit returns .t. the menu is enabled, otherwise it is disabled.That's what I want. I have already done now, but I didn't tried to use TSButton. I have downloaded this and I'll try.Would you like to tell me how to put this browse using Resource Workshop?-------------------------------------------------------------------------------- Dear friends, do you know how to make checkboxes and radio buttons transparent? You must go to th eSpanish forum and see all the messages of VAgner Sorry, I can't read Spanish... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Hi Enrico. There are the latest <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> files made by Vagner. TRCHKBOX.ZIP Many thanks, Toninho!-------------------------------------------------------------------------------- How to redefine the caption from an checkbox defined on an resource In the ON INIT Clause of the dialog:REDEFINE CHECKBOX oBox VAR ...ACTIVATE DIALOG oDlg ON INIT oBox:SetText("my text")Many Thanks.Btw, I think that this weekend I have the first Beta of Hbmake for windows-------------------------------------------------------------------------------- How to disable an checkbox already checkedIe: is I have FWH checkbox checked and i click on Minigui Checkbox to enable. FWH needs to be uncheckedMy code isREDEFINE CHECKBOX och var oMake:lFwh ID IDC_FWH of oDlg when (nOp=1 .and.nOp2<=2) valid Setfwh(@oMake,och) UPDATEREDEFINE CHECKBOX och1 var oMake:lCw ID IDC_C4W of oDlg when (nop=1 .and.nOp2<=2) valid Setcw(@oMake,och1) UPDATEREDEFINE CHECKBOX och3 var oMake:lmini ID IDC_MINIGUI of oDlg when nop==1valid Setmini(@oMake,och3) UPDATE oMake:lFWH:=.f.och:Refresh() oCh3:bChange := {|| If( oMake:lMini .AND. oMake:lFwH, oCh:Click(), ) }Does this line must be valid clause The codeblock "bChange" is the same than the event ON CHANGE. You have two ways to do this :The first one :...REDEFINE CHECKBOX oCh3 ...oCh3:bChange := {|| If( oMake:lMini .AND. oMake:lFwH, oCh:Click(), ) }...The second one :...REDEFINE CHECKBOX oCh3 ... ON CHANGE If( oMake:lMini .AND. oMake:lFwH, oCh:Click(), )... I am not sure if I understood you well, but I use the approach something like this: ... REDEFINE CHECKBOX oChk1 VAR lChk1 ON CHANGE Set_Others(1) REDEFINE CHECKBOX oChk2 VAR lChk2 ON CHANGE Set_Others(2) REDEFINE CHECKBOX oChk3 VAR lChk3 ON CHANGE Set_Others(3) REDEFINE CHECKBOX oChk4 VAR lChk4 ON CHANGE Set_Others(4) REDEFINE CHECKBOX oChk5 VAR lChk5 ON CHANGE Set_Others(5) ... FUNCTION Set_Others(n) *--------------------------- MEMVAR oChk1, oChk2, oChk3, oChk4, oChk5 MEMVAR lChk1, lChk2, lChk3, lChk4, lChk5 lChk1 := .F. ; oChk1:Refresh() lChk2 := .F. ; oChk2:Refresh() lChk3 := .F. ; oChk3:Refresh() lChk4 := .F. ; oChk4:Refresh() lChk5 := .F. ; oChk5:Refresh() DO CASE CASE n == 1 lChk1 := .T. oChk1:Refresh() CASE n == 2 lChk2 := .T. oChk2:Refresh() CASE n == 3 lChk3 := .T. oChk3:Refresh() CASE n == 4 lChk4 := .T. oChk4:Refresh() CASE n == 5 lChk5 := .T. oChk5:Refresh() ENDCASE RETURN NIL Hope I understood you weel and this might helps-------------------------------------------------------------------------------- It seems that checkbox have no readonly possibilities. They do in a sense. When disabled (either by oCheckbox:Disable() or "when .F.") they can't be changed, but they do turn gray. What you might have to do (not tested) is to modify the new method to take nstyle as parameter, and exclude BS_AUTOCHECKBOX from it.Thanks Alex, i found a workaround using the WHEN clause.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Fivewin Classes-------------------------------------------------------------------------------- I first use CLASS code writing my source code.When I write about Button CLASS appear Error Info below:Method ReButton()Redefine Button ::oMainBut[1] ID 600 of ::oDlg ....Redefine Button ::oMainBut[2] ID 601 of ::oDlg ..........RETURN nilIf it will add in my source code, it will appear Error Info below:Error Objects/6 No Exp Method TBUTTON:DEFCONTROLIf it will not add in my source code,it will run,but not use Button option function. Do someone have any idea or suggestion for me? You have to define u method in this wayClass myclassMethod myMethod()....EndclassMethod myMethod Class myClass.....RETURN-------------------------------------------------------------------------------- I have implement new internet function to Wininet.prg those function are: ( SYLNET.ZIP )InternetGetConnectedStateInternetAutodialInternetDialInternetHangUpInternetAttempConnectIn the zip file you have Wininet.prg, Wininet.H (all predefined value for flag), Sylint.prg the samples who test all function. I comment as most as possible each new function in the Wininet.prg, please be aware that some function need specific version of explorer and are also ocumented.The next step will be the implementation of secure FTP HTTP connection VIA InternetExplore OLE OBJECt ! Have fun !-------------------------------------------------------------------------------- When I test samples\TestOut.prg and close this file,it will appear error message.This error message already appear from FW195sp5.But FW2.0a not fix it.Do someone else offers or suggestion it?Help Change hBmpPal with hBitmap in method destroy()-------------------------------------------------------------------------------- I have having a strange problem with the TFTP class that is based on WinINet.DLL. I am doing something like thisFunction Getfiles()oInternet := TInternet():New()oFTP := TFTP():New( cFTPIP, oInternet ,cUser, cPassword)aFiles = oFTP:Directory( "out/*.out" )SysRefresh()nFiles := 0for n = 1 to Len( aFiles )SysRefresh()if aFiles[n,2] > 0aFiles[n,1] := left(aFiles[n,1],at(chr(0),aFiles[n,1])-1)hTarget := FCreate( aFiles[ n,1 ] )oFile = TFtpFile():New( "out/"+aFiles[ n, 1 ], oFTP )oFile:OpenRead()SysRefresh()while ( nBytes := Len( cBuffer := oFile:Read( nBufSize ) ) ) > 0FWrite( hTarget, cBuffer, nBytes )SysRefresh()endFClose( hTarget )oFTP:DeleteFile("out/"+aFiles[ n, 1 ])oFile:End()nFiles++endifnextendifoFTP:end()oInternet:End()When I run this on Win 98 if there are files it retreives them and deletes them and any more calls to the function return no files. When I run it on NT 4.0 the files multiple calls to the function keep returning the files and they are downloaded but never deleted until I exit the program and then the calls to the function show no files? It is almost like NT 4.0 buffers the session and until you exit the application does it actually update the FTP site??? Any ideas, experience or help would be greatly appreciated!*I posted a message last week about the TFPT class not returning the correct directory information running under NT 4.0. I have found the problem and I wanted to pass it along. In the Directory() method you need to pass a parameter to theFtpFindFirstFile(::hFTP,cMask,@cBuffer,INTERNET_FLAG_RELOAD,0)where the define is#define INTERNET_FLAG_RELOAD 2147483648 // 0x800000000What was happening is each FtpFindFirstFile() was returning the same directory from cache instead of going out the FTP server and getting the actual directory. I was doing a directory deleting the files and then logging back on an doing another directory but the directory was returning the contents from the first one even though the files were deleted. If you force it to "RELOAD" then you always get the correct information.-------------------------------------------------------------------------------- Eu preciso executar um comando quando ocorrer um DoubleClick sobre um ítem da árvore. I need to execute a command when to occur a DoubleClick on an item of the tree. Try this: ( NEWTREE.ZIP ) thanks for the feature ACTION(...) - thats one part I looked for. The other part is this: How would you create a treeview if you dont know the structure of the tree in advance. Think on a patient in a hospital. All the tests on him are in databases. Now you query the dbf´s an find:Endoscopie - Gastoscopie- DtaeColoscopia - DateCardiologie - Coronarographie - DateEchocardiographie - Date1Echocardiographie - Date2ECG - Date1ECG - Date2and so on. You put all the informations in an array and then you create the teeview. The ACTION or ON CHANGE method has to show in a second window the result of the test. Has anyone done this? I dont like to invent the wheele....-------------------------------------------------------------------------------- New version of TTXTEDIT CLASS with REDEFINE for DIALOG usage and enhancedfunction ::Save, ::Load and ::Paintyou can download it from <!-- w --><a class="postlink" href="http://www.htcsoft.freeservers.com">www.htcsoft.freeservers.com</a><!-- w -->-------------------------------------------------------------------------------- Does anyone know of any RTF class for use with fivewin? All advice and comments welcome Test attach. ( TESTRTF.ZIP )gracias, your code works fine and is exactly what i´m looking for. Do you have also a editor-prg for formatting your plain ascii ({negritas}, &cursivas!, [subrayado].)? Under Dos i used "CLTEXT.LIB" as a Editor for my memofields. The formating is done by char(0)-char(32). Now i´am looking for a similar solution under fivewin. Here is what I found in former news: ( CLRTF.PRG ), ( RCHTXT10.ZIP )-------------------------------------------------------------------------------- I'am new to use the database object. For display of a 12 month o a year, I use a FOR-NEXT loop but how to do it with ObjectsDbf : omzet1, omzet2, omzet3 ... omzet12Odbfklant = all OK that works.ONLY THE LOOP IS A LITTLE PROBLEMfor i = 1 to 12jaar1 = "oDbfklant:omzet"+alltrim(str(I))REDEFINE GET &jaar1 ID (2990+i*10) OF oDlgnext How about make a function for your problem Now your Codefor i = 1 to 12jaar1 = "oDbfklant:omzet"+alltrim(str(I))REDEFINE GET &jaar1 ID (2990+i*10) OF oDlgnextNew code for youfor i = 1 to 12ReGet ( nI, oDlg )nextStatic Function ReGet ( nIDPlus, oDlg )Local = "oDbfklant:omzet"+alltrim(str(nIdPlus))REDEFINE GET &jaar1 ID (2990+nIdPlus*10) OF oDlgReturn NIL This code is not working ? Not for the nI in the loop. Just remove the "n" from "nI", but is not enough....Do this :for i = 1 to 12ReGet ( i, oDlg )nextStatic Function ReGet ( nIDPlus, oDlg )Local temp = "oDbfklant:omzet"+alltrim(str(nIdPlus))REDEFINE GET &temp ID (2990+nIdPlus*10) OF oDlgReturn NIL Sorry <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Almost My code use nI when Using FOR NEXT loop Please modify nI to i-------------------------------------------------------------------------------- Class TBitmap - Method VScroll / HScroll - Case nWParam == SB_THUMBPOSITION is not active. Can anybody help me to activate it ? Here the tipscase nWParam == SB_THUMBPOSITION::nX = - nLParam * (::nXExtra()+If(::oHScroll:nMax!=0,GetSysMetrics(3),0)) / ::oVScroll:nMax::Refresh()::oVScroll:SetPos(nLParam) -------------------------------------------------------------------------------- Just a general question. Is anyone thinking about or perhaps want to collaborate on a FiveWin Class for XML-1. format/write2. read in as data3. convert to HTML4. display as FiveWin tree-view5. sub-class for external sources, i.e. Excel/Oracle Stan - great idea. Actually, I would want something that is SIMPLE - conceptually simple to create/change/maintain -> yet as powerful as xml can be. Additionally, I see it as a method for fivewin and harbour to communicate with java and other data-based systems as WELL as direct web page usage. This means that we MUST go beyond the level that, for example, the rtf class went. Finally - by helping, I'll have learned even more about xml, I'm certain. Let me know -> I'm doing things java as well as fivewin and am interested!=) -Jim I'd be interested in making GX write out XML for reports. Count me in! A good starting place for the 'big picture' is probably <!-- w --><a class="postlink" href="http://www.odi.com/excelon">www.odi.com/excelon</a><!-- w --> and I have seen several Java scripts for parsing Oracle Tables into XML. I am specifically looking at taking a given FiveWin Table (dbf, I assume) and writing a Standard DTD (Data Table Definition) to output to XML and or import from XML/ASCII. Years and years ago I worked with a guy here in Raleigh to generate CDF's Complete Definition of Fields) for Clipper and I later used it in FiveWin with something I posted called Winparse. A CDF was an ASCII file likeID |C| |10| |0| substr(cRec,27,10)where ID=field name followed by Field Type,Length,Decimals, and parsing 'code-block'. Not a big deal, but I think the same principle as one would need for XML. You would need to add definitions for Data, Export Translations (i.e. would date be exported as YYYYMMDD or MM/DD/YYYY, logicals as -1=True, 0=False)I am hoping that perhaps a group of us could come up with a DTD format, then a generic 'class' to read/write and associate DTD's with tables. Then this class could be sub-classed for say Oracle (so that rather than restricting the Field Type to C,N,L,D,M you could account for Blob or TimeStamp). Right now, just an exciting prospect, so excuse my babbling. I will be seriously working on this by mid-December, as our Company may need to provide select 'call detail' (grouped information on how calls terminate) to major carriers. We have already received requests for Excel.Access,ASCII, EMI,and even XML. Thanks for your interest - more to come-------------------------------------------------------------------------------- I am having a strange problem when using the TPages class. Right after I have saved my resources (.DLL file), and recompiled the application, the dialog using the tpage control loads correctly. However, If I reboot the computer, and try to load the same dialog again, the application goes into an error, with thefollowing error message:ApplicationPath and name: C:\PCWIN\PC.EXESize: 1,833,600 bytesMax files handles permited: ( SetHandleCount() ) 150Error ocurred at: 03/12/1999, 15:36:25Error description: Error FiveWin/3 Cannot create Dialog Box:Resource: ClienteStack Calls===========Called from LOCKERRHAN(0)Called from (b)INITHANDL$(0)Called from CREATEDLGE(0)Called from TDIALOG:ACTIVATE(0)Called from CAD_CLI(485)Called from (b)LISTCLI(34)Called from TWBROWSE:LDBLCLICK(0)Called from TWBROWSE:LDBLCLICK(0)Called from TWBROWSE:HANDLEEVEN(0)Called from WINRUN(0)Called from TMDIFRAME:ACTIVATE(0)Called from MAIN(1138)System======CPU type: 486Hardware memory: 30464 (29 megas)Free System resources: % 92GDI resources: % 93User resources: % 92The same occurs when I try to load the program thought the network. What can be wrong? Try adding the following to your startup code:hBorland := LoadLibrary( "BWCC.DLL" )and then:FreeLibrary( hBorland ) in your exit code.Someone in this NG has figured out how to run controls from resources without requiring BWCC.DLL, maybe they can chime in here and explain how it is done. I am not using Borland custom controls, yet for some reason, my programs won't run without loading the DLL.I have included the suggestion, and now everything works fine. Thank you very much! In the meantime, I discovered another anomaly, which occurs if you do not load the librady BWCC.DLL: The dialogs using the TPages code only runs if you load Borland Resource Workshop, what, perhaps, loads anything into memory that allows the program to "find" something. Perhaps the use of the BWCC.DLL library should be better explained in the help files, the samples, and in the Fivewin manual. I believe that many people are having the same problems that I did.>The dialogs using the TPages code only runs if you load Borland Resource>Workshop, what, perhaps, loads anything into memory that allows the program>to "find" something.This is because Workshop loads BWCC.DLL into memory. Only one copy of a DLL is loaded into memory at a time. If a program requests a DLL that is not already loaded, then it is loaded and the counter for that DLL is set to 1. If the DLL is requested again by another program then the counter for that DLL is incremented by 1. When the first program that quits and requests that the DLL be unloaded, the counter is checked. If it is greater than 1, then the counter is merely decremented by 1. If the counter is 1, then the DLL is unloaded.>Perhaps the use of the BWCC.DLL library should be better explained in the>help files, the samples, and in the Fivewin manual. I believe that many>people are having the same problems that I did.Granted it should be. You might find some useful information in my "Introduction to FiveWin" article available on the FiveWin pages of my web site at <!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott">http://ourworld.compuserve.com/homepages/jbott</a><!-- m --> It has some information about BWCC.DLL. I quit using bwcc.dll some time ago because it caused me too many problems. A lot of weird problems went away when I quit using it. I just don't use any borland controls. If you have one borland control in your .dll then you need bwcc. I don't recall if it something in the STYLE line or what but you can probably edit your .rc file in an editor and do a search for Bor or BS_ in the style. None of the standard controls are borland, only the custom ones I believe.-------------------------------------------------------------------------------- More than once i read in this NG about changing the CLASSES ? What should be done with a changed class, and how ? Is it something like changing a function in clipper.lib ? Marc, I think the ng means change the FiveWin classes. As you probably know, FiveWin is heavily based in Objects, the object engine of FiveTech. A class is the base of Object oriented programming. A class is a template where you derivate or create objects. Usually you never touch the code in a class, you derivate a new class from a existing one, a process called inheritance and then add the new features to the new class This process have nothing to deal with the Clipper.lib. There is an introduction to FW OOP article on my website (see below).James Bott <!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott">http://ourworld.compuserve.com/homepages/jbott</a><!-- m -->here is part II of the introduction located ?? Sorry, I haven't written it yet. There didn't seem to be enough interest to warrent it.-------------------------------------------------------------------------------- I have created a class as of the class TBUTTON called TBDESP I have preceded 8 parameters before of the nIdMETHODReDefine(nTipo,cCampo,cExquie,cRutina,cRutf4,cExaminar,cCacebera,cCaja,nId, bAction, oWnd, nHelpId, cMsg,;lUpdate, bWhen, bValid, cPrompt, lCancel ) CONSTRUCTORThen within method transfer 8 parameters to variable of instance as makes it the class original TButtonMETHODReDefine(nTipo,cCampo,cExquie,cRutina,cRutf4,cExaminar,cCacebera,cCaja,nId, bAction, oWnd, nHelpId, cMsg,;lUpdate, bWhen, bValid, cPrompt, lCancel ) CLASS TButtonDEFAULT oWnd := GetWndDefault(), lCancel := .f.::minTipo = nTipo // Tipo de desplazBut upon executing leaves this Error .Error description :Error Objects/6 No Exp. Method: TBDESP:_MINTIPONow if variable use static to the beginning of the program and I collect the value when there is 2 bellboy of this type both have the same values. Which is the solution Have you definedDATA minTipofor your new class? If you haven't already read it, I might suggest that you read my article "Introduction to OOP using FiveWin" on my website (see below). I'm not exactly sure what you trying to do. To create a subclass you need to do it this way:create class TBDESP from TBUTTONvar minTipo // any new ivars must be defined heremethod redefine constructorendclass// Initialize any new vars here, then call the parent method (super)method ReDefine(nTipo,cCampo,cExquie,cRutina,cRutf4,cExaminar,;cCacebera,cCaja,;nId, bAction, oWnd, nHelpId, cMsg,;lUpdate, bWhen, bValid, cPrompt, lCancel )::minTipo := nTiporeturn super:redefine(nId, bAction, oWnd, nHelpId, cMsg,;lUpdate, bWhen, bValid, cPrompt, lCancel ) // call parent>Error description :Error Objects/6 No Exp. Method:> TBDESP:_MINTIPOYou get this error because you didn't define mintipo as a new instance variable. You must define any new instance vars in the class definition. Also, you cannot pass these new vars to the parent class because it doesn't know them. Note also that you cannot use the command syntax anymore, you will have to use OOP syntax:oBtn:= TBDESP():new(...)-------------------------------------------------------------------------------- I am trying to compile and run the "TSmtp with socket RASDial" sample I download from this news group. But, I need TReg32 to do this. There is no authors name in these files so I don't know who wrote it. If anyone could help I would appreciate it. This class comes with fw 1.95 and only works with this version or newer.-------------------------------------------------------------------------------- I've created a class that contains a Database-browser in a Window. It opens a database-object, a standard buttonbar, some messagebar-stuff, and a standard popup-menu. All I have to do is to call the function with the name of a dbf-file, and the standard behaviour like navigation, switching indexes, seeking, filtering,... goes quite well.I've included the possibility to modify the standard behaviour, like fonts, columns ( width, freeze, bitmaps,... ), header, footer, ... via items in an associated ini-file. So far so good.I thought to alter via the same way the behaviour of a button in the buttonbar by naming a function, that is outside the class-object itself, in the ini-file. This function should be compiled at runtime, instead of the build-in standard behaviour, but the only thing that's wrong is that I don't know how to give a reference to the window-object itself in that function. I need this reference since all the data of the dbf are contained into the class-object itself ( I need the so-called "Self" ). Can anyone help me ??? Suppose your app have "test.ini", your class reference is ob, and prototipe of the function SomeFunc(ob)[some]show = SomeFuncThen you call from the button ACTION DoThis(ob)Procedure SomeFunc(ob)ob:ShowMessage("tralala")return You may be interested in my "Introduction to OOP using Fivewin" article available on my web site. James Bott <!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott">http://ourworld.compuserve.com/homepages/jbott</a><!-- m -->-------------------------------------------------------------------------------- We have discovered something about Fivewin Objects that we didn't know.oBj := MyObject():New()for i=1 to len(oBj)Msginfo(oBj[i]) // display all properties including inheritancenextoBJ[5] := "test" // assign 5th propertyAeval(oBj,{|aval,x| oBj[x] := NIL }) // NIL out entire ObjectAn object can be treated like an array. Properties can be set and viewed by their index order? Does must mean that no Object can have more than 4096 properties? Knowing this we can scan the object looking for a certain property without knowing the name of it? There are probably other possibilities as well. Has anyone taken advantage of this feature? There is also function, getDatas( oObj ) that returns an array containing all the objects properties.>Does must mean that no Object can have more than 4096 properties?I would offer, that an object that complex probably needs to be redesigned perhaps breaking it down into several smaller objects.>Knowing this we can scan the object looking for a certain property without>knowing the name of it? There are probably other possibilities as well.>Has anyone taken advantage of this feature?I haven't thought of a good use for it yet--other than object inspection for debugging. There is an object inspector somewhere in the sample code that you can link into your application for debugging work. I have done that before. Yes, this is very useful if you do not know the properties (methods and data vars.) But if know the physical names you can call the properties by the names.--------------------------------------------------------------------------------Error in TPrinter Class?I use a sentence like this one :oPrn:CmSay( 1.0 , 1.0 , cName ,oFont , 20)(syntax : <oPrn>:CmSay( <nRow>, <nCol>, <cText>, <oFont>, <nWidth>, <nClrText>, <nBkMode>, <nPad> ) )If I understand well, this should result in printing cName with a maximum length of 20 cm. But if the cName is printed with its full length, even if it is longer than 20 cm. What can I do to just print the first 20 cm of cName ? Thank you very much in advance. The cmSay() method in turn calls Say() method. But if you look at the code, nWidth is not ever used, so it won't work anyway. Maybe we need to check the TextOut() funcion there to see if it accepts a nWidth param. I made the following changes to my 1.9.1 version of TPrinter:Say() method:METHOD Say( nRow, nCol, cText, oFont, nWidth, nClrText ) CLASS TPrinterlocal aRectif oFont != niloFont:Activate( ::hDCOut )endifSetbkMode( ::hDCOut, 1 ) // transparentif nClrText != NILSetTextColor( ::hDCOut, nClrText )endifif nWidth == nilTextOut( ::hDCOut, nRow, nCol, cText )elseaRect = { nRow, nCol, nRow + oFont:nHeight + 10, nCol + nWidth }ExtTextOut( ::hDCOut, nRow, nCol, aRect, cText )endifif oFont != niloFont:DeActivate( ::hDCOut )endifreturn nilThe API ExtTextOut() cut the printing outside the given aRect. We decided not to use ExtTextOut because it slowed the report considerably, BTW Enrico's way maybe the right solution. Please try to use Enrico's code and I will highly appreciate your feedback in case we can include it on Fivewin next release.-------------------------------------------------------------------------------- find attached a ZIP with a new class to make rounded TGroup groups. You can set what controls you want to see "transparent" inside the box and which not. See the images. ( RGROUP.ZIP )-------------------------------------------------------------------------------- Just to save you Time ! Be aware that if the Socket is in WSAEWOULDBLOCK state and you call the METHOD END() .or. CLOSE() of the class Tsocket you will go in an infinite loop in the Method End() or Close(). And the Closesocket will Never occured nor the Wsacleanup and probably the Application will Crash !There is 2 workaround:1- Always check Osocket:lsending before calling those method2- Remove the While ::lsending from those method--------------------------------------------------------------------------------When i observe my EXE, i found there is a string TFOLDER, TPRINT, etc, but I am definitely sure that I did't use any of that classes. Is itonly a string or the class it self? If yes, why these classes linked-in even though I didnt' use it? How to avoid this? All the classes and functions are contained in the Fivewin Libs. Maybe you dont use them, but they are inside those libs.They dont produce any harm, but increase the space of your EXE. Maybe you can try to extract those modules with LibrarianUtilities from Borland, like Tlib and others.-------------------------------------------------------------------------------- Can someone tell me what the INLINE function stated in a class realy does ? and how it works ? INLINE just lets you create a method in the same line as you define it:class TCustomermethod boo inline msgInfo("Boo")endclassThis above is the same as:class TCustomermethod booendclassmethod boomsgInfo("Boo")return nilThnx James for the explanation !but what if i make a class with the new as constructor but i want to activate it at a sertan point with letst say doit in my experience in the execution of doit() i cant retrieve the data likeDATA 1.........DATA 5METHOD New( 1,2,3,4,5 ) ConstructorMETHOD DoIt()nTemp := ::1 + ::2 / ::5cTemp := ::3 + ::4It gives me an object message errorso to activate it an retrieving this parameter i have to pass the objectmade with new eg oTest := Ttest():New( 1,2,3,4,5 )DoIt( oTest )Method DoIt( o )Then i can retrieve o:1 etc.there must be another way couse now i have to work with inline to pass some known datahope this make some sence I'm sorry, I don't understand what you are trying to do. Can you put together a small sample program that shows the problem?-------------------------------------------------------------------------------- oMemo:There is a method On Change that is evaluated every time there is a changein a memo. Is there also a possibillity to detect a movement of the cursor. Have you tried with bKeyDown or bKeyChar code-blocks? Eventually you can trap cursor movement inside HandleEvent() method, I think.I have tried the bKeyDown mehod and it works. I can execute a function on arrow down left and so on. But what I want is that de cursor also goes down or up,left and so on.Now the function is called but the cursor stays on the same place.I think I will have to learn to work with handleEvent(). I hope the sample dir contains enough examples. Try sending a WM_KEYDOWN message with the appropriate VK_* as second parameter inside your bKeyDown code-block or using SetPos() method to move the cursor position. Or it could be enough returning NIL (not zero)from bKeyDown.Yes this works fine. Pheraps after you call yourfunction() you return 0 (zero) from KeyDown(). To continue Fivewin perform standard behavior (moving cursor) after that you should return (nil)-------------------------------------------------------------------------------- It looks like nobody other has troubles with the DbCombo class.Perhaps anyone could tell me how to interpret the following lines from myerror.logError description: Error BASE/1070 wrong argument: ==Args:[ 1] = U[ 2] = NStack Calls===========Called from TGET:DESTROY(0)Called from TGET:DESTROY(0)Called from TDBCOMBO:DESTROY(0)Called from TDBCOMBO:HANDLEEVEN(0)Called from DIALOGBOX(0)Does this mean that my app crashes when trying to destroy a second get-object?I don't know where to search this second get. I don't have FW 2.2c and don't use dbCombo, but try to get a look at TGet:destroy() (in tget.prg) and see what this method is trying to compare since the expression on the left is nil. Then try to trace that value down the call stack.thanks a lot for jumping in. Unfortunately the method TGet:Destroy() doesn't take any parametersI think the cause of my crash is that the destroy method is called two times. ( i don't know why 2 times ? ).The second call of course then gets an undefined value <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->You said that you don't use TDbCombo. Could you tell me what you use instead? I use a lookup table system I designed a long time ago with a friend. I assign a bitmap inside the get that in turns launches a dialog with a browse of the dbf, allowing the user to choose the code, as well as search and add/edit the table. I attach with this message the corrected file to use.Sorry for any inconvenience. (Ignazio Ortiz) window.ZIPmany thanks for your quick reaction. Now the dbCombo is destroyed without crash.-------------------------------------------------------------------------------- Can anyone tell me how to use the getminmax method to control sizes of some dialogs. I believe it only works on Windows, not Dialogs, but of course I could be mistaken.I've only used GetMinMaxInfo on Windows and it works pretty neat.-------------------------------------------------------------------------------- I need made my personal ::Paint() Method for TGet, but when I declare it, none appear in my gets. I need help, please. This is only a test, but don't work. Why ?METHOD Paint() INLINE Super:Paint()METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0 One simple solution could be to add something like this in the Paint() method of TWindow class:if ::aControls != nilAEval( ::aControls, { | oCtl | If( Upper( oCtl:ClassName() ) == "TCOMBOBOX", oCtl:Display(), ) } )endifGreat Enrico, but no work like I need:I need draw an box inside each get of an dialog. If I use:METHOD Paint() INLINE ::Box( x, y, x1, y1 )METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0The box is displayed, but the get don't display his buffer...If I use your hint, the box is displayed, but, if I open other small dialog inside first dialog, when I close the second dialog, the boxes in this region are cleared.I don't understand why I can't use Display(), Paint() methods, like a lot of classes use ( ex: splitter class )... Uhm... I think you can't draw a box *inside* the client area of a GET. You have to create a non-client area.> I don't understand why I can't use Display(), Paint() methods, like a> lot of classes use ( ex: splitter class )...Sorry, I don't know exactly why... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->Ok. I think that I need make my personal TGet class. My intention is make skins for fivewin, I have implement skins in buttons and combobox, like windows XP style, but I need implement in TGet, radio and checkbox. Please, see attached picture. I was looking in the FGet class and have some ideas... Hey, that looks GREAT!! Is this a FiveWin app?Yes it is and is running in a windows me <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> I'm try to make skins with five. There are a har job, but I have somecontrols, like buttons, working fine. The problem is with TGet that don't use ::Display() and ::Paint() Methods...Lets go to work! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> If you are trying to create down arrow buttons within the GET then you need Ricardo Ramirez's (<!-- e --><a href="mailto:rramirez@landatech.com">rramirez@landatech.com</a><!-- e -->) TBtnGet. His website is:<!-- m --><a class="postlink" href="http://www.landatech.com">http://www.landatech.com</a><!-- m -->You may find a copy on his website (I can't tell because it seems to be down right now). Ricardo is travelling right now, so it may be a couple of days before you hear back from him if you email him.No. I don't need TBtnGet. I need draw a box inside client area of my gets, but the box is don't displayed...The problem is that TGet or TBtnGet don't uses :display(), :paint() methods. I don't know why... have you tried to create a box control belonging to the get? That is, ..... OF oGetYes its works, but my intention is redefine all style get, replacing 3D standard box of an get to my style box, to simulate the box displayed by windows XP. If you look the picture attached previous, you are see that I have success with buttos, folders and comboboxes, but the get... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> I've never try it, but IMO you have to handle the WM_NCPAINT msg. Try to write a msg handler for TGet... This info is from Win32s.hlp: WM_NCPAINT An application sends the WM_NCPAINT message to a window when its frame must be painted. WM_NCPAINT hrgn = (HRGN) wParam; // handle of update region Parameters hrgn Value of wParam. Identifies the update region of the window. The update region is clipped to the window frame. Return Values An application should return zero if it processes this message. Remarks The DefWindowProc function paints the window frame. An application can intercept this message and paint its own custom window frame. The clipping region for a window isalways rectangular, even if the shape of the frame is altered. See Also DefWindowProc, GetWindowDC, WM_PAINTThanks Jose, I'll try. Try by sending the box painting on the ON PAINT clause of ACTIVATE WINDOW (or DIALOG)ACTIVATE DIALOG oDlg ON PAINT Your_DrawBox()Or:odlg:bPainted := {|| Your_DrawBox() }I think that is no a good idea because I neet the repaint automatically. Remember that my intention is made skins (see previous picture).PS: I have a complete set of tsbrowse for harbour working, but with some problems. Do you have fwin for harbour to we finish this work ? I am now starting my work with FWH and the main task will be to make TSBrowse Harbour compatible. Please send me what you have done, it'll be a great help.-------------------------------------------------------------------------------- there is an error on talbum class with fivewin 2.2c Some has corrects this error :C:\errori\album>blinker fi prueba, album, CES @\fw22\include\fivewin__ __(«») («») BLINKER DOS Extender and Windows Linker 5.10___ Blink and you'll miss it !!Copyright (c) Assembler Software Manufacturers, Inc. 1990-99All Rights Reserved. Serial # BR-056596. Fax (804) 784-2357.BLINKER : 1115 : ALBUM.OBJ(ALBUM) : 'PBMPHEIGHT' : unresolved externalBLINKER : 1115 : ALBUM.OBJ(ALBUM) : 'PBMPWIDTH' : unresolved externalBLINKER : 0 Warning error(s), 2 Fatal error(s)PRUEBA.EXE (not created) (0.7 seconds)C:\errori\album>if errorlevel 1 goto exit This is extract from Whatsnew.txt in Fw22c:* Important change: In order to turn FiveWin fully compatible with 32 bits architecture, we had to replace Class TBitmap's hBmpPal use with a two new DATAs hBitmap and hPalette. This should not break any of your existing code, except on those places where you may be accessing hBmpPal directly. Simply replace hBmpPal for hBitmap and it will be ok. Also notice that pBmpHeight() and pBmpWidth() no longer exist, and must replaced by nBmpHeight( hBitmap ) andnBmpWidth( hBitmap ) calls.-------------------------------------------------------------------------------- Everyone,At long last I have published Part II of my "Introduction to Object-Oriented Programming Using FiveWin" article. You will find a link to it on this page:<!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott/program.htm">http://ourworld.compuserve.com/homepage ... rogram.htm</a><!-- m -->Comments welcome.James Bott Good work! Only a note:> According to OOP principles of information hiding, you should hide> any data and methods that are only needed for internal use of the> class.Actually, OOP principles say that a class should only have hidden data. It should only offer "services" implemented as methods and never show implementation details to the client code (that is the code that uses the class). In one line thanx for the fine contribution wich will help me ! and i'm convinced a lot of others 2. This is what we needed thanks a lot for your oop introduction. It reads very interesting a gave me lots of new insights to oop with FiveWin.I got curious about your tdata class and tried the demo version. Unfortunately test05.prg does not run ( missing test.dbf ).In test04.exe there is sopmething strange. If after double click I modify the name of a customer and say ok,after I can't click on lines below this customer and the record remains at it's old location even if after editing it should appear as logical last one.Perhaps I'm doing something wrong?> I got curious about your tdata class and tried the demo version.> Unfortunately test05.prg does not run ( missing test.dbf ).Actually, test05.prg wasn't supposed to even be in the zip. Further, it wastest03.prg that was calling the missing test.dbf.> In test04.exe there is sopmething strange. If after double click I modify> the name of a customer and say ok,> after I can't click on lines below this customer and the record remains at> it's old location even if after editing it should appear as logical last> one.You spotted another problem here. I had forgotten to initalize ::lAdd to .f. so it was appending a record.My apologies for all the problems. I have just uploaded a new version of TData.zip containing all the fixes and also the very latest version of TData itself. Hopefully everthing is working now.Please download the new version and try the sample programs again.-------------------------------------------------------------------------------- As I can modify the label of the TGROUP control ?oGroup:cCaption: = " New title " or oGroup:SetText("New title") does not have effect. You have to make sure you call ::SetText after the dialog has been activated, or nothing will happen, ieDefine Dialog oDlg ....Redefine Group oGroup Of oDlg...Activate Dialog oDlg On Init oGroup:SetText( "whatever" )-------------------------------------------------------------------------------- I build testfget.prg from \fw22c\samples and when I try to execute it it freeze at startup can someone confirm that building and executing testfget on his FW2.2c version work !If so I'll search my problem ! ;-( Fivewin 2.2c Clipper 5.3b Blinker 6.0The problem is with the TEXT.DBF and TEXT.DBT file that came with Fivewin even the one that are in Fivewin 2.3 are corrupted ! You're right !, some kind of problem is with the packed version of FGET that comes with FiveWin.Anyway you can download the latest version of the FGet from the "father of the baby" website Ramon Avendaño.<!-- m --><a class="postlink" href="http://personales.mundivia.es/rar/SOBREFW.HTM">http://personales.mundivia.es/rar/SOBREFW.HTM</a><!-- m -->Look for the link to the FGET class and download the latest version (along with other nice controls).-------------------------------------------------------------------------------- Has anyone a sample of the TS SyncChild Method ??? It is supposed to synchronise 2 browses. I have not heard of anything like this.Just use the bSkip codeblock of the parent browse to skip and redisplay the child browse. What SyncChild() method does is to evaluate one or several code blocks (as many as "child" browses you have), every time the row changes in the main browse.Here a little sample:Lets suppose that you have a main browse with customers names and two "child" browses, one which shows the customer due balance and other which shows the transactional history of the refferenced customer.Defining the browses:REDEFINE BROWSE oMain ALIAS "Customers" OF oDlgADD COLUMN TO oMain TITLE "Name" DATA Customers->NameREDEFINE BROWSE oChild1 ALIAS "CustBalances" OF oDlgADD COLUMN TO oChild1 TITLE "Invoice" DATA CustBalances->InvoiceADD COLUMN TO oChild1 TITLE "Date" DATA CustBalances->DateADD COLUMN TO oChild1 TITLE "Balance" DATA CustBalances->BalanceREDEFINE BROWSE oChild2 ALIAS "CustHistory" OF oDlgADD COLUMN TO oChild1 TITLE "Transaction" DATA CustHistory->TransactionADD COLUMN TO oChild1 TITLE "Date" DATA CustHistory->DateADD COLUMN TO oChild1 TITLE "Import" DATA CustHistory->ImportbBlock := { | oChild | oChild:SetFilter( "CustCode", Customers->CustCode ), oChild:Refresh() }oMain:SyncChild( { oChild1, oChild2 }, { bBlock, bBlock } )And, that's all, every time the row changes in oMain, the child browses will be automatically set to show the proper data.In this little sample I'm using ntx indexes, but you can also use cdx with scopes then, in the code block, you have to set the scopes. I hope this help you.-------------------------------------------------------------------------------- I was just looking over my XBase++ 1.7 documentation and noticed a class called oThread. This allows youto open an additional thread and run an app in. Is this available in Fivewin? If you try to run an application from another application is a new thread by it self...i guess oThread is something else...as i can imagine ... oThread create a new session and assign a job to do ... for example to copy a file with out stop your application from runningfor example in C++ i wrote a web server ... i start a new thread for every new connection, so if the remote user request something the server does not stop all other jobs ...there is a limit on threads you can open only 2048 threads in one application but you can increase it by decrease the stack size ( default is 1M per thread ). Not yet, but you can use a timer to do certain background processes. How can I use threads with FW? Where can I find some examples using threads? You can't - FW is 16bit.-------------------------------------------------------------------------------- Toutlook Class - Is ther such a thing? FW 2.3 has a nice TOutlook class with a lot of fancy improvements. We are not (YET) upgrading to FW2.3 for some economic reasons. As you can see, our company sales drop to a huge percentage. If we recover, I may able to justify an upgrade.-------------------------------------------------------------------------------- When doing:redefine group oGRP id 800 of oDLG color "N*/W"the color-clause will not be used. Same with a self defined group.What can I do ? In GROUP.PRG there's::SetColor( nClrText, nClrPane )::SetBrush( TBrush():New( "NULL" ) ) // Debe ser transparente [byHernan]Remove SetBrush() call and colors will work again.-------------------------------------------------------------------------------- Inc(), Dec()Does anyone have an example of using these methods? It the data type your using is either numeric or date, simply do a oGet++ or oGet-- To increment or decrement the value of the variable assigned to the TGet object For example, to use the PLUS and MINUS keys to change a date dDate := Date() Redefine Get oGet Var dDate Picture "@D" ; Spinner // (*) this will do the same as bKeyDown, only using a spinner oGet:bKeyDown := {|nKey, nFlag| ; // method overloading in action: If( nKey == VK_ADD, oGet++, ; // "+" pressed [TGet:Inc()] If( nKey == VK_SUBTRACT, oGet--, Nil ) ) }; // "-" pressed [TGet:Dec()] (*) Assumes you have the Vertical Scrollbar attrib check in your dll/rcThanks, I've tried this and it doesn't seem to work. I modified the keydown method of tget to call ::oGet:inc() and that didn't work either, no exported method. What version of FW are you using? I have 2.1c and works just fine. This feature must have been added around FW 2.0-------------------------------------------------------------------------------- am trying compile btnget in FW and FWH :IN FW :CLIPPER BTNGET\FWCAL /N/M/A/WCLIPPER BTNGET\Btnget /N/M/A/WCLIPPER BTNGET\Btndown /N/M/A/WBCC -c -ml -O2 -G -B -I\wk_fw\_inc -oGetbtn.obj Btnget\getbtn.cTlib WLIB3_16 -+fwcal -+btnget -+getbtnIN FWHharbour BTNGET\Btnget.prg /n /i%Fwhdir%\include;%Hdir%\include/oBTNGET\Btnget.Cbcc32 -M -c -D__HARBOUR__ -I%Hdir%\include -oBTNGET\Btnget.OBJBTNGET\Btnget.Charbour BTNGET\Btndown.prg /n /i%Fwhdir%\include;%Hdir%\include/oBTNGET\Btndown.Cbcc32 -M -c -D__HARBOUR__ -I%Hdir%\include -oBTNGET\Btndown.OBJ BTNGET\Btndown.Cbcc32 -M -c -D__HARBOUR__ -I%Hdir%\include;%Fwhdir%\include -oBTNGET\Getbtn.OBJ BTNGET\Getbtn.Ctlib WLIB3_32.LIB -+btnget -+btndown -+getbtnThis is correct ??? I use the attached makefile for BCC5.5 to build TBtnGet32.libI hope this help MAKEFILE.DATRicardo, thanks, and to fivewin 16???? Sure, here is TEST.LNKwhen i compile getbtn.c i receive the error :Error : unable to execute command 'tasm.exe'.i am using borland c 5.2 (bcc.exe)BCC -3 -c -ml -O2 -G -B -Tq -I\wk_fw\_inc -oGetbtn.obj Btnget\getbtn.c Could you explain to me why each BCC modificator in your statement ?Why -B ? (compile via assembler ?????)Why -Tq ? (assembler option ??????)Why -oGetBtn ? (it isn't necessary)i am using make provide by ricardo ramirez, he´s using this modificator.... Erase the -B switch, that must work-------------------------------------------------------------------------------- I am new to fivewin and don't konw how to subclass an existing class .HOW TO CREATE A CLASS FROM EXISTING CLASS OR SELF CREATED CLASS ?AND IS THERE ANY EXAMPLES ? You can find a lot of samples on the SAMPLES directory. Keep in mind that many of the FW classes are inherited from TWindow or TControl (even inherited from TWindow). This inherits from the FILEBASE class. It compiles in either Fivewin/Clipper, or Harbour without FiveWin.I think it's an older version from a few months ago, but should compile ok.*****************************************************************************/* Optional output file for the Cellular Automata class */#INCLUDE "Common.CH"#ifdef __HARBOUR__#include "hbclass.ch"#else#include "FiveWin.Ch"#endifCREATE CLASS CAOutFile INHERIT FILEBASEDATA cChar INIT "." PROTECTED // Default output character for two-color modeDATA nWidth INIT 500 PROTECTED // Default line widthMETHOD New( strFilePath )METHOD SetChar( cChar )METHOD GetChar()METHOD SetWidth( nWidth )METHOD GetWidth()METHOD EndLine()ENDCLASS//--------------------------------------------------------------------//METHOD New( strFilePath ) CLASS CAOutFileDEFAULT strFilePath TO "WhatThe.TXT"IF File( strFilePath )FErase( strFilePath )ENDIFSuper:New( strFilePath )::Create( strFilePath )SetChar()SetWidth()return SelfMETHOD SetChar( cChar )DEFAULT cChar TO "."::cChar := cCharReturn SelfMETHOD GetChar()Return ::cCharMETHOD SetWidth( nWidth )DEFAULT nWidth TO 500::nWidth := nWidthReturn SelfMETHOD GetWidth()Return ::nWidthMETHOD EndLineFWrite( ::Handle, Chr( 13 ) + Chr( 10 ) )Return Self There are two articles on OOP programming using Fivewin on my website:<!-- m --><a class="postlink" href="http://ourworld.compuserve.com/homepages/jbott/program.htm">http://ourworld.compuserve.com/homepage ... rogram.htm</a><!-- m -->-------------------------------------------------------------------------------- I am so sorry to send this mail.My English is poor. I just want to know some questions that is my doublts for long time.AND until now nobody hadtalk about that. Maybe nobody knows that except original author! but I believe that someone have the ideas about that, right?The question description :Why The "MAIN()" is FiveWin program's main entry? and Fivewin how to direct the windows message on to theo:HANDLEVENT() method, I had studied the book "WINDOWS++", I know the "subclassing" with the c++ but I don't know how does "c" function "GetWndProcess()" access the clipper's object method in FIVEWIN?In "WINDOWS++" I know that THE class "WPApp" has one method "Main()". If FIVEWIN's main entryfunction is the same as this Main()?Could someone answer me these questions? Many many .... thanks! > The question description :> Why The "MAIN()" is FiveWin> program's main entry?It may be Main() or simply the first PRG start function. The name is not important. The application entry pointis routed to the PRG start function.> direct the windows message on to the> o:HANDLEVENT() methodWhen the windows procedure gets a message, it locates the related Clipper object to such window, and jump fromC level to PRG level.Many thanks for your answer!But I still don't understand What does means "jump from C level to PRG level" ?Does C program can call the PRG program?How to do? Could you teach me? For examples with pesudo code or any other else.-------------------------------------------------------------------------------- I'm trying to use the trichedit class. It seems like the class in not included with the fw libs. I get an error from the linker stating that trichedit() is an unresolved external. So I tried to compile the .prg but there is an ambigous reference: "COLOR_BTNFACE'. Anyone using the Richtext class has an alternative or solution to this problem? All the COLOR_xxxxx constants are in wcolor.ch. So just #include this file....Thank you Luis. That was wcolors.ch not wcolor.ch but I was able to compile it with your help. However, I now have a new linker message related to the trichedi.prg source file: "resetchrf" : unresolved external. I seethe function being used, but not declared anywhere. Any more ideas? Sorry, don't know what that function does or where is it supposed to be located. Luis, parece que te contaminaron, no creo que ese sea tu nombre FUCK YOU SPAMMER !!!! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->)))))))))))) Mi querido hermano metio mano a mi PC así que disculpas al foro. Class TRichEdit only works with Harbour and FWH. It is a Windows API limitation.-------------------------------------------------------------------------------- Hello, I am very interested in using TDBF but like other single languagechallenged people I can not read the history.txtWell thanks to the web translators I converted the history.txt to an Englishsyntax.I use the word convert because I did not translate it.I hope this is helpful to the community and my apologies to the what I mayhave don to the Spanish language. HISTORY.ZIP--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Clipper Errors-------------------------------------------------------------------------------- This is the story,Long time ago we began to have error 667, for that reason we decided to change all STATIC variable for class DATA. We have 1 class for eachmdichild of our app and we have a general class oApp for all variable we need for all the execution. The 331/332 problem was caused because all DATA of the class will NEVER be destroy, we was thinking that leaving this program and closing the child window released all stuff that we don't need anymore (wrong assumption). Remember that our APPLICATION try to go over 16 meg, after adding a codeblock to our window to assing those DATA to nil and adding to the TWINDOW class method DESTROY the EVAL of our codeblock the 331/332 dissapear(we also have a memory(-1) to issue the garbage collection of clipper) and the memory used by our app is under 3 meg.But there is still one major question, if it's the way OBJECTS work, we will have to clean up ALL standard classes of Fivewin to released that memory, because we are still loosing some memory after all those modification and looking to Logstatics() it's all DATA that consume that memory, and adding some DATA assignment to nil we regain that memory not all but a major part of it, it's sure that some STATIC of those classes can't be removed but why not the DATA ?. I think it will be a good programming technique to RELEASED ALL unnecessary information from memory. George there must be 2 reason why you didn't have this problem:1- You never used class DATA for your static2- Or you used it but you released it to !In our application mdichild with over 100 controls (if we count static text control) is really common, that's why our application was bombing so rapidly. For now, I have sent all necessary information to Antonio to see what they will do with the standard class of Fivewin. I don't know if it's our lack of knowledge about how OBJECT works in Fivewin but I was really surprised to see that killing and object never released is DATA section ! I hope it will help other fivewin user in the futur !If you want to see snapshots of our app that will be release on september you can go to <!-- w --><a class="postlink" href="http://www.logava.com">www.logava.com</a><!-- w --> and click on AVANTAGE VERSION WINDOWS (it's a french site) if you want to see the real picture size click on it ! > 1- You never used class DATA for your static> 2- Or you used it but you released it to !Number 2 is the correct answer. I can open all the MDI child windows in any of our programs without going even up to 2 MB (depending of the amount of the controls). Then close everything and get back about 97% of the memory used. And again what happens with the other few % I do not know.Now we know why you didn't have that problem, because using DATA for your own static and releasing it manually was the solution, be we wasn't aware of that.>>Then close everything and get back about 97% of the memory used.>>And again what happens with the other few % I do not know.The few %I remaining are DATA of the Fivewin class you used ! There was 1 array that will remain in memory and gow up until you used all class needed(If I'm wrong it will be a pleasure to know it), but logstatic give me that information. Since class data is shared by all objects of the class, i.e. those already created and also those still to be created, I guess it makes sense that that data will hang around retaining its last assigned value forever................, unless you manually assign nil to it. Are you keeping track of the number of objects and then assigning all the class data to nil only when the last object of each class is ended ?????????, or how are you doing it ???? I wander if there is a function to dynamically unload/destroy a class, i.e. the opposite of .....nClassH=_ObjNewCls(_AsStr_(<ClsNam>) [,_AsFunc_(<SupCls>)] [,\{|| _AsFunc_(<MoreSuper>)\} ] )[extracted from objects.ch] That would solve the problem..............................When you create an object, Fivewin create an Image on the original class, it's not creating a reference to the original DATA of the class that's why when you issue END(), that's mean you don't need that Image anymore, why not DESTROYING those DATA that you don't need anymore, not the STATIC variable of the class but really the DATA zone for this object only. Destroying those DATA of one object don't disturb ANY other object of the same class with is own DATA. Really don't know if this kind of function exist, Antonio can give us the answer to that one ! thanks very much for your info! Now, I'm changing all my class to delete all DATA at end of use.-------------------------------------------------------------------------------- I wonder I never so this Clipper difference:Public cAnyVar..Function MyFunc(cLocalVar)cAnyVar :=MYFILE->MYMEMO // a memo FieldcLocalVar :=MYFILE->MYMEMO? Valtype(cAnyVar) // Return "C"? Valtype(cLocalVar) // Return "M" I think you have to use Type() with Public and Private Vars. -------------------------------------------------------------------------------- I have been trying to determine the status of the 332 error and have not seen a straight forward solution. Has anybody come up with a solution to this problem. There is a lot of history to this problem................... and many mesages in this newsgroup about it. Some people have been plagued by it and many other not. I would search this newsgroup and related ones ........ In my case I think I got 332's due to having too many clipper objects hanging around in momory at one time. I solved my 332 errors / got them under control as follows:* I converting from Clipper 5.2e to Clipper5.3B (Rev 338). This turned out to be very easy to do, I thought it would be a lot more difficult becuase we were using comix and clipmore with 5.2e, but they are effectively fully included in standard 5.3b.Clipper 5.3b probably has better object memory management as it would have needed it with the extra object stuff that was added to it in that version.* Before changing to 5.3b I experimented heavily with 5.2e and ALLOC.OBJ and OM_TEXT.OBJ from 5.3B which helped a lot......* I use blinker5.1 (provides 64K +-extra static space) and the latest FW2* I went thru a looootttttttot of trial and error and headachesI re-coded certain "very heavy object intensive" folder programming code toa) store fewer clipper objects at one time andb) to only create objects when they were needed* We fixed some code that was storing certain objects unnecessarily in a higher calling module without us realising it.* NB Remember, just because the visual dialog (window and related controls) has been ended / destroyed / no longer exists, this does not mean your clipper objects relating to that dialog no longer exist. They could well be hanging around using memory due to bad / incorrect programming style. Objects relating to a visual window and related windows controls should only be stored in variables created in the the routine / class that creates the visual dialog (not higher up), so that they automatically loose scope and release their memory when the visual window / dialog ends.* You need to carefully check your code to ensure your top level code /classes are not storing objects that you think are destrtoyed but are in fact still in memory* If your app uses MDI windows, you may also need to issue a few memory(-1)'s via a timer every (say 60 seconds) after closing a MDI window to release memory. We needed this, you may or may not, I think it depends on your coding style, but it is worth a try.* Watch your memory consumpation (by dbl clicking the bottom message bar) as you open and close many windows repeatedly. You will get a feel for whether clipper objects are beiong released properly. I think a lot of the above depends on your programmong style.................................... I have had similar problem with 332 errors. In Clipper .NG file there is an explanation, that this is memory problem. It is proved that very large arrays and large strings can be the rason of this problem. Especialy if there are large arrays and strings at the same time in program active. As .NG stated, it is good practice to create neccessary arrays or strings every time we need them, rather then keep them alive all the time until the next use. They don't say if there should be another reason for this error. I solved my problem by following this .NG statements.As far as I know I am doing this. After I use my large Array I am issuing the statementArray :={}Would this be the correct way of initializing the array after use. If the array is a LOCAL variable I think it would be better to leave tothe garbage collector the responsibility of deallocating the memory.-------------------------------------------------------------------------------- I saw your message in the CLC NG about R6003 error on PIII 500. Is this a pure clipper exe or it is done with FW ? As far as I know, the problem with fast processors doesn't appear with FiveWin app, I have several apps running on PIII 500 and now with AMD Athlon 700 and the run very good. I have had the problem only with Clipper / DOS apps. I supposed so, but I decided to ask.... It has got something to do I guess with Function Main in C lang - Clipper DOS and Function WinMain in VC++ for Clipper FiveWin, which is actually very nice. The problem is with Catools 3 the wait_tic function of that lib ! WE already have __wait_4.obj linked in our app and it seem to crash 80% of the time at startup. And the problem is only with AMD and CYRIX not INTEL. I'm waiting for my new AMD 500 mhz computer to made test. I'll try __wait_b from blink inc to see if it's better ! We have a standing rule with our clients ... no Cyrix processors, and no older AMD CPU's. The problems are so numerous we won't try to modify the code. We had one company with massive data handling problems. Interestingly, the data was not corrupted when stored, but it certainly appeared that way when displayed on the screen or in a printout. We did tests ... showing the client the problems with the Cyrix processor in, then replacing only the processor with an Intell CPU, and seeing that everything was perfect. We swapped back and forth several times, and the results were totally consistant. We then left the Intel chips in, and never had another problem. Thereafter, whenever we have someone with Cyrix chips, they just call the one company, here the test results, and replace their CPU's, resulting in no more errors. I already know that Cyrix an AMD aren't good, But the problem is that our software is sold by 350 VAR in we have over 20,000 of installation and it's very difficult to know when people change their computer and once they have change it the want us to solved the problem, with AMD 400 and lower there seem's to be no problem (if you're not on a network setup and the AMD or Cyrix is the server). Personnally I prefer Intel for sure but you know how customer's are !;-) Anyway, I appreciated your comment it is always wellcome ! I have seen this problem on PII 366, so it is not only on CYRIX and AMD. Can't you remove that CAtools..... No we can't remove tools III we use to much finction of it in our DOS version. With __wait_4 there is no problem on PII 366 I have a PIII 450 from intel here and I'm running the software with no problem ! BTW, I contact IBM to know if they are welling to send me for a short time period an Aptiva with AMD 500 mhz for testing purpose, we will see ! It's a pure clipper 5.2e app, It our DOS version of our accounting package there is no PROBLEM with our FW app !-------------------------------------------------------------------------------- I have an older clipper-prg and today it gives me the M 6104 error only on clients-computers. With my 500MHz computer it run ok. Can anybody tell me a workaround for this error. Can you describe this error? I have quite extensive documentation about Clipper and its errors, but I haven't find the reference for this error. Can you describe in what part of program this error occurs, or in what situations?. It is not neccesary that some matematical operation causing this error of course, but I would like to know if you can detect in WHAT KIND of situation an error comes up. Be more specific if can. This error can be very annoying. Is there any network connected computers in your clients where your application is running? Maybe one of them in the network is veeeeeery old one? Or one of them has corrupted memory in some segment? Does the error occurs every time the program comes to certain point, or it occurs occasionaly? Did you do some unusual matematical operations when the error occurs?I have found today, that this error came from novell-3.2 and it is not a hardware-error. I have changed all hardware parts!The error-msg is : run time error M6104 : mathfloating point error : overflowBut this error is created only from one program in his first loading phase and it came on the first working-day in 2000. I have run today a new upgrade for novell 3.2 and the clib-patch but no good news. The same program is running in the 1999 with the same hardware-software-configuration with no problem! I have another server with the same novell-upgrading and with this server no problem. I think, i must setting the novell-system new from ground?!-------------------------------------------------------------------------------- Sometimes, I got this kind of error :i.e. SETKEY(0) Unrecoverable error 667: Eval stack fault.I need to enlarge my stack capacity. In my link-file I use right now :STACKSIZE 12500HEAPSIZE 8500I already tried STACKSIZE 25000 but then I already got the error when starting my program. Does anyone now how I can maximize my stack ? I use FiveWin 2.0a, Clipper 5.3b and Blinker 5.1. I have a Pentium III 500 Mhz with 128 MB RAM. It seems there is a recursivity problem: Setkey calls Setkey ....., if not then try to increase your stacksize a little.-------------------------------------------------------------------------------- Please, can anyone tell me what I need to do to maximize my stack capacity ? I need to open at least 10 windows behind each other but after the sixth or seventh I always got a eval stack error. PLEASE HELP ME. Thanks a lot in advance.What are your current settings?My Stack Size is 9600 And heapsize is 16500 and I have no problem anytime when opening many windows Please Test it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> If you increase the stacksize on your link file, then you are reducing the space for static vars, etc. So as we said normally do not stack to many dialogs and do not abuse of static vars. BTW if you use the Natmsg file I attach with this message which does not consume any memory of Clipper you can highly increment your stacksize up to 1.5kb more. ( MSGENG.OBJ ) This problem does not happen with Fivewin++, nor with Fivewin for Harbour. Can you give us more info on this obj file? Can it be used with clipper 5.2e? 5.3b? What exactly does it do? Do we NEED it? By default all C compilers put string literals and static vars in the same DGROUP segment that CA-Clipper. To avoid this problem programers can create static far vars for every string literal they wrote in their code or use a switch that moves those literals to a diferent segment. You probabily heard about a Clipper utility called DGPIG created by Michael Devore (Causeway linker) which report the consumption of DGROUP on every module inside a library. With that programa you can check that module NATMSG on clipper.lib consumes more than 1.5kb because all the string literals are saved on the DGROUP segment and the magic of that new OBJ file is that moves all the string literals to another segment. The new OBJ file is created by Matteo Baccan and you can find all the code on Blinker 5, for example and since I did not find any copyright on the source code I guess there will be no problem if I post the files in this forum to.-------------------------------------------------------------------------------- Hi ... can anyone throw some light on this one... When compiling with RMAKE 1.4 using Clipper 5.2e and FiveWin 1.9.2 libraries, I get the following:Error Rmake/R2001 - FiveWin.CH (943) Fatal C3048 Preprocessor Table OverFlowI am using a P100 with 24Mb RAM and Windows 95. This is happening on programs that previously compiled without any problem. I am fairly certain it's not hardware related. I had the same problem. I went into my FIVEWIN.CH and blocked out a few things that I am not using.// #include "ODBC.CH"// #include "DDE.CH"// #include "VIDEO.CH"This is obviously not the best solution, but it may help until a better solution is found. You can also try to break down any big PRG into 2 smaller PRG files.What I ended up doing is to implement two FIVEWIN.CH files - the full blown version in the linked program files and one with REMed out #Includes in the main calling program. Many thanks for your contribution. use your RMAKE.EXE to write a batch-file for compiling and linking this (normally) works without changing on header-files. It happens , when your source .prg is too large, or you have not enough memory in the DOS Box. Use HI CLIPPER.EXE (This loads clipper in high memory) From my experience using lh clipper will allow clipper to go on but the preprocessor errors still happen.-------------------------------------------------------------------------------- My stacksize and heapsize are set in the linking script like this :stacksize=17500heapsize=2500But I regularly got the error : Unrecoverable error 667 : Eval stack fault I tried many other settings. The best result I got with the settings :stacksize=18500heapsize=500Which settings are the best to be able to use a maximized stack ? Thank you very much in advance for any help. we saw that sometimes 667 error aren't real stack errors you can fix changing stacksize/heapsize, but simply a "brutal" hand-made source code mistake. The system, for some reason, is unable to write correctly the error.log file and give you this problem. Try to put some msginfo() steps in order to understand where you get the error, I believe you will see that it's your fault. Our starting rule here is: "it's always our fault!". In this way, we find and fix 99% of "strange" errors (that, naturally, were our fault...) However, we saw there aren't perfect stacksize and heapsize values; for example for our main procedurevalues are :stacksize=9500heapsize=1024every other value doesn't work. But in other procedures we have different values... Personally, I usestacksize=16384heapsize=4096with my FW 1.9.1. Thanks a lot to anybody who answered to my question. Meanwhile I tried several settings myself and I got the best results with :stacksize=18650heapsize=500Strange, isn't it ?-------------------------------------------------------------------------------- I've some problems with Internal Error 5333. I'm operatin with Clipper 5.2d. The error doesn't happen every time in specific line of my program. Do you have any idea? What should I do to solve it? Update to Clipper 5.2e - it is way more solid. Check your heap and stack in your link file. Are you using blinker ? What version ? What indexes do you use (CDX, NTX or...)I'm operating with Clipper 5.2e + Fivewin 2.0c and Blinker 4.1 using CDX indexes For example:If I redefine more than 15 gets, the error happen. Can you understand it? How many is a great number for stack? I'll try grow up my stack, ok? I am using a stacksize of 12000 and a heapsize of 8192 My app is quite big and some of the dialogs read much more than 15 gets without problem. I'm using blinker 5.1 Have you tried to recreate your cdx indexes ? I have an app which in one part of it has a dialog in which are 5 folders. EACH folder has 86 GET's and 12 SAY's and 12 Comboboxes! Everything works OK I'm saying this, because I think it's not the problem in numbers of GEt's in your app.My stack = 17500, my heap= 4096According to internal errors docmentation, check the following:a. If you are using any 3th party library other then Clipper's and FW, try without itb. Try to use Clipper 5.3xc. Try to use Blinker 5.xThat's all the documentation states and suggests about internal error 5333 Hope you'll find a solution... It also says make sure you are providing the get with the correct data type!-------------------------------------------------------------------------------- I have written a program quite some time ago and it is running fine, I'm using Clipper 5.2e, Six Driver 3.0, Fivewin 2.0 and Blinker 4.1 but after updating the patches 1 to 21 and recompiled my program. The above message is appearing, it only happen after the program have being running for one or two hours. I'm totally lost, please help. Can we take a look at your blinker script ? Heap and stacksize. You Probably have to increase the values.This is the original setting from FW 2.0 that i'm using right nowstacksize 9500heapsize 2048I have try increasing it tostacksize 12000heapsize 4096Worse, it can't even start running. The message appear straight away. Any other suggestion? I have try putting Memory(-1) on some critical area and it helps, but maybe for another hour or so and it happen again. What else is in your script ? Some blinker commands do this type of staff. Do you have any procedure depth command ? Can you email your script ? The error is probably in there. You could also link with the mpar.obj that we all use for clipper but i don't know if it's compatible clipper 5.2 (e) and blinker 4 I've retrofitted the mpar fix to 5.2, and it does work. Hopefully it'll work for you / this problem.This is how my link script look like:file TESTfile PIXELfile SIXNSXfile MPARBLINKER INCREMENTAL OFFBLINKER EXECUTABLE NODELETEBLINKER EXECUTABLE EXTENDEDBLINKER EXECUTABLE COMPRESSMAP A,SPACKCODEPACKDATADEFBEGINname Testdescription 'Test System'exetype Windows 3.1code moveable discardable preloaddata preload moveablestacksize 9500heapsize 2048segment 'PLANKTON_TEXT' nondiscardablesegment 'EXTEND_TEXT' nondiscardablesegment 'OM_TEXT' nondiscardablesegment 'OSMEM_TEXT' nondiscardablesegment 'SORTOF_TEXT' nondiscardablesegment 'STACK_TEXT' nondiscardableDEFENDNOBELLLIB Five, FiveC, ObjectsLIB WinApi, Hartafw, Six3LIB Clipper, Extend, Terminaloutput TEST.EXE I took a look at clipper 2 error messages. And they say for this error 650 increase stack size in rtlink (Blinker for you). My app runs for hours at users site and my script is as followsStacksize 12000heapsize 8192Try to get rid of the blinker executable extended to see if it makes a change. I join my link script. Hope it helps. I don't see other stuff.-------------------------------------------------------------------------------- Can You tell me solution for error_OBJCLSINS (0) Unrecoverable error 332: String/array memory overflowWhere can I find it FW 2.2c, Clipper 5.2e, Blinker 6.0, Mpar.objI found a solution i Norton Guide error statement descripsion because it is 'typicaly' Clipper error This is typical Clipper 5.2e error because of failure in dealing with virtual memory. This problem most probably won't appear if you useClipper 5.3b. It took me a long time to trace this back without satisfactory results.My very advice : Use Clipper 5.3b which has a much better memory management. If you love your 3rd party libs which are not compatiblewith 5.3b ( like SIx ) go for another tool.-------------------------------------------------------------------------------- I developed for a Customer a FW application that works in conjunction with a DOS Clipper prg (Cl53 + blinker 5), launched on a server from a PC client through ANSI emulation (telnet).The problem is that when the DOS program is running, the CPU of this server is 99 % busy, creating troubles to other applications in the network. I heard that is possible to decrease the priority (and CPU usage) of Clipper-DOS programs at link time or something else, but I don't know how : anyone can help me ? Link this OBJ with your DOS program. DOSIDLE.ZIPthank for Your help, I tried to link DOSIDLE.OBJ but CPU is still 99% when DOS-Clipper prg is running.May be I make some other mistake somewhere ... Try to link oslib ( search at oasis) to solve your problemcan You give me more detailed info how/where can I find this lib ? Here it is!<!-- m --><a class="postlink" href="http://www.the-oasis.net/">http://www.the-oasis.net/</a><!-- m -->Thanks David ! I agree with Pedro, use OsLib.You can also find it here<!-- m --><a class="postlink" href="http://www.davep.org/clipper/oslib106.zip">http://www.davep.org/clipper/oslib106.zip</a><!-- m --> Another solution for your problem:Nanfor LIB. (oasis)This function most use like this:FT_ONIDLE( {||FT_IAMIDLE()} )Both function belong to NANFOR.LIB-------------------------------------------------------------------------------- What does this error (after linking) mean and how can it be rectified:'ERRORSYSW(CLIPPER530)'I am using MS Link / OptLink and Clipper 5.2e.I read in the NG's for FW192 and FW195 that there is a library called 501-520.LIB but this library is nowhere to be found.Is this missing library the key to the problem and - if so - could someone please email it to me,If this is not the problem - please help! You don't need the lib you mention. It's only for poor souls using Clipper5.01.In you case, my bet is that you have a module in you app that was compiledwith Clipper 5.3.If you don't have access to the source code of such module in order to recompile it, or if you're pretty sure this is not the case, add a dummyfunction in your main .prg:Function Clipper530Return Nil-------------------------------------------------------------------------------- I'm getting the following error:Error description: Error DBFCDX/2006 Corruption detected: Corruption detected in memo-file;In Function: FlexGetMemoData;On Line: 1200 Can anyone help me in solving this error. I remember this error (or one like that) and its probably you use clipper 5.3 and there are one problem with FPT (memo files with DBFCDX rdd) that have a size less than 1Kb, incredible but true.I resolved with this trick before open the file/*Para reparar el bug de los FPT en 5.3*/FUNCTION CHECKMEMOBUG(cDataBase,cDATAPATH)LOCAL cBuffer, cMemofileLOCAL aDATA,nSize, nHandleDEFAULT cDATAPATH:=DATA_PATHcDATAPATH:=ALLTRIM(cDATAPATH)+"\"cDATAPATH:=STRTRAN(cDATAPATH,"\\","\")cMemofile := cFileNoExt(cDataBase)+".FPT"IF File(cDATAPATH+cMemoFile)aDATA:=DIRECTORY(cDATAPATH+cMemoFile)nSize :=aDATA[1,2]IF nSize < 1024cBuffer := Replicate(Chr(0), 1024-nSize)nHandle := Fopen(cDATAPATH+cMemoFile, 2)Fseek(nHandle, 0, 2)Fwrite(nHandle, cBuffer)Fclose(nHandle)ENDIFENDIFRETURN NILThanks very much for your reply Bingen !!!I'am going to use your function from now on, this really saves me a lot of work.It looks like that (in my case) these FPT memo files that have these errors are made/maintained by DBFCDXAX (ADS database server).DBFCDXAX works well with these memos, but DBFCDX not. Maybe an other workaround is to put at least one character in every memofile, but I did not check this allready.-------------------------------------------------------------------------------- I already knew that clipper has problems with round() but i never think that the same was aplied to INT ()Try to sum the 4 records to a var in the TT.DBF . dbf attached it returns 908.If you make ?int(var) it returns 907.Is there any explanation to this( the work around i know , int(val(str(var)) returns 908 ok)If anybody use int() in you programs be careful with misterious returns. That's not an INT() problem. It's the old well known floating point approximation problem. If you add SET DECIMALS TO 15 and SET FIXED ON to your test program you will see that the numbers involved are approximated. They are not what they look. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Try to make with dclip utility what you said (fixed on and so on). If my field dec is 2 and the i sum the field matematicaly its impossibe tohave more that 2 decimals with value. What's "dclip"?> If my field dec is 2 and the i sum the field matematicaly its impossibe to> have more that 2 decimals with value.I think you haven't undestood what I said. You can't have absolute precision with floating point values. You see 1.23 but the value storedcould be, for instance, 1.222222222229 or 1.230000000001. You have to round your totals (not to truncate them) if you want to approximate to acertain number of decimals.I presume if i have a field with 14.2 .and. a value stored of 5.25 it's not 5.25 .. anything.I thought that a field with a len and dec specific rounds automatically when i store de data in the dbf.If i understand you are saying that a value stored in a dbf cant be or not be rounded ?By the way dclip.exe(by riger donnay) its a utility to maintain DBF's files. No, I'm saying that once you assign that value to a floating point variable it could not retain its original precision. And when you laterapply some calculations to it the results could be different than what you expected. This is my variation of a function to fix Int inaccuracy by Phil Barnett in theOasis:// Fixes quirk in Clipper's Int()#define FIX_QUIRK 0.0000000000000005Function FixInt( nVal, nLen, nDec )Local lNeg := ( nVal < 0 ), cValDefault nLen := 19, nDec := 0cVal := If( lNeg, "-", "" ) + ;AllTrim( Str( Abs( nVal ) + FIX_QUIRK, nLen, nDec ) )Return Val( cVal )-------------------------------------------------------------------------------- Sorry.... is almost a Off Topic, but it goes here!In the network one of our client, an error appears with certain frequency when:- one user works in our system and the program in screen is left "idle" (without using), and when trying to work with him, it aborts with thismessage, or- of random way, completely at random, in a middle to be processing anything...Reading the NG of Clipper 5.3, I understood that this can have an origin in communication in the network. This client used hub of 10 Mbts for his network, but change recently to a swich of 100 Mbts. (changing the Network cards too to 100 Mbts).I do not know if this it is the problem, but if somebody has experience would be welcome the advice, because really I am almost crazy with this...It is something that I have to take into account for swich use? They are not possible to use a swich or is of delicate use?For sure the problem is from network, because running the system in the server (it is not dedicated) the problem does not arise, and yes it happens in ALL the terminals... everything is well, and suddenly it is not communicating with the server.Thanks anticipated for help, is your client using screensavers? I had nearly the same problem and it flew away by disabeling any screensaver. Which OS is on the Server ?If it's NT,W2K,XP the problem you have it's the Autodisconnect Feature of those OS you can change this behaviour. I give you a URL to see how you can change this behaviour !<!-- m --><a class="postlink" href="http://www.winguides.com/registry/display.php/194/">http://www.winguides.com/registry/display.php/194/</a><!-- m -->--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Clipper Versions-------------------------------------------------------------------------------- I am busy converting our fivewin stuff from Clipper 5.2e to Clipper 5.3b. Surprisingly (to me) it only took about 1/2 hour and seems to be working fine, even though we use comix, clipmore, advantage and funcky. For those interested, Comix/Clipmore in 5.2e is "replaced" by linking in cmfun.obj and cmxfun.obj, which translate your existing comix calls into the new 5.3 syntax which supports uses DBFCDX as comix and also supports most of clipmore. My version() of clipper 5.3b comes up with "Clipper (R) 5.3b Intl. (rev. 338) (1997.04.25)" Can anybody else using 5.3b please confirm that this is indeed the latest and correct version, after applying the relevant a and b patches to the original Clipper 5.3? Do you have link script example, also where did you get cmfun.obj and cmxfun.obj. I do not seem to have them.they are .Prgs and should be with 5.3 <i think> No can find cm*.* in clipper 5.3 My clipper.exe is dated 05-20-1997 5.32a all the libs have the same date and time stamp. The only one that differ are SAMPLES.LIB and LLIBG.LIB. How's your 331/332 error goes ? Yes all my 5.3b libs are dated 20/5/97 except samples.lib and llibg.lib which are dated 20/5/96 My 331/332 errors are under control. I was keen to see if changing to 5.3b from 5.2e would make any difference to memory usage, general speed etc etc etc, but it appears to be much the same. I was also not so happy about patching alloc.obj and om.obj from 5.3b into 5.2e, how do we know they are 100% compitable??? Also, if I used 5.3b om.obj with 5.2e, I had to comment out "Segment OM.TXT nondiscardiable" (per someone else's instructions) from the link script to avoid an irritating startup Windows error which I did not understand..... We will carry on.........no doubt more interesting issues will come to light!! One day I will get that job drinking cold beer on the beach..! Glad to see that 331/332 goes away ! I think we have the final answer about it, DESTROYING unused DATA IS the solution ! Our product will be release on september 23 1999, after that I'll go hunting the moose and take good time in the beautiful Forest of Quebec. It will be to cold here to go to the beach <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> !-------------------------------------------------------------------------------- I make a .BAT file that replace some functions of clipper 5.2e with the same of clipper 5.3b. This work correctly with me. I use:clipper 5.2efivewin 2.0bblinker 5.1six III ( nsx )some C functionsPS: edit the .bat file and make the correct path to 5.2 and 5.3. ( EDIT1.BAT ) Great! So, why did you do it? Is it more stable now?YES! Remember that clipper 5.2e has a bug on alloc ? In 5.3b this bug not exist. I think that the others funcs of 5.3b has bug correction or improvements too.-------------------------------------------------------------------------------- DOES ANY ONE KNOW (EMAIL ADRESS) WHERE I CAN BUY CLIPPER5.3 THANKS IN ADVANCE Try Zac Catalogs, maybe they still have it <!-- m --><a class="postlink" href="http://www.instantsoftware.com/scripts/runisa.dll?ebrowse:pZACHome">http://www.instantsoftware.com/scripts/ ... e:pZACHome</a><!-- m -->Try--------------------------------------------------------------------------------I want to buy CA-Clipper v5.3b software. Where can I buy it? Can someone tell me about it?Try <!-- w --><a class="postlink" href="http://www.grafxsoft.com">www.grafxsoft.com</a><!-- w -->-------------------------------------------------------------------------------- I recently upgraded to Clipper 5.3b and FW2.2c.I have a SET BELL OFF in my programn but the bell sounds on the last chracter entered in a GET.It also happend in my (legacy) DOS code. Any Ideas? FW Class TGet uses MsgBeep(), that is why you hear the bell sound.You may remove the MsgBeep() call from Class TGet (source\tget.prg) or simply declare a:function MsgBeep()return nilfrom your main app.Thank you Antonio. Works like a charm.--------------------------------------------------------------------------------
Boris Pekic - NG's archive
Hi There, Our company had just bought xHarbour and I'm the one given the task to migrate all our clipper applications to xHarbour. I also noticed that our application is using Funcky 2.5 and Netlib 6.5 third-party libs. Would there be anybody here that had already created wrapper functions for funcky that could be used for xHarbour and if possible that I may request a copy. Thanks in advance, Eduardo
Borland 5.8 compiler
I have used Borland 5.5.1 compiler for many years. I noticed on the xHarbour.org website they have a version for Borland 5.8 compiler. is there any benefit from the 5.8 over the 5.5.1 compiler?
Borland 5.8 compiler
Nothing visible but it surely have many bug fixes. And, by the way, you have to use it with the new FWH releases. EMG
Borland 5.8 compiler
The visible difference maybe the linker (ilink32.exe). In some (rare) cases, BCC 5.5's linker failed to link an application, complaining something like "access violation" . BCC 5.8 has the "best" linker among 5.5 up to 6.2 because even the 6.2's version sometimes failed for no obvious reason.
Borland 5.8 compiler
[quote="andijahja":27ncgpn5]The visible difference maybe the linker (ilink32.exe). In some (rare) cases, BCC 5.5's linker failed to link an application, complaining something like "access violation" . BCC 5.8 has the "best" linker among 5.5 up to 6.2 because even the 6.2's version sometimes failed for no obvious reason.[/quote:27ncgpn5] Latest info, it seems that BCC 6.3 which comes bundled with Embarcadero RAD Studio XE brings some improvement to the compiler. Inappropriate codes which compilable with the lower version and even compilable with MSVS 10, are now rejected by BCC 6.3.
Borland 5.8 compiler
Where can I download Borland 5.8 compiler?
Borland 5.8 compiler
Don, [url:1m75vrza]http&#58;//www&#46;fivetechsoft&#46;com/files/software/bcc582&#46;zip[/url:1m75vrza]
Borland 582
Buenas tardes. Quise cambiar la versión de Borland de la versión 5.55 a la 5.82 y en el momento de crear el ejecutable de mi aplicación, me arroja el siguiente error: [img]error.bmp[/img]
Borland 582
fmontepo no olvidar cambiar el path de ilink32.CFG que se encuentra dentro de BIN Saludos, Adhemar
Borland 582
Hola buen dia. ¿Alguien sabe los cambios, diferencias o mejoras que tiene borland 5.82 respecto al 5.55?. He buscado en internet y por ningun lado encuentro informacion al respecto. Saludos. Jose Rios
Borland 582
fmontepo: Sube la imagen o detalla el error. Esto es a lo que se refiere acuellar: (asi lo tengo, sin problemas) Fichero ILINK32.CFG: -L"c:\bcc582\lib" Fichero TLINK32.CFG: /LC:\Borland\BCC582\lib Fichero BCC32.CFG -I"c:\bcc582\include;c:\bcc582\include\dinkumware" -L"c:\bcc582\lib" Saludos
Borland 64 bits makefile for FWH 64
go.bat [code=fw:5zc5dxek]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> not exist obj md obj<br />c:\bcc7164\bin\make -fclinica.mak</div>[/code:5zc5dxek] clinica.mak [code=fw:5zc5dxek]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make <span style="color: #000000;">64</span> bits <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2016</span><br /><br />HBDIR=c:\harbour<br />BCDIR=c:\bcc7164<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.obj = .\obj<br />.path.prg = .\<br />.path.ch  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.c   = .\<br />.path.rc  = .\<br /><br />PRG =        \<br />clinica.prg  \<br />another.prg<br /><br />PROJECT    : <span style="color: #000000;">clinica</span>.exe<br /><br />clinica.exe  : $<span style="color: #000000;">&#40;</span>PRG:.prg=.obj<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.c=.obj<span style="color: #000000;">&#41;</span> clinica.res<br />   echo off<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w64.o + > b64.bc<br />   echo obj\clinica.obj obj\another.obj, + >> b64.bc<br />   echo clinica.exe, + >> b64.bc<br />   echo clinica.map, + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\Five64.a $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveC64.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbrtl.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbvm.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\gtgui.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hblang.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbmacro.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbrdd.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\rddntx.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\rddcdx.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\rddfpt.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbsix.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbdebug.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbcommon.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbpp.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbwin.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbcpage.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbct.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbcplr.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbpcre.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\xhb.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbziparc.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbmzip.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbzlib.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\minizip.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\png.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbusrrdd.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\bcc64\hbtip.a + >> b64.bc<br /><br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw64.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\kernel32.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\user32.a + >> b64.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.a + >> b64bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import64.a, >> b64.bc<br /><br />   <span style="color: #00C800;">IF</span> EXIST clinica.res echo clinica.res >> b64.bc<br />   $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink64 -Gn -aa -Tpe -s @b64.bc<br />   <span style="color: #00C800;">if</span> ERRORLEVEL <span style="color: #000000;">0</span> clinica.exe<br />   del b64.bc<br /><br />.PRG.OBJ:<br />  $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc64 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -I$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include\windows\sdk -I$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include\windows\crtl -oobj\$&.obj obj\$&.c<br /><br />.C.OBJ:<br />  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />  echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc64 -I$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include\windows\sdk -I$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include\windows\crtl -oobj\$& @tmp $&.c<br />  del tmp<br /><br />clinica.res : <span style="color: #000000;">clinica</span>.rc<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r -D__64__ -I%bcdir%\include -I%bcdir%\include\windows\sdk clinica.rc<br /> </div>[/code:5zc5dxek] clinica.prg [code=fw:5zc5dxek]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />   <br />   Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:5zc5dxek] another.prg [code=fw:5zc5dxek]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:5zc5dxek] clinica.rc [code=fw:5zc5dxek]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Add here the resources to use</span></div>[/code:5zc5dxek]
Borland 64 bits makefile for FWH 64
Hi Antonio, How to Build LIB makefile for FWH64?
Borland 64 bits makefile for FWH 64
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=197008#p197008">viewtopic.php?p=197008#p197008</a><!-- l -->
Borland 64 bits makefile for FWH 64
Antonio, Veo que utilizas la versión 7.1 de Borland. Me pareció leer aquí que era mejor usar la 7.0; es así? Yo tengo la 7.0, tienes las instrucciones para obtener la 7.1? Gracias, <!-- e --><a href="mailto:siperono@gelbla.com">siperono@gelbla.com</a><!-- e -->
Borland 64 bits makefile for FWH 64
The best is the latest, BCC 7.20, of course. EMG
Borland 64 bits makefile for FWH 64
Carlos, Para 32 bits, 7.0 Para 64 bits, 7.1 Enrico, I agree that latest uses to be the best, but I prefer to keep settings stable for sometime so users don't need to change so constantly. Actual settings are stable and that is good for all <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Borland 64 bits makefile for FWH 64
I'm using BCC 7.20 since 27/04/2016. No problems and no setting differences from 7.10. EMG
Borland 64 bits makefile for FWH 64
You can download it from Mel Smith website, that is the official xHarbour download page: [url:3l939tzq]http&#58;//www&#46;whosaway&#46;com[/url:3l939tzq] EMG
Borland 64 bits makefile for FWH 64
[quote="Enrico Maria Giordano":1f5dnb90]You can download it from Mel Smith website, that is the official xHarbour download page: [url:1f5dnb90]http&#58;//www&#46;whosaway&#46;com[/url:1f5dnb90] EMG[/quote:1f5dnb90] Hi EMG, Antonio I download xHarbour184-64bit-bcc72 How to build .mak file? Same as Harbour64 .mak file?
Borland 64 bits makefile for FWH 64
I have just sent an email to Enrico I have not used it in 64 bits
Borland 64 bits makefile for FWH 64
Sorry, I'm not familiar with mak files. Basically, the difference between BCC 32-bit and BCC 64-bit is only that libraries have the .A extension instead of .LIB. EMG
Borland 64 bits makefile for FWH 64
Mr Antonio, How about build 64 bits with xHarbour, we use Five64.a or FiveH64.lib ? FiveH64.a and FiveHC64.a not found in the folder lib. Best regards. Mulyadi
Borland 64 bits makefile for FWH 64
Mulyadi, We have not built FWH for xHarbour 64 bits yet We are going to build it and test it
Borland 64 bits makefile for FWH 64
My job at present at the company is conversion all application to 64 bits platform. Since version 13.07 ago, i built application use xharbour, That any data application interact with other applicatoin data. If i conversion into harbor rever all the source should be changed. I wish there were a solution to this. Thanks.
Borland 64 bits makefile for FWH 64
Mulyadi, Here you have xHarbour 64 bits for BCC72: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=16&t=33886">viewtopic.php?f=16&t=33886</a><!-- l --> I am emailing you the libs for FWH 64 bits for xHarbour 64.
Borland 64 bits makefile for FWH 64
This is buildx64.bat buildx64.bat [code=fw:2edeq49n]<div class="fw" id="{CB}" style="font-family: monospace;">@ECHO OFF<br />CLS<br />ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿<br />ECHO ³ FiveWin <span style="color: #000000;">17.03</span> <span style="color: #00C800;">for</span> xHarbour <span style="color: #000000;">64</span> bits - Mar. <span style="color: #000000;">2017</span> &nbsp;Harbour development <span style="color: #0000ff;">power</span> &nbsp;³Ü<br />ECHO ³ <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech <span style="color: #000000;">1993</span><span style="color: #000000;">-2017</span> <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span>/<span style="color: #000000;">8</span>/<span style="color: #000000;">10</span> ³Û<br />ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ<br />ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /><br /><span style="color: #00C800;">if</span> A%<span style="color: #000000;">1</span> == A GOTO :<span style="color: #000000;">SINTAX</span><br /><span style="color: #00C800;">if</span> NOT EXIST %<span style="color: #000000;">1</span>.prg GOTO :<span style="color: #000000;">NOEXIST</span><br /><br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%FWDIR%"</span> == <span style="color: #ff0000;">""</span> set FWDIR=.\..<br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%HBDIR%"</span> == <span style="color: #ff0000;">""</span> set HBDIR=c:\xharbour64<br />rem <span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%2"</span> == <span style="color: #ff0000;">"/b"</span> set GT=gtwin<br />rem <span style="color: #00C800;">if</span> not <span style="color: #ff0000;">"%2"</span> == <span style="color: #ff0000;">"/b"</span> set GT=gtgui<br />set GT=gtgui<br />ECHO Compiling...<br /><br />set hdir=%HBDIR%<br />set hdirl=%hdir%\lib<br />set fwh=%FWDIR%<br />set bcdir=c:\bcc7164<br /><br />echo %hdir%\bin\harbour %<span style="color: #000000;">1</span> /n /i%fwh%\include;%hdir%\include /w /p %<span style="color: #000000;">2</span> %<span style="color: #000000;">3</span><br />%hdir%\bin\harbour %<span style="color: #000000;">1</span> /n /i%fwh%\include;%hdir%\include /w /p %<span style="color: #000000;">2</span> %<span style="color: #000000;">3</span> > comp.log <span style="color: #000000;">2</span>> warnings.log<br /><span style="color: #00C800;">if</span> errorlevel <span style="color: #000000;">1</span> goto COMPILEERROR<br />@type comp.log<br />@type warnings.log<br /><br />echo -O2 -e%<span style="color: #000000;">1</span>.exe -I%hdir%\include -I%bcdir%\include %<span style="color: #000000;">1</span>.c > b64.bc<br />%bcdir%\bin\bcc64 -c -I%hdir%\include -I%bcdir%\include\windows\sdk -I%bcdir%\include\windows\crtl -o%<span style="color: #000000;">1</span>.obj %<span style="color: #000000;">1</span>.c<br />:<span style="color: #000000;">ENDCOMPILE</span><br /><br /><span style="color: #00C800;">if</span> EXIST %<span style="color: #000000;">1</span>.rc %bcdir%\bin\brc32 -r -D__64__ -I%bcdir%\include -I%bcdir%\include\windows\sdk %<span style="color: #000000;">1</span><br /><br />echo %bcdir%\lib\c0w64.o + > b64.bc<br />echo %<span style="color: #000000;">1</span>.obj, + >> b64.bc<br />echo %<span style="color: #000000;">1</span>.exe, + >> b64.bc<br />echo %<span style="color: #000000;">1</span>.map, + >> b64.bc<br /><br />echo %fwh%\lib\Fivehx64.a %fwh%\lib\FiveC64.a %fwh%\lib\libmariadb64.a + >> b64.bc<br /><br />echo %hdirl%\rtl.a + >> b64.bc<br />echo %hdirl%\gtgui.a + >> b64.bc<br />echo %hdirl%\vm.a + >> b64.bc<br />echo %hdirl%\lang.a + >> b64.bc<br />echo %hdirl%\macro.a + >> b64.bc<br />echo %hdirl%\rdd.a + >> b64.bc<br />echo %hdirl%\dbfntx.a + >> b64.bc<br />echo %hdirl%\dbfcdx.a + >> b64.bc<br />echo %hdirl%\dbffpt.a + >> b64.bc<br />echo %hdirl%\sixapi.a + >> b64.bc<br />echo %hdirl%\debug.a + >> b64.bc<br />echo %hdirl%\common.a + >> b64.bc<br />echo %hdirl%\pp.a + >> b64.bc<br />echo %hdirl%\codepage.a + >> b64.bc<br />echo %hdirl%\ct.a + >> b64.bc<br />echo %hdirl%\zlib.a + >> b64.bc<br />echo %hdirl%\png.a + >> b64.bc<br />echo %hdirl%\tip.a + >> b64.bc<br />echo %hdirl%\rdd.a + >> b64.bc<br />echo %hdirl%\hbsix.a + >> b64.bc<br />echo %hdirl%\pcrepos.a + >> b64.bc<br />echo %hdirl%\hbmzip.a + >> b64.bc<br /><br />echo %bcdir%\lib\cw64.a + >> b64.bc<br />echo %bcdir%\lib\psdk\kernel32.a + >> b64.bc<br />echo %bcdir%\lib\psdk\user32.a + >> b64.bc<br />echo %bcdir%\lib\psdk\iphlpapi.a + >> b64.bc<br />echo %bcdir%\lib\import64.a, >> b64.bc<br /><br /><span style="color: #00C800;">if</span> EXIST %<span style="color: #000000;">1</span>.res echo %<span style="color: #000000;">1</span>.res >> b64.bc<br /><span style="color: #00C800;">if</span> %GT% == gtwin %bcdir%\bin\ilink64 -Gn -Tpe -s @b64.bc<br /><span style="color: #00C800;">if</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br /><span style="color: #00C800;">if</span> %GT% == gtgui %bcdir%\bin\ilink64 -Gn -aa -Tpe -s @b64.bc<br /><span style="color: #00C800;">if</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO * Application successfully built *<br />rem signtool.exe sign /fd sha256 %<span style="color: #000000;">1</span>.exe<br />%<span style="color: #000000;">1</span><br />GOTO EXIT<br />ECHO<br /><br />:<span style="color: #000000;">COMPILEERROR</span><br />@type comp.log<br />@type warnings.log<br />ECHO * Compiling errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO * Linking errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">SINTAX</span><br />ECHO &nbsp; &nbsp;SYNTAX: <span style="color: #000000;">Build</span> <span style="color: #000000;">&#91;</span>Program<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>-- No especifiques la extensi¢n PRG<br />ECHO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span>-- Don<span style="color: #ff0000;">'t specify .PRG extension<br />GOTO EXIT<br /><br />:NOEXIST<br />ECHO The specified PRG %1 does not exist<br /><br />:EXIT<br /></span></div>[/code:2edeq49n]
Borland 64 bits makefile for FWH 64
[img:2p8fsmto]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/fwh64_xharbour64&#46;JPG[/img:2p8fsmto]
Borland 64 bits makefile for FWH 64
Mr Antonio, I use OS windows 10 64 bit, This example just adopted at the top i built for 32 bit xharbour version. But i found error like this : [color=#FF0000:2slrlio8]clinica.res(1):'Invalid character in .DEF file' Fatal: Error processing .DEF file[/color:2slrlio8] go.bat : [code=fw:2slrlio8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> not exist ob md obj<br />d:\compiler\x32\bcc70\bin\make -ftest.mak</div>[/code:2slrlio8] test.mak : [code=fw:2slrlio8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#<br /># <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech <span style="color: #000000;">1993</span><span style="color: #000000;">-2017</span> <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span>/<span style="color: #000000;">8</span>/<span style="color: #000000;">10</span><br />#<br /><br />XHDIR=d:\compiler\x32\xhb70<br />BCDIR=d:\compiler\x32\bcc70<br />FWDIR=d:\compiler\x32\fwh1703<br /><br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C   = .\<br />.path.rc  = .\<br /><br />PRG = \<br />clinica.prg \<br />another.prg<br /><br /><br />PROJECT : <span style="color: #000000;">test</span>.exe<br /><br />test.exe  : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> clinica.res<br />   echo off<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />   echo obj\clinica.obj \<br />    obj\another.obj, + >> b32.bc <br /><br />  echo test.exe, + >> b32.bc<br />  echo test.map, + >> b32.bc<br /><br />  echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\Fivehx.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\libmysql.lib + >> b32.bc<br />  <br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\rtl.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\vm.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\lang.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\macro.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\rdd.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\dbfntx.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\dbfcdx.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\dbffpt.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\debug.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\common.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\codepage.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\pp.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\pcrepos.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\ct.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\zlib.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\hbzip.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\libmisc.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\lib\tip.lib + >> b32.bc<br /><br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc<br /><br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\psapi.lib + >> b32.bc <br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc <br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />  echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, + >> b32.bc <br /><br />  <span style="color: #00C800;">IF</span> EXIST clinica.res echo clinica.res >> b32.bc<br />#  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc<br />     <br />  <span style="color: #00C800;">if</span> ERRORLEVEL <span style="color: #000000;">0</span> test.exe<br />#  del b32.bc<br /><br />.PRG.OBJ:<br />  $<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\include > warning.log<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />  echo -I$<span style="color: #000000;">&#40;</span>XHDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp $&.c<br />  del tmp<br /><br />clinica.res : <span style="color: #000000;">clinica</span>.rc<br />#  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r clinica.rc<br /> $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r -I$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include  clinica.rc<br /> </div>[/code:2slrlio8] clinica.prg : [code=fw:2slrlio8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />    <span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #00C800;">local</span> oWnd<br />       <br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />       <br />       Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <br />       <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2slrlio8] another.prg [code=fw:2slrlio8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />    <span style="color: #00C800;">function</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2slrlio8] clinica.rc : [code=fw:2slrlio8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />open  BITMAP <span style="color: #ff0000;">"d:<span style="color: #000000;">\c</span>ompiler<span style="color: #000000;">\x</span>32<span style="color: #000000;">\f</span>wh1703<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\o</span>pen.bmp"</span><br /> </div>[/code:2slrlio8] Please to be fixed script i wrote in a file test.mak Thanks Mulyadi
Borland 64 bits makefile for FWH 64
Mulyadi, Please modify this line this way: IF EXIST clinica.res echo ,clinica.res >> b32.bc and also change this line this way: test.exe : $(PRG:.prg=.obj) $(C:.c=.obj) clinica.res Please notice the use of lowercase
Borland 64 bits makefile for FWH 64
Mr Antonio, Adaptation my problem version 32 bits have reduced and thanks. Specific to the issue of building apps 64 bits with the xharbour, There are obstacles, example not all files exe can on the run, on the occasion of the next may I will ask you. Best regards Mulyadi
Borland 64 bits makefile for FWH 64
Mulyadi, Whatever issue may appear please let us know it, many thanks
Borland 64 bits makefile for FWH 64
Mr Antonio, Specifically to xharbour course. Just a sample little from \samples folder, i try to build file [color=#0040FF:36jwzgj8]xbrttl.prg[/color:36jwzgj8] or [color=#0040FF:36jwzgj8]xbrxls.prg[/color:36jwzgj8] and I found the results the program did not can displayed. If only example a simple small such as this: [code=fw:36jwzgj8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// test xharbour 64-bits</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Hello world"</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// run oke</span><br />    dialog1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>               <span style="color: #B900B9;">// run oke</span><br />    dialog2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>               <span style="color: #B900B9;">// unworkable</span><br />    <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> hb_getfilesinzip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> hb_unzipfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> dialog1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> oDlg, oFont<br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />    <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// just add from xbrxls.prg</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">function</span> dialog2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd, oBrw, oBar, oFont<br />   <span style="color: #00C800;">local</span> oRange,  u<br /><br />   SET DATE ITALIAN<br />   SET CENTURY <span style="color: #0000ff;">ON</span><br /><br />   fwNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   msgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Reading from Excel File"</span>,  <span style="color: #ff0000;">"PLEASE WAIT"</span>, <span style="color: #000000;">&#123;</span> || ;<br />   oRange   := GetExcelRange<span style="color: #000000;">&#40;</span> ExePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"xbrtest.xls"</span>, <span style="color: #ff0000;">"CUSTOMERS"</span>, <span style="color: #ff0000;">"A1:E12"</span> <span style="color: #000000;">&#41;</span> ;<br />   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse Excel Sheet: FWH 11.07"</span><br />   oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2007</span><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">2007</span><br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">AUTOCOLS</span> ;<br />      PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">'dd-mmm-yyyy'</span>, NumPict<span style="color: #000000;">&#40;</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> ;<br />      DATASOURCE oRange CELL LINES FOOTERS<br /><br />   oBrw:<span style="color: #000000;">Sales</span>:<span style="color: #000000;">bFooter</span>   := <span style="color: #000000;">&#123;</span> || oRange:<span style="color: #000000;">Application</span>:<span style="color: #000000;">WorkSheetFunction</span>:<span style="color: #0000ff;">Sum</span><span style="color: #000000;">&#40;</span>oRange:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oBrw:<span style="color: #000000;">nStretchCol</span>     := <span style="color: #000000;">1</span><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />   oRange:<span style="color: #000000;">WorkSheet</span>:<span style="color: #000000;">Parent</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> ExePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:36jwzgj8] In the short run i have to adaptation with harbor that is not why, because my projects also not to be finished on this time, I hope team xharbour can evaluate specifically to 64 bit platform, the progress of us together. Best Regards Mulyadi
Borland 64 bits makefile for FWH 64
This works if built in fwh\samples folder Or ensure existence of the file xbrtest.xls in the exepath [code=fw:28hqksuv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd, oBrw, oBar, oFont<br />   <span style="color: #00C800;">local</span> oRange,  u<br /><br />   SET DATE ITALIAN<br />   SET CENTURY <span style="color: #0000ff;">ON</span><br /><br />   fwNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   msgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Reading from Excel File"</span>,  <span style="color: #ff0000;">"PLEASE WAIT"</span>, <span style="color: #000000;">&#123;</span> || ;<br />   oRange   := GetExcelRange<span style="color: #000000;">&#40;</span> ExePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"xbrtest.xls"</span>, <span style="color: #ff0000;">"Customers"</span>, <span style="color: #ff0000;">"A1:E12"</span> <span style="color: #000000;">&#41;</span> ;<br />   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse Excel Sheet: FWH 11.07"</span><br />   oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2007</span><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">2007</span><br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">AUTOCOLS</span> ;<br />      PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">'dd-mmm-yyyy'</span>, NumPict<span style="color: #000000;">&#40;</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> ;<br />      DATASOURCE oRange CELL LINES FOOTERS<br /><br />   oBrw:<span style="color: #000000;">Sales</span>:<span style="color: #000000;">bFooter</span>   := <span style="color: #000000;">&#123;</span> || oRange:<span style="color: #000000;">Application</span>:<span style="color: #000000;">WorkSheetFunction</span>:<span style="color: #0000ff;">Sum</span><span style="color: #000000;">&#40;</span>oRange:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oBrw:<span style="color: #000000;">nStretchCol</span>     := <span style="color: #000000;">1</span><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />   oRange:<span style="color: #000000;">WorkSheet</span>:<span style="color: #000000;">Parent</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> ExePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">function</span> hb_getfilesinzip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> hb_unzipfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:28hqksuv] Tested on Windows 10 and Office 365
Borland 64 bits makefile for FWH 64
Mr Nages, Thank you for reply. Now i concentrate build an 64 bits, migration all application of old written in fwh 1307 32 bits with compiler xharbour. Code examples of you at the top was successfully run if in compile use Harbour and xHarbour, but if in a complex code, it cannot be run although only copy paste. I did try to many examples code, focus to built in 64 bits platform. If i compile with harbor it does not matter, but if in compile use xharbour sometimes it cannot be run. [color=#0040FF:2hoefw5o]xbsubtot.prg[/color:2hoefw5o] this code from samples folder, If i compile with Harbour can be , but if in compile using xHarbour it cannot be run. [code=fw:2hoefw5o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />* Inserting Subtotals<br />* Automatically recalculated<br />* When individual items are edited<br />*<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aData, n<br />   <span style="color: #00C800;">local</span> aHead<br /><br />   FWNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'A'</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">/*<br />      This works only with Arrays. We are using test data aData<br />      Instead it can be any Array of real Data. Conditions are that<br />      a) First column should be serial number<br />      b) second column should be some description<br />      Other columns can be of any datatype<br />   */</span><br /><br />   aData    := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span><br />      AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> n, <span style="color: #ff0000;">"Item-"</span> + StrZero<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, ;<br />         HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">999</span> <span style="color: #000000;">&#41;</span>, HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">9999</span> <span style="color: #000000;">&#41;</span>, ;<br />         Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, ;<br />         HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">9999</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #B900B9;">/*<br />      Call function BrowseWithSubTotals( aData, [aHead], [aSumCols] )<br />      Optionally we can provide an array of column headers in the 2nd param<br />      Optionally we can specify which columns are to be sub-totalled and totalled.<br />      If ommitted all numeric columns are totalled.<br />   */</span><br /><br />   BrowseWithSubTotals<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//, aHead, { 3, 4, 6 } )</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> hb_getfilesinzip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> hb_unzipfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BrowseWithSubTotals<span style="color: #000000;">&#40;</span> aData, aHead, aSumCols <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />   <span style="color: #00C800;">local</span> nCol<br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> aSumCols <span style="color: #000000;">&#41;</span><br />      aSumCols := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />      AEval<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |u,i| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> u <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'N'</span>, AAdd<span style="color: #000000;">&#40;</span> aSumCols, i <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> aHead := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"SlNo"</span>, <span style="color: #ff0000;">"Item"</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">30</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE aData ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> HEADERS aHead ;<br />      COLSIZES <span style="color: #000000;">40</span> ;<br />      CELL LINES FOOTERS NOBORDER FASTEDIT<br /><br />   <span style="color: #00C800;">for</span> Each nCol in aSumCols<br />      <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span>, nCol <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'N'</span><br />         WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span><br />            :<span style="color: #000000;">bEditValue</span>    := <span style="color: #000000;">&#123;</span> |x,o| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> x == <span style="color: #00C800;">nil</span> .or. ValType<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> o:<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span>, ;<br />                                     XEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> o:<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                     oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> o:<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">&#93;</span> := x <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />            :<span style="color: #000000;">nEditType</span>     := EDIT_GET<br />            :<span style="color: #000000;">cEditPicture</span>  := NumPict<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />            :<span style="color: #000000;">bEditWhen</span>     := <span style="color: #000000;">&#123;</span> || ! IsTotalRow<span style="color: #000000;">&#40;</span>  oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />            :<span style="color: #000000;">bOnChange</span>     := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />            :<span style="color: #000000;">nFooterType</span>   := AGGR_SUM<br />            :<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> |n,o| ! IsTotalRow<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />         END<br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">next</span><br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nStretchCol</span>   := STRETCHCOL_WIDEST<br />      :<span style="color: #000000;">bClrStd</span>       := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> IsTotalRow<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span>, CLR_YELLOW, CLR_WHITE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bChange</span>       := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Insert SubTotal"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> InsertSubTotal<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">WHEN</span> ! IsTotalRow<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Remove SubTotal"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">WHEN</span> IsTotalRow<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> InsertSubTotal<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n, oCol, nRowFrom := <span style="color: #000000;">0</span>, nRowLast<br /><br />   <span style="color: #00C800;">if</span> .not. IsTotalRow<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span><br />      nRowLast    := oBrw:<span style="color: #000000;">nArrayAt</span><br />      <span style="color: #00C800;">for</span> n := nRowLast  <span style="color: #0000ff;">to</span> <span style="color: #000000;">1</span> step <span style="color: #000000;">-1</span><br />         <span style="color: #00C800;">if</span> IsTotalRow<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />            EXIT<br />         <span style="color: #00C800;">else</span><br />            nRowFrom    := n<br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">next</span><br />      <span style="color: #00C800;">if</span> nRowFrom > <span style="color: #000000;">0</span><br />         <span style="color: #00C800;">if</span> nRowLast == Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span><br />            AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            AIns<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, nRowLast + <span style="color: #000000;">1</span>, Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />         oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> nRowLast + <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>   := <span style="color: #ff0000;">"Sum : "</span> + ;<br />               cValToChar<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> nRowFrom, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"-"</span> + ;<br />               cValToChar<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> nRowLast, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">for</span> each oCol in oBrw:<span style="color: #000000;">aCols</span><br />            <span style="color: #00C800;">if</span> oCol:<span style="color: #000000;">nFooterType</span> == AGGR_SUM .and. ! Empty<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">&#41;</span><br />               oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> nRowLast + <span style="color: #000000;">1</span>, oCol:<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">&#93;</span> := ;<br />                  MakeSumBlock<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, oCol:<span style="color: #000000;">nArrayCol</span>, nRowFrom, nRowLast <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">endif</span><br />         <span style="color: #00C800;">next</span><br />         oBrw:<span style="color: #000000;">nArrayAt</span>  := nRowLast + <span style="color: #000000;">1</span><br />         oBrw:<span style="color: #000000;">nRowSel</span>   := oBrw:<span style="color: #000000;">nArrayAt</span><br />         oBrw:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MakeSumBlock<span style="color: #000000;">&#40;</span> aData, nCol, nRowFrom, nRowLast <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nRows := nRowLast - nRowFrom + <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">local</span> aRows := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> n<br /><br />   <span style="color: #00C800;">for</span> n := nRowFrom <span style="color: #0000ff;">to</span> nRowLast<br />      AAdd<span style="color: #000000;">&#40;</span> aRows, aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> || FW_ArrSum<span style="color: #000000;">&#40;</span> aRows, nCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> IsTotalRow<span style="color: #000000;">&#40;</span> aRow <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> Empty<span style="color: #000000;">&#40;</span> aRow<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:2hoefw5o] As an example that i wrote above, [code=fw:2hoefw5o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Hello world"</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// run oke</span><br />    dialog1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>               <span style="color: #B900B9;">// run oke</span><br />    dialog2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>               <span style="color: #B900B9;">// unworkable, just copy paste and rename function</span><br />                                   <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #00C800;">function</span> dialog1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <span style="color: #B900B9;">// create a dialog</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #00C800;">function</span> dialog2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <span style="color: #B900B9;">// copy paste from xbrxls.prg</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2hoefw5o] What is this problem OS windows 10 x64 or library of xharbour 64 bits that i use? Please the solution and thank you. Best regards Mulyadi
Borland 64 bits makefile for FWH 64
Mulyadi, I added the dummy functions: function hb_getfilesinzip() return nil function hb_unzipfile() return nil and then: buildx64.bat xbsubtot and it worked fine [img:2kgpxv56]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/xharbour64_1&#46;JPG[/img:2kgpxv56]
Borland 64 bits makefile for FWH 64
Please provide the complete modified PRG that you have tested, thanks
Borland 64 bits makefile for FWH 64
Mr Antonio, thank you for reply I will try again at other times and right now i was finishing migration to platform 64 bit for small module app with Harbor Could be a problem there are also in the os W10 which currently not all 64 bits driver. I also have gotten to the vendor hardware about driver version of all notebook have to buy. I hope also specifically to FWH with 64 bits version to come always be ready for use and the progressed. Best regards. Mulyadi
Borland 7
Hola : Recompile el proyecto con borland 7 pero la funcion hb_compiler() me sigue mostrando Borland C++ 5.8.2 (32 Bit ) Sera un problema de la funcion... ? estoy usando harbour 3.2.0 Sdos Silvina
Borland 7
Silvina, Usa este Harbour: [url:15huczco]https&#58;//bitbucket&#46;org/fivetech/harbour-xharbour-builds/downloads/harbour_3&#46;2_32bits_Borland7_20160309&#46;zip[/url:15huczco]
Borland 7
gracias !! que tengan todos una feliz navidad y por compartir tantos conocimientos.. Sldos Silvina
Borland C setup files
c:\bcc582\bin\bcc32.cfg [code=fw:zhz5bwl3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />-I<span style="color: #ff0000;">"c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\i</span>nclude;c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\i</span>nclude<span style="color: #000000;">\d</span>inkumware"</span><br />-L<span style="color: #ff0000;">"c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\l</span>ib;c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk"</span><br /> </div>[/code:zhz5bwl3] c:\bcc582\bin\ilink32.cfg [code=fw:zhz5bwl3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />-L<span style="color: #ff0000;">"c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\l</span>ib;c:<span style="color: #000000;">\b</span>cc582<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk"</span><br /> </div>[/code:zhz5bwl3]
Borland C setup files
c:\bcc7\bin\bcc32.cfg -I "c:\bcc7\include";"c:\bcc7\include\windows\crtl";"c:\bcc7\include\dinkumware";"c:\bcc7\include\windows\rtl";"c:\bcc7\include\windows\sdk";"c:\bcc7\include\windows\sdk\atl" -L"c:\bcc7\lib";"c:\bcc7\lib\psdk" c:\bcc7\bin\ilink32.cfg -L"c:\bcc7\lib";"c:\bcc7\lib\psdk"
Borland C++
Colegas... Como le indico al Borland C++ que "lea" los archivos .CFG desde otra pasta que no sea \bcc55\bin o en todo caso.. con otros nombres? micfg.cfg por ejemplo...
Borland C++
Up!
Borland Make Utility Issues
I am having fits setting up a working Borland 7 make file. Right now my problem is that after editing a PRG, neither the OBJ or the C files are updated by the make file. So, until I solve this I am forced to delete the OBJ and C file manually. Then they are generated by the make file. Not a good solution. First, it is my understanding that if the PRG is newer than either the OBJ or C file, then the OBJ and C files should be regenerated automatically. At least that is how the old Clipper Rmake.exe worked. I have read all the documentation I could find, but there are only a few examples and none discuss or show how to setup the dependencies. I am assuming this line in the sample make file that comes with FWH is supposed to setup the dependencies: [code=fw:248vor9o]<div class="fw" id="{CB}" style="font-family: monospace;">arw.exe : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> arw.res</div>[/code:248vor9o] Am I correct? If so, then what is wrong with it? If that is not the line, then which line is it? Here is my complete make file if it will help: [code=fw:248vor9o]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland Make file<br />#Assumes PRGs are in parent directory, and OBJs and Cs are in .\obj<br />#Using FiveWin, xHarbour, and Borland C++<br />#Date: <span style="color: #000000;">04</span>/<span style="color: #000000;">13</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">45</span> pm<br /><br />HBDIR=c:\xharbour<br />BCDIR=c:\bcc7<br />FWDIR=c:\fwh<br /><br />.path.obj = .\obj<br />.path.prg = .\<br />.path.ch  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\include<br />.path.c   = .\obj<br />.path.rc  = .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filename extensions, in the <span style="color: #00C800;">next</span> two rules!<br />#But, just <span style="color: #00C800;">for</span> the designation <span style="color: #000000;">&#40;</span>PRG =<span style="color: #000000;">&#41;</span> not <span style="color: #00C800;">for</span> the filename<span style="color: #ff0000;">'s extension. <br /><br />PRG = <span style="color: #000000;">\</span><br />arw.prg <span style="color: #000000;">\</span><br />invpost.prg <span style="color: #000000;">\</span><br />arjournl.prg <span style="color: #000000;">\ </span><br />log.prg<span style="color: #000000;">\</span><br />project.prg<span style="color: #000000;">\</span><br />reorder.prg<span style="color: #000000;">\</span><br />rptproj.prg<span style="color: #000000;">\</span><br />tcharge.prg<span style="color: #000000;">\</span><br />tclient.prg<span style="color: #000000;">\</span><br />texpense.prg<span style="color: #000000;">\</span><br />tinvhist.prg<span style="color: #000000;">\</span><br />tinvoice.prg<span style="color: #000000;">\</span><br />tpayment.prg<span style="color: #000000;">\</span><br />tproject.prg<span style="color: #000000;">\ </span><br />logpost.prg<span style="color: #000000;">\</span><br />unbilled.prg<br /><br />OBJ=$(PRG:.prg=.obj)<br />OBJS=$(OBJ:.<span style="color: #000000;">\=</span>.<span style="color: #000000;">\o</span>bj<span style="color: #000000;">\)</span><br />#OBJS=$(.<span style="color: #000000;">\o</span>bj<span style="color: #000000;">\)</span><br /><br />PROJECT : arw.exe<br /><br />#arw.exe : $(OBJS) arw.res<br />arw.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) arw.res<br />   echo off<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\c</span>0w32.obj + > b32.bc<br />   echo $(OBJS), + >> b32.bc<br />   echo arw.exe, + >> b32.bc<br />   echo arw.map, + >> b32.bc<br />   echo $(FWDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\F</span>iveHx.lib $(FWDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\F</span>iveHC.lib + >> b32.bc<br />   echo $(FWDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\j</span>b32.lib + >> b32.bc<br />   echo $(FWDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\t</span>data32.lib + >> b32.bc  <br /><br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\r</span>tl.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\v</span>m.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\g</span>tgui.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\l</span>ang.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\m</span>acro.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\r</span>dd.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\d</span>bfntx.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\d</span>bfcdx.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\d</span>bffpt.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\h</span>bsix.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\d</span>ebug.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\c</span>ommon.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>p.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>crepos.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\c</span>t.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\z</span>lib.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\h</span>bzip.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\l</span>ibmisc.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\t</span>ip.lib + >> b32.bc<br />   echo $(HBDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>ng.lib + >> b32.bc<br /><br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\c</span>w32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\i</span>mport32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\u</span>uid.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\w</span>s2_32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\o</span>dbc32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\r</span>asapi32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\n</span>ddeapi.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\m</span>simg32.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\p</span>sapi.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\g</span>diplus.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\i</span>phlpapi.lib + >> b32.bc<br />   echo $(BCDIR)<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\p</span>sdk<span style="color: #000000;">\s</span>hell32.lib, >> b32.bc<br /><br />   echo arw.res >> b32.bc<br />   $(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\i</span>link32 -Gn -aa -Tpe -s -v -jobj<span style="color: #000000;">\ </span>@b32.bc<br />   #$(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\i</span>link32 -Gn -aa -Tpe -s @b32.bc<br />   #del b32.bc<br /><br />.PRG.OBJ:<br />   $(HBDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\h</span>arbour $< /N /W /Oobj<span style="color: #000000;">\ </span>/I$(FWDIR)<span style="color: #000000;">\i</span>nclude;$(HBDIR)<span style="color: #000000;">\i</span>nclude<br />   $(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\b</span>cc32 -c -tWM -I$(BCDIR)<span style="color: #000000;">\i</span>nclude;$(HBDIR)<span style="color: #000000;">\i</span>nclude -Oobj<span style="color: #000000;">\$</span>& obj<span style="color: #000000;">\$</span>&.c <br />   #$(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\b</span>cc32 -c -tWM -I$(BCDIR)<span style="color: #000000;">\i</span>nclude -oobj<span style="color: #000000;">\$</span>& obj<span style="color: #000000;">\$</span>&.c <br /><br />.C.OBJ:<br />   echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />   echo -I$(HBDIR)<span style="color: #000000;">\i</span>nclude;$(FWDIR)<span style="color: #000000;">\i</span>nclude >> tmp<br />   $(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\b</span>cc32 -oobj<span style="color: #000000;">\$</span>& @tmp $&.c<br />   del tmp<br /><br />arw.res : arw.rc<br />   $(BCDIR)<span style="color: #000000;">\b</span>in<span style="color: #000000;">\b</span>rc32.exe -r -Ic:<span style="color: #000000;">\b</span>cc7<span style="color: #000000;">\i</span>nclude<span style="color: #000000;">\w</span>indows<span style="color: #000000;">\s</span>dk arw.rc</span></div>[/code:248vor9o] Regards, James
Borland Make Utility Issues
James, $(PRG:.PRG=.OBJ) The above line means: In the group of files specified by PRG replace ".PRG" with ".OBJ" but in the PRG group of files ".prg" is used and not ".PRG" PRG = \ arw.prg \ invpost.prg \ arjournl.prg \ log.prg\ project.prg\ reorder.prg\ rptproj.prg\ tcharge.prg\ tclient.prg\ texpense.prg\ tinvhist.prg\ tinvoice.prg\ tpayment.prg\ tproject.prg\ logpost.prg\ unbilled.prg Please fix it and try it again
Borland Make Utility Issues
Antonio, I am not clear what you meant. Did you mean to replace this line: arw.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) arw.res With this: arw.exe : $(OBJ:.prg=.OBJ) $(C:.C=.OBJ) arw.res If so, that didn't force the recompile either. James
Borland Make Utility Issues
Sorry to jump in, but I needed also a new makefile Should the list of .prg need to be in UPPER maybe. Maybe I can adjust this file to my purpose (see the topic just set by me) This way, there is only 1 file needed for compiling ?
Borland Make Utility Issues
Marc, >Should the list of .prg need to be in UPPER maybe. I already tried it both ways and it doesn't seem to make any difference. Originally I had the same problem as you--the EXE would run without error, but no screen would show, and it would immediately exit. I finally fixed that, but I don't know how (I tried so many things I don't remember). Mine runs fine now, but if I edit a PRG, the OBJ and C files don't get updated when the make file is run again. Obviously the time stamps are not being checked, and I can't figure out how to fix that. Strangely, if the OBJ and C files are deleted (by me), then they are regenerated by the make file, so it is checking that, but not the timestamps. James
Borland Make Utility Issues
James, Please review FWH\makes\bor7make.zip and bormake.zip Try to use them as a skeleton for yours
Borland Make Utility Issues
Antonio, I started with the Test.mak file that came with FWH 16.02. And I have compared my current MAK file to that file, line by line, dozens of times. Still no luck. Unfortunately, I cannot actually test the Test.mak (unchanged) that came with FWH because I am using xHarbour and it was written for Harbour. So I had to change the paths and all the libs. And, of course, I have tried so many things that I probably broke something and I can't see it. What I can try is to start from scratch again. I will take a new copy of test.mak and change the paths and libs, and create test versions of Alert.prg and One.prg, and then see if I can get that working. James
Borland Make Utility Issues
James, If you email me all your files then I can build the makefile here for you I can't try what you have posted here as I don't have all your files
Borland Make Utility Issues
Antonio, I have a simular situation (see other post) I have compiled and get a exe file from the FW16 to FWh build, but the exe file is not doing anything. Is this maybe also related to a build file ?
Borland Make Utility Issues
Marc, Please review the make samples provided at FWH\makes Check that they work for you. Then introduce your changes progresivelly and keep testing them Its the simplest way to get a working makefile
Borland Make Utility Issues
Ok, I have had some success and some failure. I started with the FWH test.mak file. It was dated 2009 so it is quite out of date. I had to copy the library list from the FWH 16.02 Buildx.bat file. I commented out any references to the Two.c file and the Alert.rc file which don’t exist in my sample. Here is the MAK file: [code=fw:hd9o8jl4]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2005</span><span style="color: #000000;">-2009</span><br /><br />HBDIR=c:\xharbour<br />BCDIR=c:\bcc7<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C   = .\<br />.path.rc  = .\<br /><br />important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG =        \<br />alert.PRG    \<br />one.PRG<br /><br />#C =          \<br />#two.C                 <br /><br />PROJECT    : <span style="color: #000000;">Alert</span>.exe<br /><br />Alert.exe  : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> <br />   echo off<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />   #echo obj\alert.obj obj\one.obj obj\two.obj, + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>OBJS<span style="color: #000000;">&#41;</span>, + >> b32.bc<br />   echo alert.exe, + >> b32.bc<br />   echo alert.map, + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHx.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rtl.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\vm.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\lang.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\macro.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rdd.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfntx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfcdx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbffpt.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\debug.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\common.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pp.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pcrepos.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\ct.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\zlib.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbzip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\libmisc.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\tip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\png.lib + >> b32.bc<br /><br />   rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddads.lib + >> b32.bc<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\Ace32.lib + >> b32.bc<br /><br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc   <br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\psapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, >> b32.bc<br /><br />   <span style="color: #00C800;">IF</span> EXIST Alert.res echo Alert.res >> b32.bc<br />   $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br />   del b32.bc<br /><br />.PRG.OBJ:<br />  $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />  echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp $&.c<br />  del tmp<br /><br />#Alert.res : <span style="color: #000000;">Alert</span>.rc<br />#  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r Alert.rc<br /> </div>[/code:hd9o8jl4] Then I created an Alert.prg: [code=fw:hd9o8jl4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    One<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:hd9o8jl4] And a One.prg: [code=fw:hd9o8jl4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> One<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span>“Hello World”<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:hd9o8jl4] Then I used the test.mak file to compile the EXE. The Alert.exe was created and runs, then immediately exits without showing the message. Then I edited the One.prg file (added a space), saved it, and ran the Test.mak file again. I checked the OBJ and C files and they WERE updated with new times, so they are being recompiled when the PRG changes. OK, that’s one-in-a-row. I still don’t know why the EXE is not working properly. Maybe it is missing a library still. I will look at it some more. Antonio, Thanks for offering to get my MAK file going with my PRGs, but if you can just get my above sample running that would be enough. Obviously, you will need to have xHarbour installed, then you might have to change the paths in my Test.mak file. James
Borland Make Utility Issues
[quote:33cxgbi2]Please review FWH\makes\bor7make.zip and bormake.zip[/quote:33cxgbi2] I see a bormake zip, no bor7make.zip Is the bormake.zip the right one ? I See and seem to use : FWH+BCC7 files Just that I look at the right sample.
Borland Make Utility Issues
James I noticed the same issue that you have, but when i change this in the makefile : If I also use this code : C = \ TEST1.C \ TEST2.C \ TCALEND.C and # echo $(OBJS), + >> b32.bc echo OBJ\TEST1.OBJ + >> b32.bc echo OBJ\TEST2.OBJ + >> b32.bc echo OBJ\TCALEND.OBJ, + >> b32.bc it works than. sample sample file that is working for me : [code=fw:1t95ui3t]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2005</span><span style="color: #000000;">-2009</span><br /><br />HBDIR=c:\harbour<br />BCDIR=c:\borland\bcc7<br />FWDIR=c:\fwharb<br /><br />#change these paths as needed<br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C   = .\<br />.path.RC  = .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG =      \<br />TEST1.PRG  \<br />TEST2.PRG  \<br />Tcalend.PRG<br /><br />C =        \<br />TEST1.C    \<br />TEST2.C    \<br />TCALEND.C<br /><br />OBJ = $<span style="color: #000000;">&#40;</span>PRGS:.PRG=.\OBJ<span style="color: #000000;">&#41;</span><br />OBJS = $<span style="color: #000000;">&#40;</span>OBJ:.\=.\obj\<span style="color: #000000;">&#41;</span><br /><br />PROJECT    : <span style="color: #000000;">TEST</span>.EXE<br /><br />#RES-file wordt door COMPRES.BAT aangemaakt<br />#TEST.EXE  : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> TEST.RES<br />TEST.EXE  : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span><br />   echo off<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />#  echo $<span style="color: #000000;">&#40;</span>OBJS<span style="color: #000000;">&#41;</span>, + >> b32.bc<br />   echo OBJ\TEST1.OBJ + >> b32.bc<br />   echo OBJ\TEST2.OBJ + >> b32.bc<br />   echo OBJ\TCALEND.OBJ, + >> b32.bc<br /><br />   echo TEST.EXE, + >> b32.bc<br />   echo TEST.MAP, + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveH.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbrtl.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbvm.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hblang.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbmacro.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbrdd.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddntx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddcdx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddfpt.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbdebug.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbcommon.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbpp.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbwin.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbcpage.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbct.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\png.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbcplr.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\xhb.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbtip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbzlib.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbmzip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbziparc.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\minizip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbpcre.lib + >> b32.bc<br /><br />   rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddads.lib + >> b32.bc<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\Ace32.lib + >> b32.bc<br /><br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\wininet.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, >> b32.bc<br /><br />   <span style="color: #00C800;">IF</span> EXIST TEST.RES echo TEST.RES >> b32.bc<br />   $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br /><br />.PRG.OBJ:<br />  $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /N /W0 /V /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />  echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp $&.c<br />  del tmp<br /><br />#RES-file wordt door COMPRES.BAT aangemaakt<br />#TEST.RES : ..\RES\TEST.RC<br />#  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r ..\RES\TEST.RC</div>[/code:1t95ui3t]
Borland Make Utility Issues
Antonio, I have double checked all the lib files in my modified test.mak file and they are the same as those in the Buildx.bat file that came with FWH 16.2. So, the problem seems to be elsewhere. James
Borland Make Utility Issues
Marc, I have tried it with the C file designation before, and I tried it again and it makes no difference--my EXE still isn't working. If you look at the original test.mak file, the Alert.prg and One.prg are designated as PRGs and the Two.C is only designated as a C file. So, I think the C = designation is for files that ONLY exist as C files, not those that are generated by (x)Harbour from PRGs. But I could be wrong. James
Borland Make Utility Issues
James, I did some little changes in your files and it is working fine now. I just emailed them to you [code=fw:npt1es4k]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2005</span><span style="color: #000000;">-2009</span><br /><br />HBDIR=c:\xharbour<br />BCDIR=c:\bcc7<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH &nbsp;= $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C &nbsp; = .\<br />.path.rc &nbsp;= .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG = &nbsp; &nbsp; &nbsp; &nbsp;\<br />alert.PRG &nbsp; &nbsp;\<br />one.PRG<br /><br />#C = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\<br />#two.C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><br />PROJECT &nbsp; &nbsp;: <span style="color: #000000;">Alert</span>.exe<br /><br />Alert.exe &nbsp;: $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;echo off<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />&nbsp; &nbsp;echo obj\alert.obj obj\one.obj + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>OBJS<span style="color: #000000;">&#41;</span>, + >> b32.bc<br />&nbsp; &nbsp;echo alert.exe, + >> b32.bc<br />&nbsp; &nbsp;echo alert.map, + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHx.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rtl.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\vm.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\lang.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\macro.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rdd.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfntx.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfcdx.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbffpt.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\debug.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\common.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pp.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pcrepos.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\ct.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\zlib.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbzip.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\libmisc.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\tip.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\png.lib + >> b32.bc<br /><br />&nbsp; &nbsp;rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />&nbsp; &nbsp;rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddads.lib + >> b32.bc<br />&nbsp; &nbsp;rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\Ace32.lib + >> b32.bc<br /><br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc &nbsp; <br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\psapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, >> b32.bc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> EXIST Alert.res echo Alert.res >> b32.bc<br />&nbsp; &nbsp;$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br />&nbsp; &nbsp;del b32.bc<br /><br />.PRG.OBJ:<br />&nbsp; $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />&nbsp; $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />&nbsp; <span style="color: #000000;">echo</span> -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />&nbsp; echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />&nbsp; $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp $&.c<br />&nbsp; del tmp<br /><br />#Alert.res : <span style="color: #000000;">Alert</span>.rc<br /># &nbsp;$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r Alert.rc</div>[/code:npt1es4k]
Borland Make Utility Issues
Antonio, Thanks for spotting the two Main() functions. I missed that because I was ignoring it in my main app. There a PRG was getting compiled into the app that wasn't supposed to be and the app was running fine, so I ignored it. It the test case it was significant. The only change you made to the make file I note is that you changed the path for the C files from .\obj to .\ . However, I have my C files in .\obj so I get this error when the path is changed: Fatal: '.\alert.c' does not exist - don't know how to make it Of course this is expected. So I changed it back and it compiles fine. However, there is still a problem and perhaps the location of the C files is related. I still do not get a recompile when any PRG is changed. I am guessing that this is the line that looks for changes: Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) Perhaps this is a path issue? Do the paths need to be added to the above, or is the make file supposed to already know where the OBJs and C files are? It seems to know elsewhere in the make file. Where are the C files normally stored, with the PRGs or with the OBJs. Or someplace else? The old Clipper RMake.exe was so easy compared to Borland's Make. Sigh. James
Borland Make Utility Issues
James, The paths are specified here (in the make file): #change these paths as needed .path.OBJ = .\obj .path.PRG = .\ .path.CH = $(FWDIR)\include;$(HBDIR)\include .path.C = .\ .path.rc = .\
Borland Make Utility Issues
Antonio, Yes, I know that. But the make file is not checking the dates and times of the OBJs and the Cs against the PRGs when a PRG is changed. So either it is trying and it can't find the files, or it is not checking at all. I am trying to figure out which and how to fix it. Try editing the One.prg file (just change the message displayed) and then try running the make file again. The old message will still be displayed and if you look at the date and time of the Alert.exe it will not have changed even though the One.prg was changed. I am beginning to think it would be easier to write my own make file utility rather than trying to figure out Borland's make.exe works. James
Borland Make Utility Issues
Antonio, [quote:3sc6czgx]Try editing the One.prg file (just change the message displayed) and then try running the make file again. The old message will still be displayed and if you look at the date and time of the Alert.exe it will not have changed even though the One.prg was changed.[/quote:3sc6czgx] Actually, I said this wrong. The Alert.exe will be updated (it is recompiled) but the one.c and one.obj files are not updated. So the new Alert.exe is the same as the last one even though it was recompiled. I just did this again and here are my file dates and times: [code=fw:3sc6czgx]<div class="fw" id="{CB}" style="font-family: monospace;">Alert.exe       <span style="color: #000000;">4</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">3.04</span> PM<br />Alert.prg       <span style="color: #000000;">4</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">3.02</span> PM<br />One.prg         <span style="color: #000000;">4</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">3</span>:<span style="color: #000000;">04</span> PM<br />\obj\One.c      <span style="color: #000000;">4</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">8</span>:<span style="color: #000000;">08</span> AM<br />\obj\One.obj    <span style="color: #000000;">4</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2017</span> <span style="color: #000000;">8</span>:<span style="color: #000000;">08</span> AM<br /> </div>[/code:3sc6czgx] James
Borland Make Utility Issues
Please post here your current make file
Borland Make Utility Issues
Antonio, This is probably the same one I sent you in a zip file a couple of days ago. I don't think I have made any changes since then. Well, I may have made some changes then changed them back. Anyway this is the most current one. James [code=fw:o306qu25]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2005</span><span style="color: #000000;">-2009</span><br /><br />HBDIR=c:\xharbour<br />BCDIR=c:\bcc7<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH &nbsp;= $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C &nbsp; = .\obj<br />.path.rc &nbsp;= .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG = &nbsp; &nbsp; &nbsp; &nbsp;\<br />alert.PRG &nbsp; &nbsp;\<br />one.PRG<br /><br />C = &nbsp; &nbsp; \<br />alert.c \<br />one.c <br />#two.C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><br />PROJECT &nbsp; &nbsp;: <span style="color: #000000;">Alert</span>.exe<br /><br />Alert.exe &nbsp;: $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;echo off<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />&nbsp; &nbsp;echo obj\alert.obj obj\one.obj, + >> b32.bc<br />&nbsp; &nbsp;#echo $<span style="color: #000000;">&#40;</span>OBJS<span style="color: #000000;">&#41;</span>, + >> b32.bc<br />&nbsp; &nbsp;echo alert.exe, + >> b32.bc<br />&nbsp; &nbsp;echo alert.map, + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHx.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rtl.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\vm.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\lang.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\macro.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rdd.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfntx.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfcdx.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbffpt.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\debug.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\common.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pp.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pcrepos.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\ct.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\zlib.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbzip.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\libmisc.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\tip.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\png.lib + >> b32.bc<br /><br />&nbsp; &nbsp;rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />&nbsp; &nbsp;rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddads.lib + >> b32.bc<br />&nbsp; &nbsp;rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\Ace32.lib + >> b32.bc<br /><br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc &nbsp; <br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\psapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />&nbsp; &nbsp;echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, >> b32.bc<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> EXIST Alert.res echo Alert.res >> b32.bc<br />&nbsp; &nbsp;$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br />&nbsp; &nbsp;#del b32.bc<br /><br />.PRG.OBJ:<br />&nbsp; $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />&nbsp; $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />&nbsp; <span style="color: #000000;">echo</span> -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />&nbsp; echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />&nbsp; $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp $&.c<br />&nbsp; del tmp<br /><br />#Alert.res : <span style="color: #000000;">Alert</span>.rc<br /># &nbsp;$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r Alert.rc</div>[/code:o306qu25]
Borland Make Utility Issues
Hello James You should change in your mak-file! [code=fw:19632g94]<div class="fw" id="{CB}" style="font-family: monospace;">.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />#.path.C   = .\obj  thats is wrong, see  <span style="color: #00C800;">next</span> line<br />.path.C   = .\<br />.path.rc  = .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG =        \<br />alert.PRG    \<br />one.PRG<br /><br />C =     \<br />#there you have note only files which source is in C-Code delete your lines alert.c and one.c<br />#two.C                 <br /><br />PROJECT    : <span style="color: #000000;">Alert</span>.exe<br /># and rest <span style="color: #0000ff;">of</span> your mak-file<br /> </div>[/code:19632g94] that's all - it will run fine!
Borland Make Utility Issues
Anton, Putting the C files in or not makes no difference. If a PRG is edited and saved, the C and OBJs are not regenerated. It just relinks the EXE without the changes using the old OBJs. I can't figure out how to force the make file to check the date-time stamps and then recompile if needed. James
Borland Make Utility Issues
James, Please remove this: C = \ alert.c \ one.c #two.C and this also: Alert.exe : $(PRG:.PRG=.OBJ) [color=#FF0000:2dsvvxgu]$(C:.C=.OBJ) [/color:2dsvvxgu]
Borland Make Utility Issues
Antonio, I had already tried that, but I just did it again and there is no difference. I have tried each one of these variations: Alert.exe : $(OBJS) Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) Alert.exe : $(PRG:.PRG=.OBJ) And I tried it without any of the above and none of those tests force recompiling of the OJBs and Cs. Is it working for you? James
Borland Make Utility Issues
James, These are working perfectly fine: go.bat [code=fw:tudyp4yb]<div class="fw" id="{CB}" style="font-family: monospace;">@<span style="color: #00C800;">if</span> not exist obj mkdir obj<br />c:\bcc7\bin\make -f test.mak</div>[/code:tudyp4yb] test.mak [code=fw:tudyp4yb]<div class="fw" id="{CB}" style="font-family: monospace;">#Borland make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2005</span><span style="color: #000000;">-2017</span><br /><br />HBDIR=c:\xharbour<br />BCDIR=c:\bcc7<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.OBJ = .\obj<br />.path.PRG = .\<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />.path.C   = .\obj<br />.path.rc  = .\<br /><br />PRG =        \<br />alert.prg    \<br />one.prg<br /><br />PROJECT    : <span style="color: #000000;">Alert</span>.exe<br /><br />Alert.exe  : $<span style="color: #000000;">&#40;</span>PRG:.prg=.obj<span style="color: #000000;">&#41;</span><br />   echo off<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\c0w32.obj + > b32.bc<br />   echo obj\alert.obj obj\one.obj, + >> b32.bc<br />   #echo $<span style="color: #000000;">&#40;</span>OBJS<span style="color: #000000;">&#41;</span>, + >> b32.bc<br />   echo alert.exe, + >> b32.bc<br />   echo alert.map, + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHx.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rtl.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\vm.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\gtgui.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\lang.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\macro.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rdd.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfntx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbfcdx.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\dbffpt.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbsix.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\debug.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\common.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pp.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\pcrepos.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\ct.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\zlib.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\hbzip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\libmisc.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\tip.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\png.lib + >> b32.bc<br /><br />   rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\rddads.lib + >> b32.bc<br />   rem echo $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\lib\Ace32.lib + >> b32.bc<br /><br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\cw32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\import32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\uuid.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\ws2_32.lib + >> b32.bc   <br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\odbc32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\rasapi32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\nddeapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\msimg32.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\psapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\gdiplus.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\iphlpapi.lib + >> b32.bc<br />   echo $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\lib\psdk\shell32.lib, >> b32.bc<br /><br />   <span style="color: #00C800;">IF</span> EXIST Alert.res echo Alert.res >> b32.bc<br />   $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br />   #del b32.bc<br /><br />.prg.obj:<br />  $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /L /N /W /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />alert.res : <span style="color: #000000;">alert</span>.rc<br />#  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\brc32.exe -r Alert.rc</div>[/code:tudyp4yb] alert.prg [code=fw:tudyp4yb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   One<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:tudyp4yb] one.prg [code=fw:tudyp4yb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> One<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:tudyp4yb]
Borland Make Utility Issues
Antonio, I had all kinds of trouble after copying all your files from your previous message. Mostly they were due to the fact that the forum replaces tabs with spaces. Now I am still getting this error: [code=fw:j2npyhiv]<div class="fw" id="{CB}" style="font-family: monospace;">C:\Users\James\Documents\Projects\Make\Antonio>c:\bcc7\bin\make -f test.mak <br />MAKE Version <span style="color: #000000;">5.41</span>  Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">2014</span> Embarcadero Technologies, Inc.<br />Fatal: <span style="color: #ff0000;">' '</span> does not exist - don<span style="color: #ff0000;">'t know how to make it<br /><br />Process completed, Exit Code 1.<br />Execution time: 00:00.217<br /></span></div>[/code:j2npyhiv] Which, of course, is not helpful at all. I do note that only the alert.obj and alert.c files were generated, not the files for One.prg. Will you please send me all the files in a zip (no need to rename "zip"). Regards, James
Borland Make Utility Issues
Antonio, Also, I keep getting this error: [code=fw:3hdm3mok]<div class="fw" id="{CB}" style="font-family: monospace;">Fatal: <span style="color: #000000;">Too</span> many DEF file names: <span style="color: #000000;">c</span>:\bcc7\lib\psdk\rasapi32.lib</div>[/code:3hdm3mok] I have never seen that before, and I don't know what it means. If I leave that LIB out, then I get the same error at the next LIB in the list. I can't imagine that six lines of code would cause this, so the problem seems like it is not in the code. I found an explanation on the Embarcadero site, but it doesn't help much: [url:3hdm3mok]http&#58;//docwiki&#46;embarcadero&#46;com/RADStudio/Seattle/en/Too_many_DEF_file_names_%27identifier%27[/url:3hdm3mok] James
Borland Make Utility Issues
Antonio, When you say: [quote:33t9djti]These are working perfectly fine:[/quote:33t9djti] Do you mean also that the OBJs and Cs are getting recompiled when any change is made to a PRG? Or, just that it compiles without error? James
Borland Make Utility Issues
James, > Do you mean also that the OBJs and Cs are getting recompiled when any change is made to a PRG? Yes