c++builder-2010

How To Fix Indy TIdTCPServer Freezing When Sending Text To TIdTCPClient?

≯℡__Kan透↙ 提交于 2019-12-25 02:49:42
问题 Cannot send text from TIdTCPServer To TIdTCPClient , the server hanging (Not Responding), it just freezes when trying to send text to the client. I Started Recently using Indy TIdTCPClient and TIdTCPServer, i have the client application working well when sending and receiving response from the server form, then issue is from the server it doesn't send data, and when i try to send data like Indy creators provided in their Doc, it just freezes and then stops responding (crashes) :(, the weird

Resource compilation error (Bad character in source input)

99封情书 提交于 2019-12-25 02:37:12
问题 I have added text file with following content to the project: 1 24 "MyApplication.manifest" In the same folder there is also MyApplication.manifest file which is XML - this one: C++ Builder / Delphi 2010 application manifest template After I attempt to build resource from RC I get error - Bad character in source input(1) Any ideas why? RT_MANIFEST value is 24, but I am unsure what 1 is supposed to be. 回答1: I managed to find the answer myself so no answer necessary. The problem was, as usual

Implementing SNMP SendTrap using Indy components

假装没事ソ 提交于 2019-12-20 07:23:30
问题 I need to report errors from my application on C++Builder via SNMP. I started implementing SNMP SendTrap using Indy components. void __fastcall TMainForm::btSendTrapClick(TObject *Sender) { UnicodeString myEnterprise = "1.5.5.5.5.5.5.5"; UnicodeString eventType = "1.5.5.5.5.5.5.5.1"; UnicodeString eventDistance = "1.5.5.5.5.5.5.5.2"; TIdSNMP * idSnmp = 0; TSNMPInfo * infoSnmp = 0; idSnmp = new TIdSNMP(NULL); infoSnmp = new TSNMPInfo(idSnmp); idSnmp->Host = edHost->Text; idSnmp->Community =

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

北城余情 提交于 2019-12-19 04:10:18
问题 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

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

可紊 提交于 2019-12-19 04:10:07
问题 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

Embarcadero C++ Builder 2010 - Compilation

家住魔仙堡 提交于 2019-12-13 07:05:45
问题 I am using Embarcaedro C++ Builder 2010 for a few weeks and there are somethings strage about the compilation process.. First, does anybody know a trick to prevent C++ Builder from re-compiling every source file that have'nt been edited ? Second, why is the compiler compiling more lines of code than the project really contains ? It awefully increases the compilation time ! I browsed the web without satifying answers. I tried : to keep object files to disable pre-compiled headers organising

C++ Builder 2010 Strange Access Violations

白昼怎懂夜的黑 提交于 2019-12-12 19:22:56
问题 I've got a program that is to become part of an already existing, larger product which is built using C++ Builder 2010. The smaller program does not (yet) depend on C++ Builder. It works fine in MS Visual Studio, but with C++ Builder it produces strange access violations. Please let me explain this. Depending on the code and on compiler settings, access violations happen or do not happen. The access violations are reproducible: When the program is built then the access violation does never

Determine Height of text in TMenuItem to decide to what height to change the MenuItem via TMenuItem.OnMeasureItem

倖福魔咒の 提交于 2019-12-11 12:05:29
问题 I use Borland C++ Builder 2009 and when a large font is used, the Menu items in MainMenu and Popup are too close to each other, text cut off on top and bottom even, when too big. I understand I can change the height of the items with TMenuItem.OnMeasureItem but to what height should I set it ? What's the best way to calculate an ideal height and how do I get the variables for it (e.g. height of text)? 回答1: OnMeasureItem handlers suggests you default value in Height var parameter. You can

Renaming TAction for another form

谁说胖子不能爱 提交于 2019-12-10 16:27:18
问题 I have 2 forms which I'd like to share one single TActionManager and assigned TAction -s. First form is main form - it holds TActionManager , TAction with caption "Action". Main menu of Form1 has this action and menuitem caption property set to "Action A". Form2 includes Form1 and also assigns action to menuitem and caption is set to "Action B". During design time everything looks good - menu items are named "Action A" and "Action B" in Form1 and Form2 and same action is assigned. It also

How to disable MouseWheel if mouse is not over VirtualTreeView (TVirtualStringTree)

谁都会走 提交于 2019-12-10 12:56:44
问题 TVirtualStringTree behaves by default if it is focused - it will scroll on mouse wheel even if mouse is not over control (except if it is over another TVirtualStringTree). Is there a quick and elegant way to disable this behaviour? I already did this with OnMouseWheel event and checking with PtInRect if Mouse.CursorPos if it is over a control but I have a feeling that there is a better way to do the same because this way I'd have to define a new event for each TreeView I add and also handle