Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27-08-2023, 06:14
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@hitman797
Thanks for the support. This did not solve the problem, (the buttons you pointed to AboutTabControl) they move along with AboutTabItem[i]. For now, I just increased the width and hid the dots under my buttons.
https://youtu.be/c802o9WLJDE?si=RL6W_PkPQK2Uzite
you need 2 TabControl
add 1 TabItem in TabControl1
and add the buttons in TabItem in TabControl1.
in TabControl2 add TabItem[i] in TabItem[i] add Memo[i].
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (27-08-2023)
Sponsored Links
  #2  
Old 27-08-2023, 08:35
crachlow's Avatar
crachlow crachlow is offline
Registered User
 
Join Date: Nov 2017
Location: Eka-burg
Posts: 22
Thanks: 44
Thanked 11 Times in 7 Posts
crachlow is on a distinguished road
Dear Blackfire69. Could you clarify about FUserInfo. As you wrote in the examples, this is not quite suitable, at least for Windows 11. Unknown is displayed in it. If this function defines only the administrator from under the built-in account, and the user from the user group, then this is not entirely correct, probably. I tried to determine by type sid like this
Code:
var
   UserSidType: Integer;
    s1 : String;
...............................
      s1 := Copy(UserInfo.SID,42,3)+Copy(UserInfo.SID,45,1);
      UserSidType := StrToInt(s1);
       if UserSidType > 1000 then
       UserSidType := 1001 ;
     // SUserType
  case UserSidType of
    500: UserTypeStr := 'Administrator';
    1001: UserTypeStr := 'Standard User';
    else
       UserTypeStr := 'Unknown';
  end;
But @audiofeel says it doesn't work, or it works intermittently.
And if the user, administrator rights? Whereas? Could you clarify this issue.
Attached Images
File Type: png 2023-08-27_203621.png (245.4 KB, 141 views)
File Type: png 2023-08-27_203650.png (288.9 KB, 136 views)
File Type: png 2023-08-27_204450.png (270.9 KB, 140 views)

Last edited by crachlow; 27-08-2023 at 08:55.
Reply With Quote
The Following User Says Thank You to crachlow For This Useful Post:
audiofeel (27-08-2023)
  #3  
Old 28-08-2023, 08:05
crachlow's Avatar
crachlow crachlow is offline
Registered User
 
Join Date: Nov 2017
Location: Eka-burg
Posts: 22
Thanks: 44
Thanked 11 Times in 7 Posts
crachlow is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
I meant that the same file shows a different result. My account is Microsoft and in the Administrators group.
User Unknown
I guess that
case IsAdminLoggedOn of
0: UserTypeStr := 'Group Users';
1: UserTypeStr := 'Group Administrators';
and GetUserNameString;
from innosetup works more correctly. In Russian localization UserInfo.UserType, and maybe in others, does not work at all, it is also difficult to determine by sid, because sid will be different in different localizations.
Reply With Quote
  #4  
Old 28-08-2023, 16:23
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by crachlow View Post
I guess that
case IsAdminLoggedOn of
0: UserTypeStr := 'Group Users';
1: UserTypeStr := 'Group Administrators';
from innosetup works more correctly.

Code:
{Setup]
...
PrivilegesRequired=admin     --->    'Admin'    (IsAdminLoggedOn is True)
PrivilegesRequired=lowest    --->    'Standard' (IsAdminLoggedOn is False)
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (28-08-2023), crachlow (29-08-2023), hitman797 (28-08-2023)
  #5  
Old 30-08-2023, 00:20
crachlow's Avatar
crachlow crachlow is offline
Registered User
 
Join Date: Nov 2017
Location: Eka-burg
Posts: 22
Thanks: 44
Thanked 11 Times in 7 Posts
crachlow is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
Code:
{Setup]
...
PrivilegesRequired=admin     --->    'Admin'    (IsAdminLoggedOn is True)
PrivilegesRequired=lowest    --->    'Standard' (IsAdminLoggedOn is False)
I didn't understand much. In the first case, Privileged= require elevated rights (via the User Account Management dialog box) to perform the installation. In the second IsAdminLoggedOn=Returns True if the user who started the installer/uninstaller is a member of the local Administrators group
https://i.ibb.co/qkTghLR/2023-08-30-124000.png
https://i.ibb.co/bbzydjt/2023-08-30-124232.png
https://i.ibb.co/Sv5fvDg/2023-08-30-124405.png
PrivilegesRequired=admin ---> 'Admin' (IsAdminLoggedOn is True)
PrivilegesRequired=lowest ---> 'Standard' (IsAdminLoggedOn is False)
it's not the same

