c++builder

Delphi / C++ builder Windows 10 1709 bitmap operations extremely slow

筅森魡賤 提交于 2019-12-01 11:04:23
问题 Anyone experienced this problem? : It appeared after Windows 10 update to build 1709. After some system up time - a few hours -, bitmap loadings, imagelist item adding gets extremely slow. A 256x256 BMP loads in more than 10 seconds...while doing this, it occupies one CPU core 100%. So compiled applications that start up normally in seconds now start up in minutes! I use hibernation/resume regularly. Display drivers are more than a year old, so that can't be the problem. Any comment on this?

What's the scope of this string?

流过昼夜 提交于 2019-12-01 10:58:13
If I have the following code: { UnicodeString sFish = L"FISH"; char *szFish = AnsiString(sFish).c_str(); CallFunc(szFish); } Then what is the scope of the temporary AnsiString that's created, and for how long is szFish pointing to valid data? Will it still be valid for the CallFunc function? Will it's scope last just the one line, or for the whole block? The C++11 standard $12.2.3 says: When an implementation introduces a temporary object of a class that has a non-trivial constructor (12.1, 12.8), it shall ensure that a constructor is called for the temporary object. Similarly, the destructor

How can I disable the embedded designer in XE6?

痴心易碎 提交于 2019-12-01 08:11:18
问题 In order to see multiple view in one window i read this answer but it seems that those options not available any more, now my question is how configure rad studio xe6 to see more than one view in window (for example actual code and designed form) . 回答1: The options discussed in the question you link to still apply to XE6. The key is to disable the embedded designer which allows forms to float outside the main IDE tab set. From XE3, the option to enable/disable the embedded designer cannot be

GetWindowRect has offset in Windows 10

瘦欲@ 提交于 2019-12-01 06:35:44
I use GetWindowRect in my program to get the coordinates of a window on the desktop. This works fine on a dozen or so PCs I have here for testing (XP-W8.1) but not on my one W10 PC with touch screen: the coordinates have an offset to the top-left. I googled both for a bug in Windows 10 and for something monitor related but cannot find anything, yet this seems like a commonly used function and the problem is easy to reproduce. Anyone got any clues? Code, simplified: hwnd = FindWindow(NULL, windowname); if (hwnd) { TRect r; GetWindowRect(hwnd, &r); } HWND hdt = GetDesktopWindow(); HDC dcdt =

Can you help translating this very small C++ component to Delphi?

瘦欲@ 提交于 2019-12-01 04:37:53
问题 I'm translating the following C++ component to Delphi: http://borland.newsgroups.archived.at/public.delphi.vcl.components.using.win32/200708/0708225318.html But it's not working... I'm attaching the translated code, could one of the pros take a look? Thanks! Here is the code: unit ComboBoxPlus; interface uses SysUtils, Classes, Controls, StdCtrls, Messages, Types, Windows, Graphics; type TComboBoxPlus = class(TComboBox) private FClickedItem: Integer; FListHandle: HWND; ListWndProcPtr: Longint

Compiling C++Builder project on command line

非 Y 不嫁゛ 提交于 2019-12-01 03:45:14
Is there a way to compile a C++Builder project (a specific build configuration) from the command line? Something like: CommandToBuild ProjectNameToBuild BuildConfiguration ... David Dean Use: msbuild project.cbproj /p:config=[build configuration] More specifics can be found in Building a Project Using an MSBuild Command . Sergey Karpukhin There are different ways for automating your builds in C++Builder (as of my experience, I'm speaking about old C++Builder versions like 5 and 6 ). You can manually call compilers - bcc32.exe (also dcc32.exe , brcc32.exe and tasm32.exe if you have to compile

Checking two TDateTime variables

こ雲淡風輕ζ 提交于 2019-12-01 01:07:46
I am using C++ Builder and have the following question: I am wanting to detect if a date/time is later than another date/time, and by how much. Here is my current code: TDateTime testFirstDate("11/09/2012"); TDateTime testFirstTime("14:00"); TDateTime testSecondDate("12/09/2012"); TDateTime testSecondTime("16:00"); TDateTime testCombined1 = testFirstDate + testFirstTime; TDateTime testCombined2 = testSecondDate + testSecondTime; TDateTime testDateDifference = testSecondDate - testFirstDate; std::cout << testDateDifference; In the above example, the following gets printed out: 31/12/1899 The

What do I need to know to upgrade a complex application from C++Builder 2007 to 2010?

五迷三道 提交于 2019-12-01 00:45:22
My company's main application is mostly written in C++ (with some Delphi code and components). We are upgrading from RAD Studio 2007 to 2010 for the next release, starting in about a week. What do I need to know to ensure this upgrade goes smoothly? Points I have thought of so far are: Unicode. This one looks really complicated. Our app contains a horrible mix of std::string-s and AnsiString-s with casts to and from them. I have lots of questions about this, such as "is wstring capable of holding everything a UnicodeString can, and should we just do a search/replace", or "should we avoid all C

Checking two TDateTime variables

微笑、不失礼 提交于 2019-11-30 21:12:05
问题 I am using C++ Builder and have the following question: I am wanting to detect if a date/time is later than another date/time, and by how much. Here is my current code: TDateTime testFirstDate("11/09/2012"); TDateTime testFirstTime("14:00"); TDateTime testSecondDate("12/09/2012"); TDateTime testSecondTime("16:00"); TDateTime testCombined1 = testFirstDate + testFirstTime; TDateTime testCombined2 = testSecondDate + testSecondTime; TDateTime testDateDifference = testSecondDate - testFirstDate;

vcl.h: No such file or directory

蹲街弑〆低调 提交于 2019-11-30 20:41:30
问题 I'm looking to compile some old source code in Visual C++. However, the first of many errors I am receiving is: vcl.h: No such file or directory This appears to be in reference to the Visual Component Library, native to Borland compilers it seems. I downloaded the free Borland C++ 5.5 command line compiler, but it doesn't seem to contain a vlc.h in its include directory. How can I resolve my issue? Many thanks. 回答1: This old code must have come from C++Builder. If it actually uses the VCL,