Jump to content

PolywickStudio

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Here's the distilled Delphi code: unit exampleunit; interface uses Windows, Messages, SysUtils, Classes, VCL.Graphics, VCL.Controls, VCL.Forms, VCL.Dialogs, VCL.StdCtrls, VCL.Buttons; type TExample = class(TCustomControl) protected procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; end; procedure Register; implementation procedure TExample.WMMouseMove(var Message: TWMMouseMove); begin // inherited; end; procedure Register; begin RegisterComponents('Samples', [TExample]); end; end. Here's the C++ code. C++ Builder is, supposed to be the equivalent of Delphi, and should allow for C++-only VCL components. In reality, all the development goes one way. Delphi exported components to C++ Builder. Here's the C++ Builder component: //--------------------------------------------------------------------------- #ifndef examplecomponentcppH #define examplecomponentcppH //--------------------------------------------------------------------------- #include <System.Classes.hpp> #include <System.SysUtils.hpp> #include <Vcl.Controls.hpp> #include <Vcl.ExtCtrls.hpp> class PACKAGE TExampleCpp : public TCustomControl { private: protected: void WMMouseMove(TWMMouseMove Message); public: __fastcall TExampleCpp(TComponent *Owner); __fastcall virtual ~TExampleCpp(); }; #endif //--------------------------------------------------------------------------- #pragma hdrstop #include "examplecomponentcpp.h" //--------------------------------------------------------------------------- #pragma package(smart_init) __fastcall TExampleCpp::TExampleCpp(TComponent *Owner) : TCustomControl(Owner) { } __fastcall TExampleCpp::~TExampleCpp() { } void TExampleCpp::WMMouseMove(TWMMouseMove Message) { // what to put here that is equivalent of the Delphi version? TCustomControl::WMMouseMove(Message); } static inline void ValidCtrCheck(TExampleCpp *) { new TExampleCpp(NULL); } There is "inherited." It's called __super https://stackoverflow.com/questions/8326309/borland-delphi-alternative-to-super-keyword or (baseclass)::(procedure). The question is. In Delphi, the inherited keyword works and causes the code to go to a private procedure in controls.pas. This beaks the cannot call private procedures and functions compiler restriction in Delphi. Which is enforced in Delphi. In C++ Builder, it bugs out and [bcc32c Error] examplecomponentcpp.cpp(17): 'WMMouseMove' is a private member of 'Vcl::Controls::TControl' Vcl.Controls.hpp(1655): declared private here Why is inherited keyword not supported in C++ Builder? Does that mean, it becomes impossible to build components in C++ Builder? the same code that compiles and works, in Delphi, cannot be done in C++ Builder? Why is it, the same Delphi code, exports as a C++ Builder component works in C++ Builder? When you try to do the same thing in C++ Builder, it becomes impossible, or there are no code samples. > You need to call the base class Dispatch() method. Or override the virtual WndProc() method instead of using a MESSAGE_MAP Can you show a complete example?
  2. In the Delphi code, I did the same, create a component from TCustomControl. I add WMMouseMove windows message procedure TCustomControlButton.WMMouseMove(var Message: TWMMouseMove); begin // inherited; // how to emulate this keyword and call base class's WMMouseMove in C++ Builder? end; In C++ Builder, I am trying to build a VCL C++ Builder component. I sub-class TCustomControl. However, I cannot seem to do the same equivalent in C++ Builder. "inherited". What should I do to solve this problem? void __fastcall TCustomControlButton::WMMouseMove( Winapi::Messages::TWMMouse &Message) { // do something... TCustomControl::WMMouseMove(Message); // OR __super::WMMouseMove(Message); } I get: [bcc32c Error] something.cpp(300): 'WMMouseMove' is a private member of 'Vcl::Controls::TControl'. Vcl.Controls.hpp(1655): declared private here
  3. I've been doing some simple testing. Delphi 11.3 2000000 TStringList.AddObject in 141.17ms (14,167,115.00/s) TStringList.Rehash in 1us TStringList.Clear in 47.36ms first TStringList.IndexOf in 7us 20000 TStringList.IndexOf in 8.35s (2,392.00/s) 2000000 TStringListHash.AddObject in 139ms (14,387,661.00/s) TStringListHash.Rehash in 0us TStringListHash.Clear in 46.22ms first TStringListHash.IndexOf in 275.24ms 20000 TStringListHash.IndexOf in 5.60ms (3,570,790.00/s) 2000000 TDictionary.AddObject in 788.58ms (2,536,188.00/s) TDictionary.Clear in 292.92ms 20000 TDictionary.IndexOf in 3.24ms (6,172,839.00/s) Spring4D's IDictionary 20000 IDictionary.Add in 3.38ms (5,917,159.00/s) first IDictionary.TryGetValue in 1us 20000 IDictionary.TryGetValue in 753us (26,560,424.00/s) Use Spring?
  4. Can I ask. Do you have the source-code for your changes you made? The source-code in this thread has only for the Sequenced, TArray.BinS, TDict and TSynDict, not Spring. For CustomBinS, the hash routine often access violation 'out of range' and not suitable for larger arrays...
  5. Hi, http://www.overbyte.eu/ is down. I cannot download ICS. Please advise if they have mirror location(s).
  6. PolywickStudio

    Using Facebook SDK in Firemonkey (iOS and Android)

    Does anyone have an update for this, i.e., login to Google, login to Facebook in Android and iOS platform?
  7. I would like to use BackBlaze S3-compatible API. How would I use BackBlaze S3-Compatible API with Delphi?
  8. Let's say you have a set of repeat numbers: TDictionary<integer1, TDicationary<integer2, integer3>> [1, [2, 1]] [1, [1, 2]] [1, [1, 3]] (huge... like 30000) [2, [2, 1]] [2, [1, 2]] [2, [1, 3]] ... [3, [2, 1]] [3, [1, 2]] [3, [1, 3]] What would be a fast way to select all numbers with [x, [x, 1]], then [x, [x, 2]] ? I do a loop but there must be a faster way than loop the loop.
  9. I tried. Does anyone else have any suggestions? I think a B*Tree would work since Key1, PayLoad can be searched quickly
  10. I have question. I need a data structure that looks like this: DataStructure<TKey1, TKey2, TValue, TPayLoad> Where - there the data is sorted by 2 keys. - the value can be any (e.g., integer, string). - there is a ternary Payload which stores non-sorted data. I want to the data to have 2 primary key indexes, TKey1 or TKey2. I query TKey1 = '1', I get all values of (TKey1 = 1) for the data. I query TKey2 = '2', I get all values of (TKey2 = 1) for the data. Problem. 1. I use TDictionary and THashList, Not sure how to store TKey1, TKey2, and TValue1 with TPayLoad. I could use TDictionary<TPair<TKey1, TKey2>, TPair(TValue1, TPayload>); - how to search by partial, where I special only one part of TPair? 2. I tried TObjectList, I cannot order by TKey2, just TKey1 and store everything inside an Object. It gets slow trying to do filtered-search and retrieve filtered by TKey1 or TKey2. 3. I tried TList, but I want to get an order by TKey1 and TKey2, I need to keep sorting it as often. 4. I need to keep TKey1, TKey2 as ordered lists to quickly index/query TValue. Any ideas?
  11. PolywickStudio

    Need 64-bit version of himXML

    I asked. Thanks... I switched to https://blog.spreendigital.de/2014/09/13/verysimplexml-2-0/
  12. I need a 64-bit version of himXML https://www.delphipraxis.net/130751-himxml-gesprochen-himix-ml.html This was last updated in: himxml_164.7z = v0.99d 12.01.2010 Any ideas how to get this?
  13. PolywickStudio

    Request help from kbm/Component4Developers

    okay, problem solved. Mr. Kim came online.
  14. PolywickStudio

    Request help from kbm/Component4Developers

    I'd like to ask if there's an alternative to kbmMemTable, in terms of ease of use, and/or ability to copy an existing TDataSet.
  15. hi, I ordered kbmMemTable with SAU a few days ago. I have emailed the vendor, he hasn't replied. Any ideas how to contact Mr. Kim?
×