Forum Replies Created
-
AuthorPosts
-
LasseParticipant
Which Delphi version you’re using?
I am developing on Windows 11 but I still build versions for XP. I haven’t noticed any issues. I have created own build configurations for XP because with the latest Delphi version (11.2) you need to set PE Header to version 5.1 (two linker options). By default those are in version 6.0 and application will crash on XP with that version.
LasseParticipantHave you debugged for example TsAlphaHints.OnCheckTimer procedure? I think there was an issue at some point. I have done 150 fixes for AlphaSkins but none of those affects that…
LasseParticipantI have not noticed such behavior. Have you dropped the AlphaHints (TsAlphaHints) component into your application? I see I have done so.
LasseParticipantAs a Delphi user I am used to compiling and building packages. I see C++ Builder is calling it Make and Build. But I did only build it.
Attachments:
You must be logged in to view attached files.LasseParticipantI tried it again, no problem.
Attachments:
You must be logged in to view attached files.LasseParticipantI did install the package without any problems (see previous attachment, icon shows it is installed). I was beta testing upcoming Delphi 11.3 thou. I didn’t test this on Delphi 11.2. I haven’t changed any other settings in C++ project files.
Did you build the run-time package first?
- This reply was modified 1 year, 10 months ago by Lasse.
LasseParticipantJust add vclwinx library and you can build the design package (see attachment).
Attachments:
You must be logged in to view attached files.LasseParticipantYou can, if you inherit that control and add published Format property. Then just override UpdateFormat and call it when Format property is set.
LasseParticipantEmbarcadero\Studio\22.0\source\rtl\common\System.ZLib.pas, Line 2850.
You need your own fork for it.
Attachments:
You must be logged in to view attached files.LasseParticipantLasseParticipantI see that UpdateFormat is setting the format by calling DefDateFormat function:
procedure TsCustomDateEdit.UpdateFormat; begin FDateFormat := DefDateFormat(FourDigitYear); end;
That function is getting the format from default Windows format settings as you can see here:
function DefDateFormat(NormalYears: Boolean): string; var Y: ShortString; begin Y := iff(NormalYears, 'YYYY', 'YY'); case GetDateOrder({$IFDEF DELPHI_XE}FormatSettings.{$ENDIF}ShortDateFormat) of doMDY: Result := 'MM/DD/' + Y; doDMY: Result := 'DD/MM/' + Y; doYMD: Result := Y + '/MM/DD'; end end;
So, if you want to use different date format than your Windows settings you need to modify that function or make UpdateFormat virtual (it is protected but not virtual) and inherit the control. You need to also add DateFormat property, it seems to be private.
TsCustomDateEdit = class(TsCustomComboEdit) protected procedure UpdateFormat; virtual; public property DateFormat: string[10] read FDateFormat write FDateFormat;
Then you could do your own control like:
TMyDateEdit = class(TsDateEdit) protected procedure UpdateFormat; override; ... procedure TMyDateEdit.UpdateFormat; begin DateFormat := ... end;
LasseParticipantI see there are a lot of Integer casts. All pointer or object references should be casted to NativeInt.
LasseParticipantThat is a Windows feature… So, there must be some 64-bit math issues in AlphaSkins code which are causing it to fail.
December 31, 2022 at 12:48 pm in reply to: Sudden exception in acShellCtrls crashing program? #71072LasseParticipantI am currently using old version of ZLib but I tested that fix for current version of ZLib, suggested by wesson, and it did work too.
“It can be solved in System.Zlib with the following (line 2752)”
`if (zresult = Z_STREAM_END) and (FZStream.avail_in > 0) then
begin
Dec(FStreamPos, FZStream.avail_in);
Fstream.Position := FStreamPos;FZStream.avail_in := 0;
end;`LasseParticipantWow, thanks! This solved all issues with 64-bit build with Delphi 11.2. I read about this feature but never thought it would totally mess up everything.
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Support_high-entropy_64-bit_ASLR
Sure, there still is the ZLib issue but it can be fixed.
LasseParticipantI think I had the same issue. I have done it this way:
TMainForm = class(... ApplicationEvents: TApplicationEvents; TrayIcon: TTrayIcon; procedure ApplicationEventsMinimize(Sender: TObject); procedure TrayIconClick(Sender: TObject); procedure WMWindowStateNormal(var AMessage: TMessage); message WM_WINDOW_STATE_NORMAL; ... private procedure MinimizeToSystemTray; end; procedure TMainForm.ApplicationEventsMinimize(Sender: TObject); begin MinimizeToSystemTray; end; procedure TMainForm.MinimizeToSystemTray; begin if OptionsContainer.MinimizeToSystemTray then begin Hide; WindowState := wsMinimized; TrayIcon.Visible := True; TrayIcon.Animate := True; end; end; procedure TMainForm.TrayIconClick(Sender: TObject); begin TrayIcon.Visible := False; Show; WindowState := wsNormal; Application.BringToFront; end; procedure TMainForm.WMWindowStateNormal(var AMessage: TMessage); begin TrayIconClick(Self); end;
LasseParticipantHave you tried sInputQuery from sDialogs.pas?
LasseParticipantWell, that didn’t work like it should. I changed it to…
function TacDialogWnd.FixedFrame: integer; begin if Screen.PixelsPerInch <> 96 then Result := ac_GetSysMetrics(SM_CXPADDEDBORDER, GetWndPPI(CtrlHandle)) else Result := ac_GetSysMetrics(SM_CXFIXEDFRAME, GetWndPPI(CtrlHandle)); end;
LasseParticipantI think it is a flaw in skin package. Unfortunately there isn’t a source for Skin editor.
-
AuthorPosts