Stacks Docklet
#21
Posted 16 December 2007 - 01:15 PM
First of all, great work. Didn't expect to see something like that on windows. Found one (maybe two?) glitches in rklauncher:
1. When I click on a file everything works fine except with video files (using VLC). VLC won't open. In fact, the stacks icon jumps and everything seems fine but nothing happens. Tried it with compressed folders,pictures and word documents and everything is fine there. Perhaps it's a VLC issue?
2. Bug or feature? :-) The grid doesn't show shortcuts.
I'd like to see where this leads to. Very promising start as always.
#23
Posted 16 December 2007 - 02:57 PM
Added a default icon, download again.
@Fosssi:
Yes I had exactly the same issue with VLC and now I know why! VLC doesn't add a "default action" to it's files. Ok, whatever, now you can launch your VLC videos from Stacks Docklet
@alabanco:
Possibly the same problem than Fosssi, but with shell links. Download latest version and try.
@Sranshaft:
Will this code allow me to get 48x48 icons? I tried SHGFI_SHELLICONSIZE but it gives me 32x32 icons, and they look awfull when stretched, that's why I'm using an alternative way (it's indeed almost half Stack Docklets code, just for getting the associated icon in 48x48).
How do I get 48x48 icons? Or at least something like IconLocation and IconIndex, I can handle that too.
Icon click: may be analog to VLC problem: try new version.
Dock in right side: maybe solved now.
#24
Posted 16 December 2007 - 03:36 PM
If was able to find this http://www.codeproje.../MultiIcon.aspx that might help. You should be able to gleam the necessary code to get any icon size you need from it.
Hope it helps.
Just to confirm: shortcuts now work correctly in RKLauncher. Clicking now launches the program. The right side glitch is still there though.
#25
Posted 16 December 2007 - 03:58 PM
"Possibly the same problem than Fosssi, but with shell links. Download latest version and try"
Nope. Still can't open shortcuts with it.
It doesn't work with RK launcher. believe me. maybe OD and Rocket dock but not in RKLauncher.
The fonts now are better but is it possible to have Lucida Grande in the future ?
#27
Posted 16 December 2007 - 04:18 PM
I took a look to the code you mention (for icons), I'll schedule some more tests for later.
Can you post/send me a screenshot of the glitch?
@alabanco:
Lucida Grande isn't included with Windows by default. Is there any "version" or variant of it? (must be free so as to include it with Stack Docklet)
#29
Posted 16 December 2007 - 04:31 PM
i believe that the vast majority of people, who emulate Mac OS here have that font installed, if not you can find it in any Leopard WB skin or theme. So it is not a problem. But I see your point. So, I hope it will appear in the next releases when there will be an option to choose that.
Although I can try suggesting another way. What about two versions of it (for those who still do not have lucida grande and those who has it or even just put Lucida Grande in the zip file ?
#30
Posted 16 December 2007 - 04:36 PM
take a look on this code (Delphi).
Maybe it can be helpfully.
I use it for 48x48 icons (SHIL_EXTRALARGE).
unit VirtualSystemImageLists;
// Version 1.3.0
//
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
// Alternatively, you may redistribute this library, use and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation;
// either version 2.1 of the License, or (at your option) any later version.
// You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
// specific language governing rights and limitations under the License.
//
// The initial developer of this code is Jim Kueneman <jimdk@mindspring.com>
//
//----------------------------------------------------------------------------
interface
{$include Compilers.inc}
{$include ..IncludeVSToolsAddIns.inc}
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Menus, Registry, ShlObj, ShellAPI, ActiveX, ImgList, CommCtrl;
const
SID_IImageList = '{46EB5926-582E-4017-9FDF-E8998DAA0950}';
IID_IImageList: TGUID = SID_IImageList;
type
IImageList = interface(IUnknown)
[SID_IImageList]
function Add(Image, Mask: HBITMAP; var Index: Integer): HRESULT; stdcall;
function ReplaceIcon(IndexToReplace: Integer; Icon: HICON; var Index: Integer): HRESULT; stdcall;
function SetOverlayImage(iImage: Integer; iOverlay: Integer): HRESULT; stdcall;
function Replace(Index: Integer; Image, Mask: HBITMAP): HRESULT; stdcall;
function AddMasked(Image: HBITMAP; MaskColor: COLORREF; var Index: Integer): HRESULT; stdcall;
function Draw(var DrawParams: TImageListDrawParams): HRESULT; stdcall;
function Remove(Index: Integer): HRESULT; stdcall;
function GetIcon(Index: Integer; Flags: UINT; var Icon: HICON): HRESULT; stdcall;
function GetImageInfo(Index: Integer; var ImageInfo: TImageInfo): HRESULT; stdcall;
function Copy(iDest: Integer; SourceList: IUnknown; iSource: Integer; Flags: UINT): HRESULT; stdcall;
function Merge(i1: Integer; List2: IUnknown; i2, dx, dy: Integer; ID: TGUID; out ppvOut): HRESULT; stdcall;
function Clone(ID: TGUID; out ppvOut): HRESULT; stdcall;
function GetImageRect(Index: Integer; var rc: TRect): HRESULT; stdcall;
function GetIconSize(var cx, cy: Integer): HRESULT; stdcall;
function SetIconSize(cx, cy: Integer): HRESULT; stdcall;
function GetImageCount(var Count: Integer): HRESULT; stdcall;
function SetImageCount(NewCount: UINT): HRESULT; stdcall;
function SetBkColor(BkColor: COLORREF; var OldColor: COLORREF): HRESULT; stdcall;
function GetBkColor(var BkColor: COLORREF): HRESULT; stdcall;
function BeginDrag(iTrack, dxHotSpot, dyHotSpot: Integer): HRESULT; stdcall;
function EndDrag: HRESULT; stdcall;
function DragEnter(hWndLock: HWND; x, y: Integer): HRESULT; stdcall;
function DragLieave(hWndLock: HWND): HRESULT; stdcall;
function DragMove(x, y: Integer): HRESULT; stdcall;
function SetDragCursorImage(Image: IUnknown; iDrag, dxHotSpot, dyHotSpot: Integer): HRESULT; stdcall;
function DragShowNoLock(fShow: BOOL): HRESULT; stdcall;
function GetDragImage(var CurrentPos, HotSpot: TPoint; ID: TGUID; out ppvOut): HRESULT; stdcall;
function GetImageFlags(i: Integer; dwFlags: DWORD): HRESULT; stdcall;
function GetOverlayImage(iOverlay: Integer; var iIndex: Integer): HRESULT; stdcall;
end;
const
{$EXTERNALSYM SHIL_LARGE}
SHIL_LARGE = 0; // normally 32x32
{$EXTERNALSYM SHIL_SMALL}
SHIL_SMALL = 1; // normally 16x16
{$EXTERNALSYM SHIL_EXTRALARGE}
SHIL_EXTRALARGE = 2; // normall 48x48
{$EXTERNALSYM SHIL_SYSSMALL}
SHIL_SYSSMALL = 3; // like SHIL_SMALL, but tracks system small icon metric correctly
{$EXTERNALSYM SHIL_LAST}
SHIL_LAST = SHIL_SYSSMALL;
type
TSHGetImageList = function(iImageList: Integer; const RefID: TGUID; out ImageList): HRESULT; stdcall;
type
TSysImageListSize = (
sisSmall, // Large System Images
sisLarge, // Small System Images
sisExtraLarge // Extra Large Images (48x48)
);
type
VirtualSysImages = class(TImageList)
private
FImageSize: TSysImageListSize;
FJumboImages: IImageList;
procedure SetImageSize(const Value: TSysImageListSize);
protected
procedure RecreateHandle;
procedure Flush;
property JumboImages: IImageList read FJumboImages;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property ImageSize: TSysImageListSize read FImageSize write SetImageSize;
end;
function ExtraLargeSysImages: VirtualSysImages;
function LargeSysImages: VirtualSysImages;
function SmallSysImages: VirtualSysImages;
procedure FlushImageLists;
implementation
var
FExtraLargeSysImages: VirtualSysImages = nil;
FLargeSysImages: VirtualSysImages = nil;
FSmallSysImages: VirtualSysImages = nil;
ShellDLL: HMODULE = 0;
procedure FlushImageLists;
begin
if Assigned(FSmallSysImages) then
FSmallSysImages.Flush;
if Assigned(FLargeSysImages) then
FLargeSysImages.Flush;
if Assigned(FExtraLargeSysImages) then
FExtraLargeSysImages.Flush
end;
function ExtraLargeSysImages: VirtualSysImages;
begin
if not Assigned(FExtraLargeSysImages) then
begin
FExtraLargeSysImages := VirtualSysImages.Create(nil);
FExtraLargeSysImages.ImageSize := sisExtraLarge;
end;
Result := FExtraLargeSysImages
end;
function LargeSysImages: VirtualSysImages;
begin
if not Assigned(FLargeSysImages) then
begin
FLargeSysImages := VirtualSysImages.Create(nil);
FLargeSysImages.ImageSize := sisLarge;
end;
Result := FLargeSysImages
end;
function SmallSysImages: VirtualSysImages;
begin
if not Assigned(FSmallSysImages) then
begin
FSmallSysImages := VirtualSysImages.Create(nil);
FSmallSysImages.ImageSize := sisSmall;
end;
Result := FSmallSysImages
end;
function SHGetImageList(iImageList: Integer; const RefID: TGUID; out ppvOut): HRESULT;
// Retrieves the system ImageList interface
var
ImageList: TSHGetImageList;
begin
Result := E_NOTIMPL;
if (Win32Platform = VER_PLATFORM_WIN32_NT) then
begin
ShellDLL := LoadLibrary(Shell32);
if ShellDLL <> 0 then
begin
ImageList := GetProcAddress(ShellDLL, PChar(727));
if (Assigned(ImageList)) then
Result := ImageList(iImageList, RefID, ppvOut);
end
end;
end;
{ VirtualSysImages }
constructor VirtualSysImages.Create(AOwner: TComponent);
begin
inherited;
ShareImages := True;
ImageSize := sisSmall;
DrawingStyle := dsTransparent
end;
destructor VirtualSysImages.Destroy;
begin
inherited;
end;
procedure VirtualSysImages.Flush;
begin
RecreateHandle
end;
procedure VirtualSysImages.RecreateHandle;
var
PIDL: PItemIDList;
Malloc: IMalloc;
FileInfo: TSHFileInfo;
Flags: Longword;
begin
Handle := 0;
if FImageSize = sisExtraLarge then
begin
if Succeeded(SHGetImageList(SHIL_EXTRALARGE, IImageList, FJumboImages)) then
Handle := THandle(FJumboImages)
else begin
Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_LARGEICON;
SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, PIDL);
SHGetMalloc(Malloc);
Handle := SHGetFileInfo(PChar(PIDL), 0, FileInfo, SizeOf(FileInfo), Flags);
Malloc.Free(PIDL);
end
end else
begin
SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, PIDL);
SHGetMalloc(Malloc);
if FImageSize = sisSmall then
Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON
else
Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_LARGEICON;
Handle := SHGetFileInfo(PChar(PIDL), 0, FileInfo, SizeOf(FileInfo), Flags);
Malloc.Free(PIDL);
end;
end;
procedure VirtualSysImages.SetImageSize(const Value: TSysImageListSize);
begin
FImageSize := Value;
RecreateHandle;
end;
initialization
finalization
FLargeSysImages.Free;
FSmallSysImages.Free;
FExtraLargeSysImages.Free;
if ShellDLL <> 0 then
FreeLibrary(ShellDLL)
end.
#31
Posted 16 December 2007 - 04:46 PM
downloaded again the latest version of stacks but it doesn't want to open any shortcuts. Files are okay. open in folder shortcut is also okay.
I just don't understand what the problem might be. I have tried different folders. Still no luck.
bSAYZ
which version of RKLauncher do you use.
#32
Posted 16 December 2007 - 05:19 PM
#34
Posted 16 December 2007 - 05:28 PM
Here's a webpage that gives the basics of it. http://www.eggheadcafe.com/software/aspnet...fo--extral.aspx and here's the MSDN page regarding SHGetImagelist: http://msdn2.microso...y/bb762185.aspx
#35
Posted 16 December 2007 - 05:30 PM
Just for your info please see this : http://smilingcamel.deviantart.com/art/ss0...murize-71688507
#36
Posted 16 December 2007 - 05:55 PM
Okay. It's time to kill myself. Farewell my friends, It seems like I don't know how to win in that battle against machines.
#40
Posted 16 December 2007 - 07:26 PM
One think I'm wondering : will it one day be possible to drag 'n' drop files onto it to copy them into the folder it points to ? (I thought the real stacks allowed it, maybe I'm wrong)
Anyway I love it. Thanks again








Sign In »
Register Now!
Help



MultiQuote


