Jump to content
Registration disabled at the moment Read more... ×

Mark-

Members
  • Content Count

    318
  • Joined

  • Last visited

  • Days Won

    1

Mark- last won the day on August 15 2022

Mark- had the most liked content!

Community Reputation

34 Excellent

1 Follower

About Mark-

Recent Profile Visitors

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

  1. Mark-

    DLL path...

    Thanks I did not think it would work. Also testing shows, if all the dlls are in the exe path, all works as expected. Setting all functions to delayed and calling SetDllDirectory before any function is called, it fails, on the first call to the main dll, with: I tired several path options, no joy. Thanks for your help.
  2. Mark-

    DLL path...

    Thanks. That is what I thought. When exploring options I looked at "delayed". I will give it a go. I also wondered if I declared one function from each of the three dlls, (required by the "main" dll) and, used static linking for the the three dlls, if that would work.
  3. Hello, Testing the AVIF image code (https://github.com/Xelitan/AVIF-and-HEIC-for-Delphi-Lazarus/) and have a question about dlls. (https://en.delphipraxis.net/topic/9060-anyone-know-of-an-avif-image-decoder-for-delphi/?tab=comments#comment-106499) The code uses static dll linking: const LIBHEIF = 'libheif.dll'; function heif_context_alloc: PHeifContext; cdecl; external LIBHEIF; I want to put the dll in a sub-directory of the exe, I use: const LIBHEIF = '.DLL\AVIF\libheif.dll'; That works for the “libheif.dll” but, not the other three dlls that are used by “libheif.dll”. When running that application, I get: “The code execution cannot proceed because dav1d.dll was not found. Reinstalling the program may fix this problem.” for the other three dlls. Question one, is there a method to have the other three dlls use the path of the calling dll? Question two, if I go to the trouble of modifying the code for dynamic linking for the “libheif.dll”, would it solve issue? I assume it would not. Ideas? Thanks, Mark
  4. Hello, Old thread back to life. https://github.com/Xelitan/AVIF-and-HEIC-for-Delphi-Lazarus/ Anyone used it? Thanks, Mark
  5. Mark-

    TStyleManager.ActiveStyle...

    Thanks for your help.
  6. Mark-

    TStyleManager.ActiveStyle...

    Like MessageDlg the dialog (MessageDlg2) resizes based buttons, button captions, based on OS language, font size, etc., and it was cleaner to use a panel. TLabel, at least, had other issues to overcome. Drawing on the form, I had not thought of that solution. Good idea. I had the framework for a custom panel, from another form, so I grabbed it. For now, because the only issue is the "Windows" style, window color, I check for it when fetching the window and font color, Down the road I might look at drawing on the form. It is an interesting, and perhaps a cleaner, solution. Thanks for your help Remy.
  7. Mark-

    TStyleManager.ActiveStyle...

    I "FillRect" the canvas of the panel, with the color returned by the style manager. There is not a label. I DrawText the text on the canvas. Amakrits style works.
  8. Mark-

    TStyleManager.ActiveStyle...

    Yes. ParentBackground state made no difference. The form color is set to clWindow.
  9. Mark-

    TStyleManager.ActiveStyle...

    The text is drawn on a TCustomPanel. The custom panel is on the form (TForm).
  10. Mark-

    TStyleManager.ActiveStyle...

    Sure.
  11. Mark-

    TStyleManager.ActiveStyle...

    You mean what all the other styles return, I guess I am confused. Perhaps I am all wet, 10 are correct, one is incorrect; the 1 seems to be the issue.
  12. Mark-

    TStyleManager.ActiveStyle...

    See the examples above. Correct as in the color returned is the same, or not, as the color of the window.
  13. Mark-

    TStyleManager.ActiveStyle...

    Thanks for the response. The issue is: bgColor:=actStyle.GetStyleColor(scWindow); returns the correct color for all styles I tested, 10 or so, except one, "Windows".
  14. Mark-

    TStyleManager.ActiveStyle...

    Thanks for the response Remy. OK I can trim down the code. The text is drawn on a TCustomPanel. I am creating the dialog to replace MessageDlg. Styling is the last test. What confuses me is TUxThemeStyle.DoGetStyleColor(scWindow) works for all styles I tested, 10 or so, except one, "Windows". So, I will test with using another selector. I tested all the selectors, above, with Ruby Graphite and all returned the wrong color: Interesting...
  15. Mark-

    TStyleManager.ActiveStyle...

    Hello, I provide the user a menu to select a desired style for the application. I have tested most styles and have trouble with only one, named “Windows”. As an example: Ruby Graphite Windows The window color for the text is wrong. Here is the code to fetch the background color and font color: procedure TDrawingSurface2.GetStyleColors(out bgColor, fColor: TColor); var actStyle:TCustomStyleServices; begin actStyle:=TStyleManager.ActiveStyle; if Assigned(actStyle) and actStyle.Enabled then begin bgColor:=actStyle.GetStyleColor(scWindow); fColor:=actStyle.GetStyleFontColor(sfWindowTextNormal); end else begin bgColor:=clWindow; fColor:=clWindowText; end; end; The else is never triggered. I can check for the style name “Windows” and return: bgColor:=clWindow; fColor:=clWindowText; and the dialog is correct. Any ideas? Thanks, Mark
×