Last edited by crachlow; 30-08-2023 at 05:09.
Reply With Quote
  #6  
Old 30-08-2023, 23:33
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Arrow FMXInno - Updates

FMXInno - Updates : [2023-August-31]

Code:
* Added TImageList.
* Added TSpeedButton.
* Added TCornorButton.
* Added TMultiView.
* Added TShadowTextClassic.
* Added new functions.
* Added new properties.
* Included the fix for the 'white-square' issue during loading.
   - Don't forget to call the 'FMXForm.Show' after the 'FMXDesigning' procedure.

* Fixed DrawFrame.
* Some improvements and bug fixes.
------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by Cesar82 View Post
@BLACKFIRE69, I don't follow your project very much, but I have a question.
Is it possible to define shadows in the labels and define a position for them with respect to the text like in CIU?
If you still don't have support for this, it would be interesting to have X and Y options to move the shadow with a default value of 1px position in relation to left and Top, or parameters for X and Y position for the shadow, with the default position being the shadow exactly in the position of the text.
Code:
procedure ShadowSetting(FColor: Integer; FOpacity, FSoftness: Single; FPosX, FPosY: Integer);

now we've the 'TShadowTextClassic' class, which allows users to change the position(X, Y) of the shadow.

Code:
procedure Shadow(FColor: TAlphaColor; OffsetX, OffsetY: Single);
------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69
Thanks for the update. Please answer, Can you make it so that you can take the icons from the system and not take them with you. By simply specifying the file index and icon, as is possible for any file on the system. And for displaying disks, and for displaying buttons "close the window", "minimize the window" and for many others. If not, then I'm just passing by.

i've added three new functions to help accomplish this.

