c++builder

How to adjust DBGrid columns width automatically

江枫思渺然 提交于 2019-12-08 09:50:08
问题 I've been try to use this Delphi code with C++ Builder XE. I manually convert the language into C++ Builder language. This procedure was working correctly. When I try to maximize the form holding the DBGrid, this procedure successfully split the columns width according to the grid width. However, if I try to minimize the form width using mouse control at the right or left of form, this procedure weren't adjust the column width to the length of the values or length of the labels on each

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

雨燕双飞 提交于 2019-12-08 06:53:03
问题 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 button was set to akRight,akBottom. On XP and prior Windows, everything was fine. On Vista, using Aero, the button appeared 4 pixels too far to the right. The

updating boost libraries for Rad Studio

痞子三分冷 提交于 2019-12-08 06:38:15
问题 I need to update boost libraries to version 1_46, currently Rad Studio XE/2010 have 1_39 version. When I try just to overwrite boost include path compile fails with various errors from Borland VCL. When i try to add new boost libs in other path keep previous version it also fails with compile condition errors when constructing std::* classes. I need shared_memory_manager support that is available only in new boost versions. Is there any other ways to upgrade boost libraries or use shared

Numeric edit control with flat button inside and no calculator

折月煮酒 提交于 2019-12-08 06:09:49
问题 I'm writing a C++ project with RAD Studio, but this also applies to Delphi. I need an edit control where user can only enter floats (2 decimal places) and can restore the original value (taken from a variable, not important here) clilcking on a button (actullay an icon) inside the edit control itself. This is what I've done, using a TJvCalcEdit from JEDI library. Control definition: object Sconto1: TJvCalcEdit [non-important attributes...] ButtonFlat = True Glyph.Data = {

Drag and drop images in C++ Builder 6

不羁的心 提交于 2019-12-08 05:57:28
问题 I'm making a Puzzle program and I now how to move the picture parts with navigation keys but how do I do that using mouse ? I've tried using this but picture is acting like crazy Image1->Top=Mouse->CursorPos.x; Image1->Left=Mouse->CursorPos.y; Any help? Edit: I put this in Timer but Image started blinking in two places at once... int difference_x=Form1->Image1->Left - Mouse->CursorPos.x; int difference_y=Form1->Image1->Top - Mouse->CursorPos.y; int xxx=Mouse->CursorPos.x - difference_x ; int

Android JNI bridge Toast C++ not working - How to fix it?

大城市里の小女人 提交于 2019-12-08 04:13:21
问题 I'm trying to solve a little problem with my hpp unit. I found some examples on the internet showing how to Toast an information on screen with an Android JNI bridge, but it was just in pascal (delphi), so I decided to use the same pas file but with it an hpp file for conversion. Till now I got it: #ifndef Android_Jni_ToastHPP #define Android_Jni_ToastHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warnings off #pragma option -Vx // Zero-length empty class member

Is there a working example of COM event handling in C++ Builder?

狂风中的少年 提交于 2019-12-08 02:28:36
问题 I am trying to connect a C++ Builder app with a .NET service app, and would like the .NET service app to be able to send events back to the C++ Builder app. Is there a working example of a C++ Builder app which can handle COM events? 回答1: There was an error in the DocWiki regarding handling COM Events. I was able to collect some examples from various places, and put them together here for reference. The .NET application has the following: using System; using System.IO; using System.Runtime

Spell checker in TWebBrowser (TEmbeddedWB) control

随声附和 提交于 2019-12-07 14:47:28
问题 Internet Explorer 10 has built in spell checker and it works just fine. I tried to create a small HTML page to test it with following contents: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD> <META name=GENERATOR content="MSHTML 10.00.9200.16721"></HEAD> <BODY spellcheck=true contentEditable=true style="MARGIN: 0.5em"> <P>Theze ara mispeled wordz</P> </BODY></HTML> All that is needed is to put properties

“Unable to perform link” error when compiling in RAD Studio XE8

旧街凉风 提交于 2019-12-07 14:41:02
问题 The compiler is giving me an error (shown in the pic) even if I run the IDE as an administrator. Can anyone help to solve the problem? 回答1: Your linker is trying to allocate 128 MB of memory. The following info from Embarcadero was recently posted on the Embarcadero forums: Error detected (LME288) in Seattle 10 update 1 The error is an "out of memory", error. The reason for "Out Of Memory" errors (which come in different guises) in the linker, is that the linker has to pre-allocate memory in

Linker error “contains invalid OMF record”

吃可爱长大的小学妹 提交于 2019-12-07 13:18:31
问题 In C++ Builder when I compile I get [ilink32 Error] Error: 'C:\PATH\TO\A\LIB\INCLUDED\IN\THE\PROJECT\ALIBRARY.LIB' contains invalid OMF record, type 0x21 (possibly COFF) When I convert .lib with utilities coff2omf , new lib looses significant functions. 回答1: C++Builder cannot use .lib files from other compilers, only its own. If the .lib file is an import lib for a DLL, use C++Builder's command-line IMPLIB tool to create a new .lib file from the DLL directly. If the .lib file is a static