c++builder

When to redraw VirtualTreeView after OnNewText event?

旧巷老猫 提交于 2019-12-14 03:49:25
问题 I use this code to fill VirtualStringTree and allow renaming items: //--------------------------------------------------------------------------- // Structure for the tree //--------------------------------------------------------------------------- struct TVSTdata { UnicodeString Name; }; //--------------------------------------------------------------------------- // Initialization of the tree //--------------------------------------------------------------------------- __fastcall TForm1:

Unicode conversion issues

a 夏天 提交于 2019-12-14 00:09:58
问题 Here is a beginner question on Unicode. I'm using Embarcadero C++ Builder 2009, where they supposedly changed the default strings to use Unicode. I type various symbols in my source editor, that aren't part of the standard "7-bit ASCII". My program is using the String type of C++ Builder to fetch user input. I am also adding input manually by setting a value to a wchar_t. It would seem that there are conflicts in how the symbols are interpreted. Sometimes I get a symbol with for example the

Event Handler for Dynamically Created CheckBox

独自空忆成欢 提交于 2019-12-13 19:26:13
问题 I wrote a C++ program using Borland C++ Builder 5. The program dynamically creates an array of TCheckBox objects. I have tried to write an OnClick event handler that would identify which checkbox is being clicked and execute some instructions based on that. My event handler is based on similar posts to this website, but I cannot seem to make it work. Here is the (abbreviated) code // Header declaration void __fastcall CBoxClick(TObject *Sender); // End Header // CBoxClick function (the event

in XE5 everytime I make a project it recompile everything

余生长醉 提交于 2019-12-13 09:23:21
问题 Does anyone know how to setup the make option to stop recompiling everything every time? Thanks in advance. 回答1: If it is rebuilding everything, then chances are that either something deep down in the project really is changing every time, or maybe you have library .pas files on your project's search path that are preventing the compiler from using compiled .dcu files correctly. Typically the compiler only recompiles a unit if it detects a change in that unit or its dependancies. 来源: https:/

Searching an item in a TcxTreeList in Borland C++ Builder 6

北慕城南 提交于 2019-12-13 04:25:31
问题 I am using C++ Builder 6. I have a TreeList with two columns and a TrzEdit and a Search Button. I want to find the item which i will type in the Edit field once i type something in the box. How can I display it? void __fastcall TMainForm::BtnSearchClick(TObject *Sender) { for (TcxTreeListNode* node = TreeList->TopNode ; node != NULL; node = node->GetNext()) { String value = node->Values[PropertyName->ItemIndex]; if ( value == Search->Text.c_str()) { ShowMessage("Foundit"); } } } Can someone

Access violation on wglBindTexImageARB ; due to WGL_FRONT_LEFT_ARB not defined allthoug wglext.h included?

二次信任 提交于 2019-12-13 03:42:32
问题 I have an Access violation on this line : if (RTT.wgl.wglBindTexImageARB(RTT.wgl.hBuffer, WGL_FRONT_LEFT_ARB) == FALSE) ShowMessage(AnsiString().sprintf("wglBindTexImageARB returned %i", GetLastError())); The exception is thrown before the getlasterror() call : so getlasterror can't tell anything. When I try to evaluate the expression with Borland Builder's debugger, it says impossible to evaluate : due to WGL_FRONT_LEFT_ARB not defined. So I added wglext.h in the includes : no success, same

COM: If I change the parent of an Interface do I need to create a new Interface?

走远了吗. 提交于 2019-12-13 02:59:16
问题 I have been adding new functionality to a COM Interface, and from what I have read the only way to do it( and keep it backwards compatible ) is to create a new interface that inherits the old interface and add the new methods. I have tried doing this but my hierarchy is already quite complex. Say this is how my interfaces currently are: IBaseInterface | IDerivedInterface and I want to add some functionality to the Base Interface, and it now looks like this: IBaseOldInterface | IBaseInterface

TImageList.ShareImages - How to use exactly to not have to copy the content?

耗尽温柔 提交于 2019-12-13 02:38:12
问题 I use C++ Builder, but the question is just as relevant for Delphi I believe. When I have two TImageList objects and at some point I want to use the same icons in both image lists, I can copy the content: ImageList2.Assign(ImageList1) ; However, I noticed TImageList.ShareImages in Help suggesting I can use the same internal list, and save resources copying !? Poorly documented however because I'm not sure how I can achieve this exactly ? What do I do to make ImageList2 use the same internal

Issue compiling c++ in c++builder

萝らか妹 提交于 2019-12-13 00:47:50
问题 I have written a C++ program for a University assignment. I used Netbeans 6.8 running on my Mac and the code runs smoothly, no warnings, errors or problems/bugs. However when compiling and running on a Windows computer using CodeGear RAD Studio 2009 (C++ Builder) am getting several errors. [BCC32 Error] main.cpp(51): E2094 'operator<<' not implemented in type 'ostream' for arguments of type 'string' [BCC32 Error] main.cpp(62): E2093 'operator==' not implemented in type 'string' for arguments

How to set textalignment in TEdit control

孤者浪人 提交于 2019-12-13 00:45:12
问题 I'm using turbo c++ explorer edition (the free edition). Is there somebody that know how i can set the textAlignment of a TEdit control? 回答1: You might find this solution to the problem interesting: http://bcbjournal.com/bcbcaq/?loc=edits&caq=28 It makes the edit box right aligned by enabling the ES_RIGHT Windows style for the control, however it does this when creating the component. For historical reasons the standard windows edit control does not support changing alignment after it has