c++builder

The future of C++ Builder

A few years ago C++ Builder from Borland with its excellent VCL gui library and its gui designer was the best IDE for C++ development on Windows. Once beloved, for a couple of years now Builder has been losing users steadily. What do you think are the biggest mistakes Borland/Inprise/CodeGear/Embarcadero has made? ...

Calculate time between 2 TDateTime, with a twist

I need to find out how to get the time between 2 times, but only if it is within work hours(Stored in a database) This is what I got for now, but it is totally wrong. the total won't bee correct. int __fastcall Organisasjon::CalculateResponsetimeInOpeninghours(std::auto_ptr<DBCommand> cmd, long orgid, TDateTime starttimeIn, TDateTime e...

How to disable copy/paste in TEdit

I would like to prevent copy, cut and paste in my TEdit. How can I do this? I tried setting the Key=NULL on KeyDown event when CTRL+V was pressed on the control, but it didn't work. ...

From where can i download borland c++ builder

I need Borland C++ Builder as soon as possible, i did waste hours searching for free download sites, but they were all useless. ...

Convert C++Builder AnsiString to std::string via boost::lexical_cast

For a school assignment I have to implement a project in C++ using Borland C++ Builder. As the VCL uses AnsiString for all GUI Components I have to convert all of my std::strings to AnsiString for the sake of displaying. std::string inp = "Hello world!"; AnsiString outp(inp.c_str()); works of course but is a bit tedious to write and ...

Default File Layout in Codegear C++ Builder (and Delphi)

I've had a major annoyance with the Borland/Codegear C++ Builder IDE for some time now. When I code I always use a standard layout for the code files. I have a standard header that I use, including, ie. the Licens of the file, filename, date, etc. But I haven't been able to find anywhere to insert this, so that when I - for instance - c...

C++ Templates: Coding error or compiler bug?

I'm trying to use templates to get std:list of items, where each item has a pointer to the list which contains it, but I keep hitting a compiler message. Here's a very stripped down version of the code. template <class E> class Item { public: E* owner; // pointer to list that owns us. }; template <class E> class BaseList: p...

Creating a custom project type for Visual Studio to build Borland C++ Builder projects into Visual Studio

Hi, I want to start the develop of a custom project type for Visual Studio that builds a BPR project with Visual Studio. I need some hints to beginning with this project. Where can I find a template for this type of projects? My target is to remove the Borland C++Builder's ugly and unstable interface from the development process and w...

Borland C++ 6 with new multi core processors?

I must make some improvements on an application written in Borland C++ 6. I must purchase new computer for this task. I already have known that BCB 6 has some problems with old Athlon 64 processors (freeze when compile). Howe BCB 6 works with new multi core processors? (INTEL Core 2 Quad Q6600 with ASUS P5QL PRO ) Are there any prob...

What happened to CodeGear's TBitBtn and TButton inheritence chain?

I've recently began to upgrade my RAD Studio 2007 project to RAD Studio 2009. One thing I noticed is when seemingly simple code all of a sudden failed to compile. Example Code: class CButtonPopupMenu { // Snip public: void Init( TButton* SrcButton ) { SrcButton->OnClick = OnButtonClick; } private: void __...

BDS2006, C++: How to make own form template for creating dialogs?

When you create dialog in BDS IDE it's derived from TForm class and it's just an empty form. As our system has a GUI standard for how all forms should look like it would be nice to make a template and use it as a base for future dialogs instead of plain TForm. For example all our dialogs have our custom component with buttons aligned t...

#region equivalent in CodeGear RAD Studio? Similar way to group code?

I was wondering if there is an equivalent to Visual Studio's #regions in RAD Studio. We use CodeGear's delphi and c++builder IDEs where I work and I would love to be able to use something like regions. My coworkers and I have yet to find an equivalent way of grouping code... do you know of any? Thanks! ...

Flatten a TSpeedButton?

Is there anyway to force a TSpeedButton to be redrawn flat? When using a touch screen monitor, the mouse does not move out of the button, so the raised border stays on screen, even when you click on a different button. ...

Handle access violation exception in C++ Builder?

I'm trying to do: try{ int * i = NULL; *i = 3; }catch(Exception &Err){ ShowMessage(Err.Message); } I though that this should catch access violation exception and handle it by displaying an error message. But for some reason I get simple 'Access Violation' message instead of full one: 'Access Violation XXX in module YYY. W...

Why is CodeGear C++Builder failing to create pre-compiled headers?

Problem In CodeGear C++Builder 2009 we are using the pre-compiled header injection to greatly reduce our compile times. We have the same header file being injected into multiple projects. When compiling some projects, the compiler kicks out the following warning: [BCC32 Warning] Dateutils.hpp(43): W8058 Cannot create pre-compiled head...

Uninitialized memory in C++Builder / Delphi

Are uninitialized variables in Delphi guaranteed to have any particular value on the stack? on the heap? Since C++Builder generally follows Delphi's design, are uninitialized variables in C++Builder guaranteed to have any particular value on the stack? on the heap, for member variables of classes derived from TObject? on the heap, ...

C++ Builder vs Delphi vs MFC

I am learning MFC and find it not that easy to use. I've heard a lot about Delphi . researching on Delphi lead me to C++ Builder. does C++ Builder offer a serious and good alternative to C++/MFC ? is C++ Builder better than MFC ? is C++ Builder better than Delphi ? (I've heard many goood things about Delphi) can any one give me a comp...

Installing multiple library versions in Delphi / C++Builder

How I can install multiple versions of a library in Delphi or C++Builder? For example, I might want to be able to develop the next version of our app using the current versions of JCL and JVCL while still being able to compile the release version of our app using whatever version of JCL and JVCL were tested for that release. Using more...

No database connectivity from within Windows Service

Hi folks, I'm trying to write a service in CBuilder 6 (target XP Pro). Part of this service's job is to monitor and update a table on a database. We use direct ODBC to connect to the database, but the problem is happening with ADO as well, so we'll use that for simplicities sake. You can see my code below. This is called from a func...

Borland C++ Builder 2007 - [Linker Error] Unable to open file 'CHARTGROUPFRAME.DFM'

Hi all, IDE had been working very well, until today. When I try to compile my priject I get this : [Linker Error] Unable to open file 'CHARTGROUPFRAME.DFM' CHARTGROUPFRAME.CPP Unit is a part of a project, so this is bug of course. BCB support seems to be pretty much incompetent so far , so I've figured maybe I'll have better l...