Jump to content

Attila Kovacs

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    WM_CHANGEUISTATE

    As the *UISTATE messages are poorly implemented in the VCL, actually it's just a : procedure TWinControl.WndProc(var Message: TMessage); . if Message.Msg = WM_UPDATEUISTATE then Invalidate; // Ensure control is repainted without storing and checking against the actual UI state, nor checking the wparam if it's only a UIS_INITIALIZE, raises the question: For what the heck is this Invalidate there? Because it causes a bunch of flickering on pressing the "alt"-key or on calling InsertControl(). What regression will I have if I'm overriding this message in my common TForm like: procedure ChangeUIState(var Message: TMessage); message WM_CHANGEUISTATE; procedure TCForm.ChangeUIState(var Message: TMessage); begin // do nothing end; except a faster GUI, no flickering, smoother form-parenting!?
  2. Attila Kovacs

    WM_CHANGEUISTATE

    @KodeZwerg Not bad at all! I'm too tired 😉
  3. Attila Kovacs

    WM_CHANGEUISTATE

    Okay, there is no more such setting in W10, but I found something interesting: There seems to be a problem with THEMES support in Delphi, in which TButton, TCheckBox, TRadioButton and TStaticText standard controls vanish in VISTA when the ALT key is pressed. (only TStaticText vanishes in XP). If the OS is set to default, pressing the ALT key in XP and Vista has the behavior of displaying the underline under the accelerator keys. The mentioned controls vanish the first time ALT is pressed. They can be restored by repainting the control in code. Once restored, they are not affected by subsequent ALT key presses -- unless a pagecontrol on the form changes to a new tabsheet, then all affected controls, both on the tabsheet and on the form, will vanish on next ALT press. Due to the pagecontrol issue there is no way to set a flag to do the repaint op only once. In MDI applications, an ALT key press has the same affect on all child forms at the same time ** End quote ************** Looks like it's all because of those bugs in XP and Vista. Now how would it be possible to keep the backward compatibility but not calling Invalidate on > Vista and not checking the OS version in a WndProc?
  4. Attila Kovacs

    TTreeNode leak when VCL styles are active

    I'm not sure whether it's even worth further debugging. I just got an email from quality emba that they are unable to reproduce this: https://quality.embarcadero.com/browse/RSP-20010 and there is also this: https://quality.embarcadero.com/browse/RSP-15109 The whole unit is a mess. (And I don't think they fixed it. Did they? 10.4.2 anyone?)
  5. Attila Kovacs

    WM_CHANGEUISTATE

    @KodeZwerg Hmm, now that you say, I think there is an option somewhere in windows where you can tell if the accelerator keys are by default drawn or only on pressing the alt-key. Maybe. I don't know. Because they are drawn by me all the time (on buttons etc..) and the menus are just working fine without the Invalidate. So I can't find the regressions, otherwise I could debug and implement a proper handling by storing the form's UI state and call Invalidate if needed. Thx.
  6. Attila Kovacs

    Inch representation format in TEdit like controls

    Yeah, thx. We found a bug in the RTL/VCL and a better way to communicate. I see no offensive material.
  7. Attila Kovacs

    Inch representation format in TEdit like controls

    It will be the system default by default. So in my case it's __ __.__ Looks like a bug in MaskEdit
  8. Attila Kovacs

    Inch representation format in TEdit like controls

    There must be a bug in Delphi as "\/" does not make a literal from "/" but instead converts it to the system's date separator. Buhh. Anyway, what if the user just want to enter 12"?
  9. Attila Kovacs

    Micro optimization: Split strings

    @Fr0sT.Brutal It won't be compatible with other systems. Also, .Split() accepts Option flags, there could be an IgnoreLastEmpty for that case.
  10. Attila Kovacs

    TTreeNode leak when VCL styles are active

    @balabuev Could you figure it out what is happening there? It's not clear for me based on that workaround.
  11. Attila Kovacs

    Micro optimization: Split strings

    Yet again? 🙈
  12. Attila Kovacs

    Micro optimization: Split strings

    interesting how Split() interpretations differ: //Delphi RTL sp := 'qq;ww;ee;'.Split([';']); // => ['qq', 'ww', 'ee'] // My test case arr := Split('qq;ww;ee;'); // => ['qq', 'ww', 'ee', ''] This in python and in php returning also ['qq', 'ww', 'ee', ''], and so would I expect.
  13. Attila Kovacs

    Delphi 10.4.2 first impressions

    there is a fat 26% discount on D until 28. Feb, so start testing!!! 😉
  14. Attila Kovacs

    TTreeNode leak when VCL styles are active

    Sorry, I thought calling destructor TWinControl.Destroy; is equal to destroying a component. my bad
  15. Attila Kovacs

    TTreeNode leak when VCL styles are active

    You can achieve the same with two TListView's on the same parent, like a TPanel, both having one node. There is something with FTempItem or I don't know, TSubItems' constructor and destructor is not called the same time (4/3), I have no more time for debugging and I don't want to see this code anymore. I can't believe that on a theme change you have to destroy and create a component 4 times in a row.
  16. Attila Kovacs

    TTreeNode leak when VCL styles are active

    reproduced with Berlin U2
  17. Attila Kovacs

    Micro optimization: Split strings

    @Fr0sT.Brutal cool, this also helped me to spot some bugs in my enum version. do you have a unit test for it?
  18. Attila Kovacs

    TTreeNode leak when VCL styles are active

    an MCVE would be nice as we could figure out which version are affected and also debug it instead of guessing
  19. Attila Kovacs

    TTreeNode leak when VCL styles are active

    Do we know wich Delphi versions are affected?
  20. Attila Kovacs

    XLS 2 XLSX

    Sorry, it's "--outdir", you can check the parameters with "--help". Yes, *nix style. That's why the "*.xls" also doesn't work. (<o> free software) You can also create a batch file with "for in" and call that. https://ask.libreoffice.org/en/question/253696/using-wildcards-for-windows-command-line-batch-convert/
  21. Attila Kovacs

    Max string literal length = 255

    can we ban this clown @Lars Fosdal?
  22. He also mentions that he is successfully hides/resizes/rearranges those components. That said, I can't see any problem to reset them. Also, I trust him fully that he knows what he is doing.
  23. @balabuev TWinControl.DisableAlign may help there
  24. If there are some non-standard written controls which has to be restored, yes, you are right, it would need it's reader. On standard controls you can skip the data you don't need or you don't know. We can't see this from here. Nor the actual software to be able to decide which would be less effort, storing local the initial values or reading the dfm. I wanted to show him how to read the resources by its classtypes and read some properties, which he asked.
×