Jump to content

A.M. Hoornweg

Members
  • Content Count

    490
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by A.M. Hoornweg

  1. A.M. Hoornweg

    tImageCollection in COM DLL - EXE needs manifest ???

    Oww, that sounds like a pain. But I think it should be possible to just pack a manifest alongside an existing application, without embedding it and damaging the digital signature?
  2. A.M. Hoornweg

    tImageCollection in COM DLL - EXE needs manifest ???

    The problem isn't tImageList related - the DLL used tImageList in the past without problems or manifest requirements until I replaced it with tImageCollection & tVirtualImageList. Also, the operating system is Windows 10, so comctl32 on the system is most certainly the current version. By the way, with a properly manifested application, the new icons display correctly even on Windows XP which is vintage so I don't think it's a matter of an outdated comctl32. ( edit: I compiled the test application under Delphi 11 fixpack 1 with {$SETPEOSVERSION 5.1} {$SETPESUBSYSVERSION 5.1} to make it work on XP).
  3. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    Sure. Until that time, I'll just stick with Windows 10 in the VM.
  4. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    One simple workaround is to run Delphi inside a VMWare VM and to configure that VM so, that its resolution is 1920x1080 and "stretched". That way Delphi will run at a resolution of 2K even though the monitor really has a much higher resolution. As for DPI awareness in compiled Delphi applications themselves, I have a whole bunch of workarounds to make things work better. The key for me was to inherit every TForm from a common ancestor and to override some virtual methods in that ancestor (DoBeforeMonitorDPIChanged, DoAfterMonitorDPIChanged, Loaded, Docreate and some more ...) to fix the most egregious bugs. That way any form derived from that common ancestor behaves much better.
  5. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    That workaround is well known, but it'll probably cease working when the first updates of Windows 11 appear. In that case one would be stuck with a possibly buggy initial version.
  6. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    Some things (like Per-Monitor DPI-awareness V2) are really awkward to test through Remote Debugging. Delphi 11 still has tons of issues regarding DPI Awareness, for which I had to devise workarounds until Embarcadero hopefully gets it right. I expect some improvements to this feature in Windows 11 and it would be really nice to be able to debug it natively rather than remotely.
  7. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    I have no desire to switch to a different virtualization product. My appreciation of VMWare far exceeds any desire for Windows 11.
  8. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    That's not an option. VMWare workstation is essential to me, also because of compatibility with ESXI. (I don't know if other virtualizers that use "passthrough" TPM's don't have the same problem, because in that case the TPM also dies if the host breaks)
  9. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    Will that work on a new hardware? I mean, will VMWare Workstation boot a recent backup, if I exchange my notebook for a new one?
  10. A.M. Hoornweg

    Developing under Windows 11 in a VM not feasible ?

    A virtual HDD encrypted by VMWare would not be recoverable anymore indeed. [edit] I make weekly backups of my VM's on an external HDD. If they were cryptographically tied to my notebook's hardware, they would become worthless if my notebook broke.
  11. Hello all, I have a question regarding dynamic methods in Delphi that handle Windows messages. The documentation is not clear about this. Suppose I declare a Windows message handler in my form like procedure WMNCCreate (var Message: TWMNCCreate); message WM_NCCREATE; with a trivial implementation like procedure WMNCCreate(var Message: TWMNCCreate); begin inherited; end; how is the inherited() call resolved by Delphi? Is it resolved by method name or by message number? In other words, does inherited() call an ancestor's method having the name WMNCCreate, or does it call any method that handles message number WM_NCCreate regardless of the method's name ?
  12. A.M. Hoornweg

    inherited dynamic message handlers

    Ah, I've overlooked that! Thanks! One of the reasons I asked is because many of these message handlers in Vcl.Forms are declared private. But apparently, the keyword "private" is meaningless for message methods if they're resolved by number.
  13. Hello all, it is *extremely* annoying that Delphi 11 writes a property "PixelsPerInch" into dfm files of type tDatamodule and tService. Such objects are totally non-visual so what the heck ? This property cause runtime errors when such projects are compiled with Delphi 10 or older. I now have to manually strip it from each and every data module using Notepad!
  14. A.M. Hoornweg

    PixelsPerInch property in datamodules and services :-(

    Would it not be necessary to change the DFM file too (change "object" into "inherited") because of this inheritance?
  15. A.M. Hoornweg

    PixelsPerInch property in datamodules and services :-(

    I like the idea, but it would require changing existing projects. Existing datamodules, services and frames would need to inherit from new classes. Maybe it would be more elegant to write a patching unit for older Delphi versions that hooks into the dfm reader and ignores PixelsPerInch.
  16. A.M. Hoornweg

    PixelsPerInch property in datamodules and services :-(

    AFAIK there is no property "scaled" in tService and tDatamodule, so why would the designer need to know PixelsPerInch if it's not supposed to do any scaling? There's "Width" and "Height" so it can still create the window big enough to display the placed components. As a workaround, I've written a command line application that detects if a DFM is tdatamodule or a tservice and if so, removes the "pixelsperinch" property. Maybe I should do the same for tFrame because I intend to always use 96 dpi in design mode. The tool is now integrated in my Finalbuilder build scripts and so far it looks promising. If it is error-free, I may use it inside a pre-commit hook in SVN as well.
  17. Hello World, I just had a pleasant surprise - when I build a certain x64 project of mine, the executable is noticeably smaller under Delphi 11 Alexandria (6.5 MB) than under Delphi 10.4.2 Sydney (7.3 MB). Embarcadero must have done some serious optimizations. (Edit) the project is compiled with {$WEAKLINKRTTI ON}.
  18. I don't mean to compare Pascal to C. I just mean that Delphi has become less usable for low-level modular stuff because the executable size has become so big. Delphi 2009 was the last compiler that created really compact executables.
  19. If Microsoft used Delphi, Windows would be a petabyte in size.
  20. If many units are significantly smaller, it could indicate less inlining, less RTTI overhead, or a much more clever compiler (which would be a sensation). It would be interesting to do a few benchmarks and compare some generated assembly code.
  21. I have no idea, it could be a lot of things. Maybe there's less inlining? Or are they finally using a more compact format for RTTI info? Or maybe LLVM is involved now? Whatever it is, I find the reduction in executable size impressive (I'm a sucker for efficiency). I would be interested to know if x86 code has become tighter also?
  22. A.M. Hoornweg

    How to use unit BufferedFileStream & FastCopy?

    A broken drive is much more costly than the price of the hardware alone. Hard drives *will* fail sooner or later. I have had at least 8 hdd's fail on me in my career. Drop a HDD hard and it's probably ruined (at least I wouldn't ever trust it anymore). If you order a HDD, you have no way of knowing if it was dropped or half frozen during shipping. SSD's OTOH are very insensitive to shocks and temperature differences. No moving parts!
  23. A.M. Hoornweg

    How to use unit BufferedFileStream & FastCopy?

    David asked "What's wrong with". So I pointed out some. OP may have other reasons, admittedly. 🙂
  24. A.M. Hoornweg

    How to use unit BufferedFileStream & FastCopy?

    I avoid it for the following reasons. First of all, the CopyFileEx API documentation does not specify if the source file is opened for shared access or not. So I don't know how it behaves when multiple users are accessing the file and if that behavior may change in future. Secondly, when I copy a file somewhere, I emphatically want it to inherit the access properties of the target directory. Otherwise the access rights become unpredictable. Unfortunately, the CopyFileEx API documentation says "The security resource properties (ATTRIBUTE_SECURITY_INFORMATION) for the existing file are copied to the new file". I really don't want that to happen.
  25. A.M. Hoornweg

    What is this syntax?

    Hello all, I recently stumbled upon some code whose syntax was new to me. That doesn't happen too often so I'm slightly overwhelmed. How do you call this elegant way of declaring constants, and is it documented somewhere? I especially like the implicit association between a type and values. Type tSomeType=( begindoc=$01, Newpage=$02, enddoc=$03 );
×