codegear

How do I use the registry in codegear c++ builder?

In the simplest possible terms (I'm an occasional programmer who lacks up-to-date detailed programming knowledge) can someone explain the simplest way to make use of the registry in codegear C++ (2007). I have a line of code in an old (OLD!) program I wrote which is causing a significant delay in startup... DLB->Directory=pIniFile->Rea...

Problem with IDropTarget when using with a VCL Form

I have a VCL gui developed in Codegear. I have created a DropTarget for the mainform and the DropTarget object implements the IDropTarget interface which allows me to drag and drop files from explorer. Now because I only want some of the child components to be drop targets (not the whole form), I only have the DragEnter method return S_O...

Indenting in Codegear

Is there a way to indent/tab multiple lines in one action in the Codgear RAD Studio IDE? I.e. I would like to be able to highlight multiple lines and indent them all by one tab simultaneously. ...

To restrict size of components at design time: CodeGear C++ Builder

Hi, I am trying to inherit from TButton in order to provide some size aware capabilities, where the buttons are able to resize themselves and/or their font size (within certain constraints) to allow for changes in text e.g. | small | or |   this is a really long   | | sentence on a button | could happily be th...

VCL multiple inheritance

Hi, I'm trying to develop a set of controls which all have a number of common behaviours with respect to sizing. I think that this is an instance where multiple inheritance is required (although am fully willing to accept any advice to the contrary). What I would like to do is basically a mixin pattern class Sizable { ......

Can I tell Borland C++ Builder to copy a file somewhere else after it is built?

I have two computers. One is intended to be left 'free' for high-performance activities (such as playing games) The other is my 'all purpose' computer where I install all the apps I use for creating things, and so on. On the second computer I use Codegear C++ Builder to work on an app that I use on the first computer. If I have BCB co...

How do I convert System::WideString to a char* in C++ and vice versa?

I have a situation where I need to compare a char* with a WideString. How do I convert the WideString to a char* in C++? ...

C++ Compiler Optimization for Fastest Possible Code in RAD Studio 2009

I would like to select the compiler optimizations to generate the fastest possible application. Which of the following settings should I set to true? Dead store elimination Eliminate duplicate expressions within basic blocks and functions Enable loop induction variable and strength reduction Enable pentium instruction scheduling Expan...

ComServer that should return a ComObject

What I am trying to do is transfer an object that has been created on the serverside to the client. I have got it to work well when I using c++ on both server and client side, but I do not get my server to work correct with other languages like .Net, It probably doesn't like the pointers! Does this Serversidecode look correct? Server F...

#pragma once equivalent for Codegear RAD Studio

Is there anything equivalent to #pragma once for Codegear RAD Studio 2009? I am using the precompiled header wizard and I would like to know if it is still necessary to use include guards when including header files? ...

Problem compiling c++ in CodeGear

I have written a C++ program for a University assignment. I used Netbeans 6.8 running on my Mac and the code runs smoothly, no warnings, errors or problems/bugs. However when compiling and running on a Windows computer using CodeGear RAD Studio 2009 (C++ Builder) am getting several errors. [BCC32 Error] main.cpp(51): E2094 'operator<<' ...

C++ Compile problem when using Windows - CodeGear

This is a follow-up question to this one i made earlier. Btw thanks Neil Butterworth for you help http://stackoverflow.com/questions/2461977/problem-compiling-c-in-codegear A quick recap. Im currently developing a C++ program for university, I used Netbeans 6.8 on my personal computer (Mac) and all works perfect. When I try them on my...

Override event handler in C++ Builder

In Codegear C++ Builder, I'm trying to extend the TMemo VCL class to perform some functionality during the OnKeyDown event. I've set up the control and am able to add it to forms and so forth. The problem is that I am unable to capture the OnKeyDown event (or any other event, for that matter). Here is my class: class PACKAGE TREMemoFin...

From CodeGear to Visual Studio 2008

I'm inheriting a native C++ application. It was developed with Borland CodeGear. Right now, I already have a copy of Visual Studio 2008 installed on my system. Is there anything that would prevent me from building the system with Visual Studio, even though it was developed in CodeGear? I'm already familiar with Visual Studio, so that...

CodeGear configuration name

In Codegear 2007, I'm trying to do some file deletion and copying during the pre-build and post-build events that involve folders named after the current configuration. In Visual Studio, this is easily done with the $(ConfigurationName) macro. Is there any equivalent to this in CodeGear? If not, is there a workaround I can use? ...