c++builder

Why is my paintBox Canvas being erased when my program is "Not Responding"?

Hello: I have written a small program using Borland's C++ builder, and along the way, everything seemed fine. My program has a map window and a table window, and when a user presses a button, a long process is started that reads in all the map and table information and then displays that. Every time i ran it through the debugger, I had...

Controlling the placement of fsMDIChild windows in Delphi

How do I control the placement of an MDI child window (FormStyle := fsMDIChild) in Delphi or C++Builder? I know that I can set Left, Top, Position, and so on, but for an MDI child in particular, these don't take effect until after the window has already been created and shown in its default location. The result is that creating and pos...

Convert Delphi to Borland C++ builder

Hi there, How to convert this Delphi code : const cnCursorID1 = 1; begin Screen.Cursors[ cnCursorID1 ] := LoadCursorFromFile( 'c:\winnt\cursors\piano.ani' ); Cursor := cnCursorID1; end; to C++ Builder ...

C++ Builder DLL can not link unit obj from a Delphi Package (BPL). How to fix it?

I have a C++ Builder DLL that must link against a Delphi package (BPL), and I think it is possible that the Delphi package may need to be rebuilt to allow it to be used by both C++ Builder and Delphi, but I don't know which options need to be set on the Delphi package. The current problem is that "UnitX.obj" is not found (ILINK32 error)...

Problem migrating type library from C++Builder to QT

Hello. I have a type library compiled with VC6 (APuma.dll) that I load in C + + Builder with this header: [...] typedef TComInterface<IStrings> IStringsPtr; typedef TComInterface<IStringsDisp> IStringsDispPtr; extern __declspec (package) const GUID LIBID_TIGERLib; extern __declspec (package) const GUID DIID__IRecognitionEvents; exter...

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...

Jedi Library and Delphi XE

Typically, the install of the JEDI libraries is done using the installer. Does anybody know if the installer Works with Rad Studio XE (Delphi and Builder) Can be easily modified to do so if not Knows of some manual install instructions? Thanks ...

Accessing an object from a different class - Design

I have three classes, TImageProcessingEngine, TImage and TProcessing TImageProcessingEngine is the one which i am using to expose all my methods to the world. TImage is the one i plan to use generic image read and image write functions. TProcessing contains methods that will perform imaging operations. class TImageProcessingEngine {...

Indy HTTP Client: sessions like in web browser

I'm making a program for registration on a website. For this, I use C++Builder and Indy (TIdHTTP). How it works: Program receives registration page via GET and extracts CAPTCHA picture address from it; downloads the CAPTCHA (GET) and serves it to user; sends the data provided by user to the website in POST request. Problem: The CAPT...

How to check if stored procedure returned a field

I'm using some asp net stored procedures and I do not want edit them. The trouble is when ThisProcedure returns no Field I need. Query->FieldByName("RoleName") // delphi : Query.FieldByName("RoleName") (for TAG %D) and sometimes it works, sometimes I've got error : CommandText does not return a return set I can't avoid it using try c...

OpenGL with pure win32 API on different IDE problem..

Hi, I'm trying to create an openGL app with pure winapi environment (no VCL). For some reason I want my App compiled in both VC2010 & CB2009. So I made a classic bouncing rect gl testing program on VC2010 first and try to ship them to CB2009. Here is my problem: On VC2010 my app compiled and run well. A bouncing rect apear on my hand-ma...

C++ animated cursor

Hi everybody, I'm using this code to invoke animated cursor in C++ builder: void __fastcall TcfListatArtikujtLst::FormActivate(TObject *Sender) { ActiveControl = cxGrid1; Application->ProcessMessages(); const int cnCursorID1 = 1; Screen->Cursors[cnCursorID1] = LoadCursorFromFile("cursors\\hourglas.ani"); Cursor = cnCurs...

IWFile fix for c++ Builder XE?

IWFile is broken in the current release of Rad Studio XE. To fix it, Delphi users are asked to delete the UTF8ContentParser line. http://www.atozed.com/intraweb/blog/20100524.EN.aspx c++ Builder has a line that #includes UTF8ContentParser.hpp. Commenting out this line does not fix the issue. Has anybody figured a way around this for ...

Microsoft ATL equivalent to Borland OleCheck function

Borland C++ Builder provides the function OleCheck(HRESULT Result);. Its description in the documentation is this: OleCheck is used to wrap many COM routines, so that if that routine fails, users will have an opportunity to handle it in the resulting exception that is raised. If ECode is a value less than zero, OleCheck raises...

Should I use ApplyUpdates(0) or ApplyUpdates(-1)?

The Delphi XE dbExpress tutorial in the online documentation uses ApplyUpdates(-1): // Client data set has provider do update. ClientDataSet1.ApplyUpdates(-1); Some online sources however say it would have advantages to use ApplyUpdates(0), and it would be a widespread mistake or bad practice to use -1. Is this true? And when and ...

C++ Builder XE and JEDI JCL

Has anybody successfully compiled the JCL for C++ Builder XE? I have tried on XP and Win7 with no luck. I have filed a bug but this is a show stopper for me right now, so though I would ask here. I am using the latest release from sourceforge. ...

how to get MAC aaddress and Modified date of text file in C++ builders

hi, how to get mac address of pc and modified date of text file in runtime program,using C++ builder,if both matches red color rectangle should come,or else green colour...as an output ...

Using JVCL's debug DCUs with C++Builder

How do I debug JVCL code using C++Builder? I enabled building debug DCUs when I installed JVCL, I turned on "use debug DCUs" under my project's Delphi settings (there doesn't appear to be an analogous option under C++ settings), and I disabled building with packages. In spite of all of this, single step still skips over JVCL code, and ...

How can I programmatically save event handler and then set it in C++ Builder?

I need to temporary remove TFrame's OnExit and OnEnter events, so I'm trying to do following: declare FEnterHandler and FExit Handler: private: // ... TControl *FParentControl; (__fastcall *(__closure)(TObject*))(TObject*) FEnterHandler; (__fastcall *(__closure)(TObject*))(TObject*) FExitHandler; // ... and I inte...

What algorithms / optimisations are there for calculating a conditional subset of elements from an array?

My program often deals with large quantities of data, and one particular component of it creates a subset of that data, based on a condition. You could view this as, having the string, 10457038005502 the problem is to return the first five (say) non-0 elements, that is to return: 14573 In actual fact, each element of this string i...