c++builder

example of embarcadero WindowHandleToPlatform c++

喜夏-厌秋 提交于 2019-12-02 16:01:07
问题 I need an example of WindowHandleToPlatform for c++ builder I want to use the handle to do bitblt and other functions to a form I can do this using VCL and works great. Think WindowHandleToPlatform is the solution for firemonkey, but documentation is very poor Thanks 回答1: Try this: #include <FMX.Platform.Win.hpp> void __fastcall TMyForm::DoSomething() { TWinWindowHandle *ThisHandle = WindowHandleToPlatform(this->Handle); if (ThisHandle != NULL) { HWND hWnd = ThisHandle->Wnd; if (ThisWnd !=

Recommendations for a docking library for Delphi / C++Builder?

孤街醉人 提交于 2019-12-02 14:28:12
My team is currently thinking of moving our existing MDI-based application to a more modern, docking-based approach. We're still thinking, but we'd like to move it to something like VS2010's docking and visual look: This has the following features: Shows a blended outline where the window will dock Docks into tabs, as well as side-by-side Allows docking by dragging and releasing over an image showing the dock position (I call this a 'docking widget' below) Looks pretty good too (theme / UI-wise) I am having trouble finding a good-quality docking library to use with RAD Studio 2010 and am

Is it possible to decompile C++ Builder exe? Is C++ Builder exe safe?

眉间皱痕 提交于 2019-12-02 12:04:30
Is it possible to decompile C++ Builder exe? Is C++ Builder safe programming tools or anyone can decompile it and see the code? The short answer, yes, it can be decompiled, and it's not "safe". Anything ran on a computer can be disassembled and from that inspected by reading the disassembly. Decompiling would mean restoring even some of the original compiled source code - which indeed is possible, to some extent. After all, it is "just" about writing a program which can translate assembly to the desired language. If a human can do that, then a program can do that too, because it is only about

Linker error “contains invalid OMF record” 2

无人久伴 提交于 2019-12-02 09:15:51
问题 I'm working with Embarcadero XE8 C++ builder 32 bit. I was adding a library to my program for solving the Unresolved external error . When I added the library I got the error as in the title. So I searched the web and found this topic on stackoverflow: Linker error "contains invalid OMF record" As it says the COFF2OMF tool, CAN work. Sadly it didn't work for me, I give a 7mb library file, when I convert it with the tool it's only 41kb... so I guess the convertion failed. When I add the

example of embarcadero WindowHandleToPlatform c++

我只是一个虾纸丫 提交于 2019-12-02 07:35:45
I need an example of WindowHandleToPlatform for c++ builder I want to use the handle to do bitblt and other functions to a form I can do this using VCL and works great. Think WindowHandleToPlatform is the solution for firemonkey, but documentation is very poor Thanks Try this: #include <FMX.Platform.Win.hpp> void __fastcall TMyForm::DoSomething() { TWinWindowHandle *ThisHandle = WindowHandleToPlatform(this->Handle); if (ThisHandle != NULL) { HWND hWnd = ThisHandle->Wnd; if (ThisWnd != NULL) { // use ThisWnd as needed... } } } Or use FormToHWND() instead (which uses WindowHandleToPlatform()

pass parameter using system command

别来无恙 提交于 2019-12-02 07:23:07
I have an executable program that runs in several pc's in a network. At first it gets the host name (pc-001.. pc-013 etc). Then i need to mount a network drive (server1) on even pc's and (server2) on odds one based on its host name. My problem is that i use system call to run dos command 'net use' for example system ("net use x: \\\\server1\\shares /user:username pass"); How can i pass a variable to username? username is the host name which i know its value and pass is the same for all computers. You could build the command passed to system e.g. like char cmdbuf[256]; snprintf(cmdbuf, sizeof

Firemonkey: TGrid usage on Embarcadero C++ Builder XE3

为君一笑 提交于 2019-12-02 07:16:15
I'm try to build a tool that reads data from a database and displays it as a table using a TGrid in Firemonkey. I need to use different types of columns like TCheckColumn and TPopupColumn but can't find any good guide or example on how to use them in C++ Builder. Any way, I managed to understand the usage of the TStringColumn,TProgressColumn setting the Value of the cell in the TGrid's event onGetValue. Does any one of you know how to set the Value for columns of type TCheckColumn, TImageColumn and TPopupColumn? thanks Daniele ---UPDATE--- I managed to use the TProgressColumn. This is what I

Seeking floorplan design VCL toolbar

空扰寡人 提交于 2019-12-02 04:53:21
问题 I'm looking for a VCL component for C++ builder. It should preferably have a toolbar with drag & drop functionality. I want to define a building or area (which might not be rectangular) and split it into "rooms" (or areas, or whatever you want to call them). And I want to be able to put "doorways" (or passages, etc) from a room into its neighbours. is there such a thing? Preferably free. Thanks. In case anyone wants to know the answer, I have verified with TMS that the diagram studio can

Access remote database using DataSnap technology in C++ Builder 10.1 Berlin

。_饼干妹妹 提交于 2019-12-02 03:58:40
How to query and get results from remote database using DataSnap technology in C++ Builder 10.1 Berlin ? I want to build a simple solution having two VCL Forms Applications, like client(1) and server(2), running on two different windows os computers, connected on same local network. But I cannot accomplish this simple task and this is what I tried to do: On the server application (2), I use: TSQLConnection *SQLConnection1; TSQLQuery *SQLQuery1; and I will load a SQLite database version 3: if (SQLConnection1->Params->IndexOf("Database") == -1) { SQLConnection1->Params->Add("Database="+Form-

Initializing part of function only once

本秂侑毒 提交于 2019-12-02 02:18:35
问题 I have a function with a small bit which I want to initialize once e.g. void SomeFunc() { static bool DoInit = true; if (DoInit) { CallSomeInitCode(); DoInit = false; } // The rest of the function code } If this function is called many times it leaves one unnecessary if (DoInit) which can't be optimized. So why don't I do initialization elsewhere like constructor? Because, logically this initialization code best fits inside this function and it is easier to maintain that way, despite the fact