c++builder

What data provider for a tclientdataset using a csv file?

I have a tclientdataset. It is used to get data to and from a csv file. The csv file may not exist until the application is run. I have the following code in a tbutton... ClientDataSet1->FileName = "c:\\testdata.csv"; ClientDataSet1->Open(); AddFiles(Edit1->Text); ClientDataSet1->SaveToFile("c:\\testdata.csv"); When I run the ap...

Windows API way to search subfolders with wildcards and other criteria in C++?

I think I saw once that it was possible to use the functionality of windows' search feature(s) in code. That it was possible to search for files using a sql query (something like "select filename from filestore where directory = 'c:\somedir' and extention in ('.doc','.txt','.me') and datemodified >= '2009-01-01 00:00:00'" Anyway, even ...

Why do my Borland C++Builder 5 forms with right-anchored controls appear incorrectly on Vista?

Having spent a small age looking for the solution and having now found it, I figured this would be good to document for Stack Overflow. So my answer will follow right after this question. I was using Borland C++ Builder 5. This probably also applies to the equivalent version of Delphi. I had a form with a TButton on a TPanel. The bu...

LIB file output locations for Delphi 2009 packages.

When building a Delphi 2009 component package, how do you specify which directory should contain the resulting .hpp and .lib files needed for C++ Builder users? ...

Windows Subclassing in Borland C++ Builder

We're trying to convert a piece of C++ code written in MFC which uses the CWnd.SubclassWindow method, into Borland C++ Builder code. Does anyone know how to do subclassing (subclass with a TForm object) - we're completely stuck. Any pointers will be much appreciated! TIA! Specifics: We have an existing base class written in Borland C++...

How to write files with (readable) UTF8 characters in C?

I read a file that has utf8 characters like this: FILE *FileIN,*FileOUT; FileIN=fopen("filename","r"); char string[600]; WideChar C[600],S[100]; fgets(string,600,FileIN); wcscpy(C,UTF8Decode(string).c_bstr()); // widechar copy And it reads it perfectly (this is shown in the Editbox when running the program): Edit1->Text=C; Result ==...

C++ Builder runtime error - cannot focus a disabled or invisible window

On main form I have TPageControl and on all of it's tabs I have corresponding Save buttons which are activated on Alt+S combination. Of course, depending on which tab is opened at the moment, the handler for corresponding Save button should be called; but I get "cannot focus a disabled or invisible window" runtime error if I try to save ...

How to disable closure of the main form in Borland C++

When closing an application on close button (FormClose handler is called), there is a dialog if user is sure that he wants to close the application. If the result of the dialog is mrCancel, then I try to set the ModalResult of a main form to mrNone like I do with other forms, but even though, the application still closes. What is th...

How to implement 'open file location' behaviour programmatically (c++ builder)

In Windows Media Player you can right click on a music file and click 'open file location' and it opens an explorer window with the file selected. I want to be able to do this in applications. So given a filename (as an ansi string) I want to be able to go to the file in a new explorer window. ...

How do I run command line "explorer /n, /select,(filename)" in c++ builder?

I've tried shellexecute, I've tried createprocess, I can't seem to get this to do anything. Running the command line manually (at the actual command prompt in a console window) works, but nothing I've tried so far will run it from within a c++ builder app. Obviously (filename) is just a place holder. It would be given a valid file n...

How to check if a unicode character is within given range in C?

The following function was written for java and has been adapted for C. bool isFullwidthKatakana(WideChar C) { return(('\u30a0'<=C)&&(C<='\u30ff')); } The problem is that my framework ("CodeGear C++Builder") shows this error: [BCC32 Warning] Unit1.cpp(101): W8114 Character represented by universal-character-name '\u30a0' ...

Compiling MySQL on Windows with C++ Builder

Possible? To crazy to contemplate? if yes and no (respectively) any idea how to go about doing this? ...

C++ Builder [C++ Error] sysmac.h(58): E2040 Declaration terminated incorrectly

I want to create a C++ Builder DLL project that doesn't use VCL. But I get this error in sysmac. Does anyone know the possible cause of this error? ...

How do I port code for Borland C++ builder to Linux?

I have source code for a Windows DLL that is written in C++ and uses Visual Component Library. Now my task is to port that to Linux, but I don't have source code for the VCL itself, or any kind of documentation (and I have never worked with Borland C++; in my Windows days I used MFC). This should not be all that hard, since my DLL does ...

firebird weird problem connecting locally on just one machine

I've got a seemingly unique issue on just one computer in the company. (had to be my boss's) I've got a program from borland C++ that usese a TSQLConnection. It connects to a local firebird server 2.1.1.17910 running as an application. The other computers work fine. it will ABSOLUTELY NOT connect on this one lappy (local server) for ANY...

Trouble using .NET DLL in Borland C++ Builder 4

I have created a COM callable DLL in C# .NET 2.0 and created a TLB from the assembly using the .NET regasm tool. In Borland C++ Builder 4.0 I go to Project->Import Type Library-> and find my DLL's type library there and click "Ok" to import it. BCB creates an HardwareCheck_TLB.cpp & HardwareCheck_TLB.h file. In a cpp file of the ...

Weird linker error on Borland C++ Builder 6

I've been trying to compile a Borland C++ Builder 6 project, but linker dies with exact following error: [Linker Fatal Error] Fatal: Unable to open file '.OBJ' Strange thing about it is that it doesn't give any file name except the extension. It looks like an internal bug, though googling for it didn't give any results. Has anyone enc...

GotoBookmark tooo slow?

Hi, I'm fixing a C++ Builder 5 application and I have this code: void __fastcall TFPrincipal::DBGModuleStartDrag(TObject *Sender, TDragObject *&DragObject) { m_pParentNodesDragDrop = NULL; DragObject = NULL; bool bAbort = false; m_ListaModulosDragDrop->Clear(); m_ListaContenedoresDragDrop->Clear(); CInfoNode *pInfoN...

A good (and free) VCL GUI alternative

I've got a project with a rather messy VCL codebase built on Borland C++ Builder 6. I intend to rewrite most parts of it since it's hardly maintainable in it's current state. I'm looking for a good and free alternative to VCL. It is a Windows-only closed source commercial project. So main requirements are: Free for commercial closed-s...

Generating a list of events in a Delphi/BCB Project.

I would like to generate a list of events and methods assigned to them in a given BCB project. Is there a way to do this? ...