Code:
function wGetSysDefaultIcons(const Src: WideString; SHLIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;
function wGetSysDefaultIcons2(const Src, OutImgFile: WideString; SHLIcoSize: Cardinal): Boolean;
function wGetSysDefaultIconsSize(const Src: WideString; SHLIcoSize: Cardinal): Integer;
these functions allow you to extract icons in different sizes as listed below.

Code:
const
  SHL_ICO_SZ_LARGE              = $0000;  // 32x32 pixels.
  SHL_ICO_SZ_SMALL              = $0001;  // 16x16 pixels.
  SHL_ICO_SZ_EXTRALARGE         = $0002;  // 48x48 pixels.
  SHL_ICO_SZ_SYSSMALL           = $0003;  // SM_CXSMICON x SM_CYSMICON pixels.
  SHL_ICO_SZ_JUMBO              = $0004;  // 256x256 pixels. (Windows Vista and later.)
here 'Src' could be a file, directory or desktop shortcut (.lnk).

you'll find an example for this in the attachment

at the moment, if i extract icons from a windows ResDll using an index, then those icon files will only be '32x32' in maximum size. so let's use above functions.


Example:
Code:
{ GetSysDefaultIcons }
  if wGetLogicalDriveList(ADrvLst, CDrvIdx) then
  begin
    ASrc[1] := ADrvLst[CDrvIdx];
    ASrc[2] := ADrvLst[Length(ADrvLst) -1];
  end else
  begin
    ASrc[1] := 'C:\';
    if wIsDriveValid('D:\') then ASrc[2] := 'D:\'
    else if wIsDriveValid('E:\') then ASrc[2] := 'E:\'
    else if wIsDriveValid('F:\') then ASrc[2] := 'F:\'
    else if wIsDriveValid('G:\') then ASrc[2] := 'G:\'
  end;

  ASrc[3] := 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe';
  ASrc[4] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Desktop';
  ASrc[5] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Downloads';
  ASrc[6] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Documents';

  P := 0; Q := 0;
Code:
for i := 1 to C_RANGE do
  begin
    if i = (C_RANGE div 2) + 1  {i =4} then
    begin
      P := 0; Q := 160;
    end;

    AImage[i].FCreate(FMXForm.Handle);
    AImage[i].SetBounds(NSX(P + 80), NSY(Q + 80), NSX(100), NSY(100));

  #ifdef AMethod1   /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i]   */
    ImgSize[i] := wGetSysDefaultIconsSize(ASrc[i], SHL_ICO_SZ_JUMBO);
    if ImgSize[i] <> -1 then
    begin
      SetLength(Buffer[i], ImgSize[i]);
      if wGetSysDefaultIcons(ASrc[i], SHL_ICO_SZ_JUMBO, Buffer[i], Count[i]) <> -1 then
        AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
    end;
  #else             /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
    ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
    if wGetSysDefaultIcons2(ASrc[i], ImgFile[i], SHL_ICO_SZ_JUMBO) then
    begin
      AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
    end;
  #endif

    P := P + 150;
  end;
  { GetSysDefaultIcons }

'LoadImgFromBuffer' is only supported by the 'FImage' control. Other controls will get this support in future updates.

------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by audiofeel View Post
MultiView. Needed sometimes. beautiful and modern thing, it's a pity that it is not in FMXInno...
the 'TMultiView' class has been added. an example for this could be found in the attachment.



The first post has been updated.


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:03.
Reply With Quote
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (31-08-2023), hitman797 (31-08-2023), Lord.Freddy (31-08-2023), Tihiy_Don (31-08-2023)
  #7  
Old 29-08-2023, 01:24
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Does anyone have the black and white 'Windows11' style in 'FMXInno' that works really and correctly? I found a couple of styles. One is very good (displays the Switch and CheckBox in the correct size, and not small like other options). But unfortunately it has 'Right Border and LeftBorder' (I can't edit it in text style.) . That is, there will be artifacts around the edges.
Windows 10 for FMX
FMX Styles
Windows 11 for VCL
VCL Styles
Reply With Quote
  #8  
Old 29-08-2023, 03:18
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Well, I saw that. 39 bucks for styles? It's not for us
There is no style for Windows 11 for FMX only Windows 10.
Reply With Quote
  #9  
Old 05-09-2023, 09:56
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69
The progress bar always shows 97-99% after unpacking (no errors) . What and where did I do wrong again? Part of the code below
Code:
function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
begin
  Page3PB.SetValue(OverallPct, 1000);
-----------------
  Page3PB.FCreate(Page3.Handle, 64, 166, 671, 36, {#StyleColor}, $6C030303, False);
  Page3PB.Curve(4.0, 4.0);
  Page3PB.StrokeColor(ALNull);
  Page3PB.StrokeSetting(1.6, scRound, sdSolid, sjMiter);
  Page3PB.StrokeColorBack(ALMedGray);
  Page3PB.StrokeSettingBack(0.8, scRound, sdSolid, sjMiter);
  Page3PB.Opacity(0.9);
  Page3PB.FillGradient({#StyleColor}, ALMediumspringgreen, gsLinear);
  Page3PB.FillGradientLinearAngle(45);
  Page3PB.FillGradientAnimSetting(atOut, 1.2, 0, False, True, True);
  Page3PB.FillGradientAnimInterpolationType(itCircular);
  Page3PB.FillGradientAnimColors({#StyleColor}, ALMediumspringgreen, ALMediumspringgreen, {#StyleColor});
  Page3PB.FillGradientAnimEnable(True);


the new update will fix this.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (05-09-2023), hitman797 (05-09-2023)
  #10  
Old 05-09-2023, 10:21
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Arrow FMXInno - Updates

FMXInno - Updates : [2023-September-05]


This is a quality update fix for FMXInno on August 31.

Code:
* Fixed for higher DPI values.

* Updated IsOSMatched for Windows 11 23H2 (Sun Valley 3) update.
  - if IsOsMatched(B_WIN11_23H2) then ...

* Updated FluentAPI v2.0.
* Updated ISArcEx.
* Other quality improvements and bug fixes.

NOTE:
* Effective from this update onward, InnoSetup v5.6.1 or a newer version is required.





-------------------------------------------------------------------------------------------------------------------------------------------

Quote:
FMXInno - Updates : [2023-August-31]

Code:
* Added TImageList.
* Added TSpeedButton.
* Added TCornorButton.
* Added TMultiView.
* Added TShadowTextClassic.
* Added new functions.
* Added new properties.
* Included the fix for the 'white-square' issue during loading.
   - Don't forget to call the 'FMXForm.Show' after the 'FMXDesigning' procedure.

* Fixed DrawFrame.
* Some improvements and bug fixes.
------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by Cesar82 View Post
@BLACKFIRE69, I don't follow your project very much, but I have a question.
Is it possible to define shadows in the labels and define a position for them with respect to the text like in CIU?
If you still don't have support for this, it would be interesting to have X and Y options to move the shadow with a default value of 1px position in relation to left and Top, or parameters for X and Y position for the shadow, with the default position being the shadow exactly in the position of the text.
Code:
procedure ShadowSetting(FColor: Integer; FOpacity, FSoftness: Single; FPosX, FPosY: Integer);

now we've the 'TShadowTextClassic' class, which allows users to change the position(X, Y) of the shadow.

Code:
procedure Shadow(FColor: TAlphaColor; OffsetX, OffsetY: Single);
------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69
Thanks for the update. Please answer, Can you make it so that you can take the icons from the system and not take them with you. By simply specifying the file index and icon, as is possible for any file on the system. And for displaying disks, and for displaying buttons "close the window", "minimize the window" and for many others. If not, then I'm just passing by.

i've added three new functions to help accomplish this.

Code:
function wGetSysDefaultIcons(const Src: WideString; SHLIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;
function wGetSysDefaultIcons2(const Src, OutImgFile: WideString; SHLIcoSize: Cardinal): Boolean;
function wGetSysDefaultIconsSize(const Src: WideString; SHLIcoSize: Cardinal): Integer;
these functions allow you to extract icons in different sizes as listed below.

Code:
const
  SHL_ICO_SZ_LARGE              = $0000;  // 32x32 pixels.
  SHL_ICO_SZ_SMALL              = $0001;  // 16x16 pixels.
  SHL_ICO_SZ_EXTRALARGE         = $0002;  // 48x48 pixels.
  SHL_ICO_SZ_SYSSMALL           = $0003;  // SM_CXSMICON x SM_CYSMICON pixels.
  SHL_ICO_SZ_JUMBO              = $0004;  // 256x256 pixels. (Windows Vista and later.)
here 'Src' could be a file, directory or desktop shortcut (.lnk).

you'll find an example for this in the attachment

at the moment, if i extract icons from a windows ResDll using an index, then those icon files will only be '32x32' in maximum size. so let's use above functions.


Example:
Code:
{ GetSysDefaultIcons }
  if wGetLogicalDriveList(ADrvLst, CDrvIdx) then
  begin
    ASrc[1] := ADrvLst[CDrvIdx];
    ASrc[2] := ADrvLst[Length(ADrvLst) -1];
  end else
  begin
    ASrc[1] := 'C:\';
    if wIsDriveValid('D:\') then ASrc[2] := 'D:\'
    else if wIsDriveValid('E:\') then ASrc[2] := 'E:\'
    else if wIsDriveValid('F:\') then ASrc[2] := 'F:\'
    else if wIsDriveValid('G:\') then ASrc[2] := 'G:\'
  end;

  ASrc[3] := 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe';
  ASrc[4] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Desktop';
  ASrc[5] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Downloads';
  ASrc[6] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Documents';

  P := 0; Q := 0;
Code:
for i := 1 to C_RANGE do
  begin
    if i = (C_RANGE div 2) + 1  {i =4} then
    begin
      P := 0; Q := 160;
    end;

    AImage[i].FCreate(FMXForm.Handle);
    AImage[i].SetBounds(NSX(P + 80), NSY(Q + 80), NSX(100), NSY(100));

  #ifdef AMethod1   /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i]   */
    ImgSize[i] := wGetSysDefaultIconsSize(ASrc[i], SHL_ICO_SZ_JUMBO);
    if ImgSize[i] <> -1 then
    begin
      SetLength(Buffer[i], ImgSize[i]);
      if wGetSysDefaultIcons(ASrc[i], SHL_ICO_SZ_JUMBO, Buffer[i], Count[i]) <> -1 then
        AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
    end;
  #else             /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
    ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
    if wGetSysDefaultIcons2(ASrc[i], ImgFile[i], SHL_ICO_SZ_JUMBO) then
    begin
      AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
    end;
  #endif

    P := P + 150;
  end;
  { GetSysDefaultIcons }

'LoadImgFromBuffer' is only supported by the 'FImage' control. Other controls will get this support in future updates.

------------------------------------------------------------------------------------------------------------------------------

Quote:
Originally Posted by audiofeel View Post
MultiView. Needed sometimes. beautiful and modern thing, it's a pity that it is not in FMXInno...
the 'TMultiView' class has been added. an example for this could be found in the attachment.



The first post has been updated.


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:04.
Reply With Quote
The Following 7 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (05-09-2023), audiofeel (05-09-2023), Behnam2018 (07-09-2023), hitman797 (05-09-2023), Lord.Freddy (05-09-2023), Razor12911 (10-09-2023), Tihiy_Don (06-09-2023)
  #11  
Old 10-09-2023, 11:41
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@blackfire69 Will you be able to add a line equalizer (which really reacts to music playback, and not a dummy?) How about in the Foobar2000 player.
Using vis_classic.dll or something else?

yes, it can be done with the 'XBass' plugin. i'll give it a try if i get some free time.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (10-09-2023), hitman797 (10-09-2023)
  #12  
Old 13-09-2023, 08:17
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69

Is it impossible to get an icon to display by the icon index?
wGetSysDefaultIcons2

something like this...

%SystemRoot%\System32\SHELL32.dll, -123


maximum size will be 32x32. if this is ok to you, let me know.


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:06.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (13-09-2023), hitman797 (13-09-2023)
  #13  
Old 13-09-2023, 09:59
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Disappointment. The size is too small. But still this function is useful in future cases as in the screenshot below.


how about now?


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:06.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (13-09-2023), Lord.Freddy (13-09-2023)
  #14  
Old 14-09-2023, 07:23
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69

Is it impossible to get an icon to display by the icon index?
wGetSysDefaultIcons2

something like this...

%SystemRoot%\System32\SHELL32.dll, -123


Code:
{ ResIconSize }
const
  RIS_SMALL                     = $0001;  //  16 x 16
  RIS_MEDIUM                    = $0002;  //  32 x 32
  RIS_LARGE                     = $0003;  //  48 x 48
  RIS_EXTRA_LARGE               = $0004;  //  64 x 64
  RIS_EXTRA_EXTRA_LARGE         = $0005;  // 128 x 128
  RIS_JUMBO                     = $0006;  // 256 x 256


function wGetSysDefaultIconsFromResLib(const AModule: WideString;
  AIndex, RISIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;

function wGetSysDefaultIconsFromResLib2(const AModule, AOutFile: WideString;
  AIndex, RISIcoSize: Cardinal): Boolean;

function wGetSysDefaultIconsSizeFromResLib(const AModule: WideString;
  AIndex, RISIcoSize: Cardinal): Integer;
Code:
{ GetSysDefaultIcons }
  AModule   := 'C:\Windows\SystemResources\imageres.dll.mun';

  AIndex[1] := 31;  // C-Drive
  AIndex[2] := 27;  // OtherDrvs
  AIndex[3] := 103; // Music
  AIndex[4] := 105; // Desktop
  AIndex[5] := 175; // Donwloads
  AIndex[6] := 107; // Documents

  P := 0; Q := 0;

  for i := 1 to C_RANGE do
  begin
    if i = (C_RANGE div 2) + 1  {i =4} then
    begin
      P := 0; Q := 160;
    end;

    AImage[i].FCreate(FMXForm.Handle);
    AImage[i].SetBounds(NSX(P + 130), NSY(Q + 80), NSX(100), NSY(100));

  #ifdef AMethod1   /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i]   */
    ImgSize[i] := wGetSysDefaultIconsSizeFromResLib(AModule, AIndex[i], RIS_EXTRA_EXTRA_LARGE);
    if ImgSize[i] <> -1 then
    begin
      SetLength(Buffer[i], ImgSize[i]);
      if wGetSysDefaultIconsFromResLib(AModule, AIndex[i], RIS_EXTRA_EXTRA_LARGE, Buffer[i], Count[i]) <> -1 then
        AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
    end;
  #else             /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
    ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
    if wGetSysDefaultIconsFromResLib2(AModule, ImgFile[i], AIndex[i], RIS_EXTRA_EXTRA_LARGE) then
    begin
      AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
    end;
  #endif

    P := P + 150;
  end;
  { GetSysDefaultIcons }

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:07.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-09-2023), hitman797 (14-09-2023), Lord.Freddy (14-09-2023)
  #15  
Old 14-09-2023, 08:49
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
I have a question. Five buttons, four of which are "Align Top" and the fifth "Align Bottom". Why does the fourth button come in second place?

Delphi/FMX: How to add a dynamically created top-aligned component


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:07.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-09-2023), hitman797 (14-09-2023), Lord.Freddy (14-09-2023)
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM BLACKFIRE69 Conversion Tutorials 0 15-11-2023 17:35
Windows Phone Installer similar to razor12911's original design? Kitsune1982 Conversion Tutorials 0 02-07-2020 13:04
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 11:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com