c++builder-6

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

wglShareLists fails with error 6 : ERROR_INVALID_HANDLE The handle is invalid

北战南征 提交于 2019-12-11 04:28:28
问题 I try to share a HPBUFFERARB between two classes : TGLForm and TGLForm2. (I tried FBO but having an old Borland Builder 6 version I can't manage using FBO) My goal is to display the same buffer in two openGL windows. So I declared outside of the first Form this object : struct GLRenderToTexture { struct { HDC hdc; HGLRC hGlRc; HPBUFFERARB hBuffer; PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB; PFNWGLCREATEPBUFFERARBPROC

Store a screen capture (Bitblt) in a memory buffer to send over IdTCPClient

让人想犯罪 __ 提交于 2019-12-10 12:17:59
问题 In c++ builder 6 on windows vista ... Graphics:: TBitmap * bmpscreencapture = new Graphics::TBitmap; bmpscreencapture-> Height = Screen-> Height; bmpscreencapture-> Width = Screen-> Width; HDC ScreenSrc = GetWindowDC (0); BitBlt (bmpscreencapture-> Canvas-> Handle, 0, 0, Screen-> Width, Screen-> Height, ScreenSrc, 0, 0, SRCCOPY); Canvas->Draw(10, 10, bmpscreencapture); ReleaseDC (GetDesktopWindow (), ScreenSrc); delete bmpscreencapture; I currently have a section of code for capturing the

Borland C++ Builder 6 and string concatenation

半世苍凉 提交于 2019-12-10 10:31:30
问题 I'm using Borland C++ Builder 6 to try to do some simple string concatenation. However, I have run into what I think is an interesting issue. Everything I am able to find online states that I should be able to do something as simple as this: String word = "a" + "b" + "c"; However, when I try to compile this code, I get an "Invalid pointer addition" error. I could go as far as assigning each part to its own variable and adding each of those together to get the desired output. However, I think

Loading OpenSSL dynamic libraries arm & x86 (FMX, C++)

时间秒杀一切 提交于 2019-12-08 09:10:21
问题 I am able to use OpenSSL static libraries (libcrypto.a and libssl.a) in my iOS app thanks to this help. Now i can also use OpenSSL dynamic libraries (libcrypto.so and libssl.so) in my Android app version thanks to this info. I downloaded the files for Android in the OpenSSL_1.0.2g_Android.zip file from here. I just guessed and used the ARM files (armeabi-v7a folder) instead of the Intel files (x86 folder) and it worked on my Android test phone. My question: How do I make an Android build that

Debugging a crash while unloading DLL in Win 10, but not Win 7

浪子不回头ぞ 提交于 2019-12-08 05:55:27
问题 Not totally sure that I've got this problem nailed down yet, but here's what I'm seeing and what I think is going on. I have a Win32 program mostly written in C that loads a C++ DLL. That DLL passes data from the C program to another application via a COM object--one that's probably instantiated by the DLL itself. All of this has apparently worked fine through at least Windows XP and Windows 7 (possibly Win95 and Win98, I'd need to look back deeper into the code history to find out when this

Debugging a crash while unloading DLL in Win 10, but not Win 7

自闭症网瘾萝莉.ら 提交于 2019-12-07 05:01:27
Not totally sure that I've got this problem nailed down yet, but here's what I'm seeing and what I think is going on. I have a Win32 program mostly written in C that loads a C++ DLL. That DLL passes data from the C program to another application via a COM object--one that's probably instantiated by the DLL itself. All of this has apparently worked fine through at least Windows XP and Windows 7 (possibly Win95 and Win98, I'd need to look back deeper into the code history to find out when this interface was introduced), but in Windows 10 the program crashes during the FreeLibrary() call for this

Borland C++ Builder 6 and string concatenation

馋奶兔 提交于 2019-12-06 12:39:10
I'm using Borland C++ Builder 6 to try to do some simple string concatenation. However, I have run into what I think is an interesting issue. Everything I am able to find online states that I should be able to do something as simple as this: String word = "a" + "b" + "c"; However, when I try to compile this code, I get an "Invalid pointer addition" error. I could go as far as assigning each part to its own variable and adding each of those together to get the desired output. However, I think that's unnecessary given how simple of an example this is. The only way I have been able to get

MessageBox “Abnormal program termination” keeps my application running

陌路散爱 提交于 2019-12-05 06:48:13
...kind of. As illustrated by this extremely simplistic example, very rarely (only once reported so far), it happens that one of my applications crashes this way. I want to terminate it as I normally do when an unspecific exception occurs. My strategy is to (low-level) log the problem, then terminate. The application is part of a subsystem and I want to (re)start it, if any problem is detected. It's built with C++-Builder 6 and runs on Windows (XP...7, also 8). I learned that an abort() most probably caused the error message. The application has a GUI, that's why a message box is shown instead

How to zero array members when my compiler isn't standard conform

有些话、适合烂在心里 提交于 2019-12-01 22:22:14
问题 My compiler (C++Builder6) syntactically allows array member initialization (at least with zero), but actually it doesn't really do it. So the assert in the example given below fails depending from the context. #include <assert.h> struct TT { char b[8]; TT(): b() {} }; void testIt() { TT t; assert(t.b[7] == 0); } Changing the compiler isn't an option at the moment. My question is: what will be the best way to "repair" this flaw with respect to future portability and standard conformance? Edit: