Questions tagged [c++builder]
Embarcadero C++Builder is a RAD C++ environment (compiler system & IDE) and component framework for Windows, OS X, iOS and Android.
3,169
questions
0
votes
0
answers
13
views
What Prevents C++Builder "Method Toxicity Metrics..." from Listing Any Methods?
I'm using C++Builder 11.1. I have a completed 32-bit app in Debug configuration and want to check the toxicity metrics. When I open Project > Method Toxicity Metrics..., the window opens with ...
-7
votes
0
answers
83
views
C:\PROGRAM FILES (X86)\BORLAND\CBUILDER5\PROJECTS\TEST\AROLABELEDEDIT.HPP' contains invalid OMF record, type 0x2f [closed]
Actually, i am working with C++ Builder and I had an error when I tried to compile my project, I did my search in internet, but I didn’t found a solution for the problem. Someone can help me?
PS: I ...
0
votes
1
answer
37
views
Passing parameters to TThread::Queue using lambda in C++ Builder
I want to do something like this:
void TForm2::SetMsg(UnicodeString fMsg)
{
// If thread is not main Queue...
if (GetCurrentThreadId() != System::MainThreadID)
{
TThread::Queue( nullptr, [&...
-1
votes
1
answer
76
views
Stop WndProc processing during shutdown of the app
I have defined a WndProc which looks similar to below (the code is written in C++Builder, but it applies in similar form to Delphi as well):
#define WM_SETTINGS_UPDATE WM_APP + 1234
#define ...
0
votes
0
answers
25
views
TIdHTTP::OnAuthorization in multithreaded application
I'm writing a DLL in C++Builder XE6 to communicate with a REST server. The DLL creates a TThread-derived thread to do GET requests in the background, using TIdHTTP. The DLL also exports functions to ...
0
votes
2
answers
116
views
Is 'bool' 1 or 2 bytes in C++Builder? I'm getting conflicting results
The following code returns a bool in the AL CPU register:
bool Exiting;
bool WINAPI IsExiting()
{
return Exiting;
}
which compiles to:
00488BA4 55 push ebp
00488BA5 8BEC ...
0
votes
2
answers
40
views
C++Builder App Default Icon Should Not Appear in Explorer
I am creating a small, self-contained app (no dynamic RTL or runtime packages) and have assigned an icon (.ico) file. The icon appears in the corner of the main form and on the taskbar. But the ...
0
votes
0
answers
24
views
Float decimal formatting for RAD Studio [duplicate]
I am trying to format float numbers in RAD Studio C++ Builder, but for some reason when I multiply a whole number with a number like 0.01 for example, the result gives about 15 decimal points. I tried ...
0
votes
1
answer
39
views
How to share data between a TThread in a DLL and the main thread?
I'm writing a DLL in C++Builder XE6, that creates a separate thread (derived from TThread) to retrieve JSON data from a REST server every X seconds (using TIdHTTP), and parse the JSON data.
The thread ...
1
vote
1
answer
84
views
C++Builder Compiler Version
If I can do this in Delphi,
{$IFDEF VER350}
/* Declare, define, do stuff ... */
{$ENDIF}
why can't I do this in C++Buider,
#ifdef VER350
// Declare, define, do stuff ...
#endif
How do I get ...
0
votes
1
answer
69
views
How to handle authentication with TIdHTTP
I'm using C++Builder XE6 and TIdHTTP to communicate with a REST server in a Windows application.
I need some advice on how to handle authentication.
Given the following code:
#include <IdHTTP.hpp&...
0
votes
1
answer
79
views
Infinity in Delphi unit is translated to +INF in .hpp file
I'm using C++Builder XE6 and wrote the following Delphi unit:
unit JSONUtils;
interface
uses
System.JSON, System.Math;
function GetJSONDouble (Value: TJSONValue; Path: string; Default: Double = ...
1
vote
1
answer
58
views
Unresolved external when using TJSONValue::GetValue<T>()
I'm using C++Builder XE6 and want to get the value part of some key/value pairs in JSON like this:
#include <System.JSON.hpp>
TJSONValue* Root = TJSONObject::ParseJSONValue("{\"...
0
votes
2
answers
39
views
Embed Large Text File into C++Builder Windows App
I want to embed a large dictionary text file (more than 66k words of no more than 30 characters per word, with one word per line) into a C++Builder executable to run on Windows. How can that be done?
1
vote
2
answers
227
views
C++Builder 11.1 LSP does not work with classic Borland compiler
Has LSP been removed for the classic Borland compiler in C++Builder 11.1?
Now it is marking error messages even in the includes of the VCL.
A new empty project shows errors, and LSP is not working ...
0
votes
2
answers
111
views
Notifying a control that another control has a state change
I am using C++Builder Enterprise and need some ideas.
I have a Form with a bunch of TButton and TSpeedButton controls on it. What I want to have happen is that, when a given button is pressed, I want ...
0
votes
0
answers
68
views
Debug linked static library under C++Builder
I am working on a new C++ project. I am using C++Builder 10.3 Rio.
Due to slow compilation, I have to split the project up, with the main project (VCL) and multiple static libraries, all in one ...
0
votes
0
answers
39
views
Dragging a TPaintBox while keeping its content static
We are having a VCL TPaintBox on which we display video. Its parent is a TScrollbox.
When zooming, the PaintBox gets larger than the scrollbox, so parts of the image is hidden.
We have implemented the ...
0
votes
1
answer
115
views
Issue when trying to write to memory mapped file, shared between two processes (32 bit -> 64 bit)
As a temp solution I'm implementing a way to get some data via a 32-bit DLL to a 64-bit application.
I'm keeping it as simple as possible, it doesn't need to be high performance or the most beautiful ...
0
votes
1
answer
74
views
How to customize the Caption property of a VCL component
(C++Builder 11)
Since I need to use a TSpeedButton with a caption over thr glyph (not on the top, on the bottom, on the left or on the right of the glyph) I followed Ted Lyngmo suggestion (Caption ...
0
votes
0
answers
33
views
C++ Builder TTabControl tabs displayed right to left [duplicate]
I put a TTabControl on a TForm in C++Builder VCL, but I can't find any right-to-left options in the Form's properties or the TTabControl's properties to set tabs from left to right, like in Visual ...
0
votes
0
answers
56
views
Caption position in a TSpeedButton
I'm using C++Builder 11 Alexandria.
Is there a way to position a SpeedButton caption always centered even if there is a glyph?
Caption can be positioned at right, at left, at top or at bottom of the ...
2
votes
1
answer
56
views
c++builder FDConnection to SQLite after compile the exe
I created a Script with c++Builder 11 with Datas stored in a sqlite3 db File.
To Connect to the Sqlite3.db, i used the FireDAC-Connection inside c++builder and all works fine.
In the Connection-...
1
vote
1
answer
80
views
What's the difference between IMPLIB and MKEXP in C++Builder to create import libraries?
After asking how to use PathCchCanonicalizeEx with C++Builder 10.2, I was told to create missing import libraries using the tools IMPLIB or MKEXP. I've tested both apps and they are creating lib files ...
0
votes
1
answer
19
views
Assigning TScrollBox event during runtime - incompatible types
Using RAD Studio 10.4.2:
I create TScrollBox during runtime:
TScrollBox* sb = new TScrollBox(this);
sb->Parent = this;
sb->Align = alClient;
sb->AlignWithMargins = true;
sb->Margins->...
0
votes
0
answers
33
views
events that can be used for free drawing
I'm trying to make a free drawing program with c++ builder and graphics32 component.
Usually people use mousedown, mousemove, mouseup events to make this kind of program
but it doesn't work well when ...
-2
votes
2
answers
181
views
std::iterator is obsolete? What to use then? [closed]
for(std::vector<TMenuItem*>::iterator itItem=miMoreStylesArray.begin(); itItem<miMoreStylesArray.end(); itItem++) {
If std::iterator is being fazed out, then what do I use instead to iterate ...
0
votes
1
answer
102
views
C++Builder correct way to Load string from ressources
I am new in either c++, and c++builder(11 v-28), i have put in ressources a text file(via projet->Ressources and Images), but i can't find any method to retrieve my text from ressources, LoadStr(..)...
0
votes
0
answers
32
views
Public symbol '__tpdsc__ void' defined in both module X and Y
Using C++ Builder 11.
I split some files up (in a project that built fine so far) and added them to the project individually.
Since then, and only when compiling 32-bit (not 64 bit), I get this weird ...
-1
votes
1
answer
76
views
C++ How does one insert to, and read from std::map with struct as value correctly?
I have a struct with a constructor containing 3 String parameters.
The goal is to map integer values as key to instances of said struct (inside TContactTable Class).
The part of code inserting the ...
0
votes
1
answer
33
views
First login attempt works if it's correct, but if it's incorrect then other correct attempts don't work
void __fastcall TFormLogin::btnLoginClick(TObject *Sender)
{
UnicodeString query = "select * from admin where korisnickoIme = '" + editKorisnicko->Text +
"' ...
0
votes
0
answers
82
views
Why sporadic 'Timed out errors' using Indy are not solved until restarting the PC?
I use Indy components in a client app created with Rad Studio Rio to call several web services. This client app is running under Windows Server 2012 in an Azure VM. Sporadically I get "timed out&...
0
votes
0
answers
81
views
Why not use a default 2 or 4 MB stack size in C++ Builder 64 bit applications?
This is mainly out of curiosity, perhaps there's a good reason I'm not aware of ?
The question is also born out of the fact that I ran into a stack overflow because of a weird data-set that caused a ...
1
vote
1
answer
46
views
How to select multiple items in a TTreeView in code
I'm trying to select all the child node of a parent node when the parent is clicked, but when I for each node set the Selected = true i only end up with the last one being selected.
MultiSelect is ...
0
votes
0
answers
85
views
Fade2D library & C++ Builder
I wish to use Fade2D library in my C++Builder projects.
Libraries are in MS Visual Studio's and using them raised an exception:
[ilink32 Error] Error contains invalid OMF record, type 0x21 (possibly ...
0
votes
1
answer
38
views
c++builder linker problem with Abbrevia GetIt package : ilink32 error unresolved external
I am trying to use the abbrevia package ( https://github.com/TurboPack/Abbrevia ) with c++Builder in a console application.
First i tried to manually install the package. But then i found it on GetIt. ...
0
votes
1
answer
49
views
How to use PathCchCanonicalizeEx with C++Builder 10.2?
I have a legacy Windows project using the legacy 32 Bit C++ compiler. For various reasons I need to use the Windows 8+ function PathCchCanonicalizeEx. C++Builder seems to provide the header and some ...
0
votes
0
answers
29
views
How do I need to integrate Windows SDKs into existing project in C++Builder 10.2?
I have a legacy Windows project using the legacy 32 Bit C++ compiler. For various reasons I need to use the Windows 8+ function PathCchCanonicalizeEx. C++Builder seems to provide the header and some ...
1
vote
1
answer
72
views
Deleting dynamically created component?
In the OnCreate event, I have code which adds menu items to a std::vector (for the purposes of this question, it could be buttons, or any other components we create dynamically with the new operator):
...
1
vote
1
answer
59
views
VirtualStringTree how to disable alpha blended selection while doing drag and drop?
When drag and dropping items from one TVirtualStringTree to another TVirtualStringTree how do I disable semi-transparent selection block shown while dragging the selection over the destination tree?
I'...
0
votes
0
answers
42
views
C++Builder TFileStream compatibility between debug and release app versions
Using TFileStream to write various values and Strings to a file I found that I can't share file between the debug and release versions of my application.
Looking further it seems that enum types are ...
0
votes
0
answers
38
views
TPopupMenu and TMainMenu arrow on the right custom painted vs Windows theme?
I recently ported my C++ Builder 2009 project to C++ Builder 11 and I notice that the TMainMenu and TPopupMenu items with sub-items still get an old style arrow on the right.
The IDE, built on the ...
0
votes
1
answer
88
views
reinit.pas translated to C++
I have semi-successfully translated reinit.pas to C++ to use it in my project. The part where int __fastcall LoadNewResourceModule(LCID locale); is called works fine, in fact I can even call it prior ...
0
votes
0
answers
39
views
Is there a way to disable icon scaling in TTreeView
I have assigned a 16x16 icons TImageList to a TTreeView object.
Same ImageList is also assigned to a TListView.
When I change the OS dpi setting to display everything at 150% (for instance), the text ...
0
votes
1
answer
39
views
Assigning OnDrawItem to TMenuItem dynamically in C++Builder
TMenuItem *mi = new TMenuItem(this);
mi->OnDrawItem = &miThemesDrawItem;
results in error:
[bcc64 Error] _TForm1.cpp(280): assigning to 'Vcl::Menus::TMenuDrawItemEvent' (aka 'void ((...
0
votes
0
answers
32
views
C++Builder (or Delphi) How to get font name and size of a themed Item?
How do you get font name and size of a themed item? For example, a TMenuItem.
NOTE: Using TStyleManager::ActiveStyle->DrawText function is not an option for me. I want an actual font name.
0
votes
1
answer
49
views
"Property reference" of the class
Is there a reference to a class property in C++Builder, analogous to a regular reference in C++? To understand what I mean, I will give the code (so far this is my solution to the problem):
void ...
0
votes
0
answers
43
views
Overlay icons are painted stretched
I am porting a C++Builder 2009 project to C++Builder 11.
For some strange reason overlay icons are painted stretched in a custom made object that inherits from TTreeView.
It obviously works properly ...
0
votes
0
answers
69
views
VirtualTreeView how to use Select All action?
In 6.0 version and later of VirtualTreeView, it stopped reacting to standard TEdit actions like Copy, SelectAll and others. It was moved to the new unit VirtualTrees.Actions.
I cannot find a single ...
0
votes
0
answers
35
views
free drawing canvas with mouse [duplicate]
I'm making a kind of paintbrush program with a c++ builder.
The program works well with mouse, but there's a recognition problem when I draw with a tablet
especially writing letters.
I submit the ...