topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday April 27, 2024, 12:46 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MilesAhead [ switch to compact view ]

Pages: prev1 ... 291 292 293 294 295 [296] 297 298 299 300 301 ... 309next
7376
General Software Discussion / Re: Idea: File note
« on: May 09, 2009, 08:58 PM »
Back in 1999, Moonsoftware released a little app called FileNote. I used it so much it became second nature but when I moved up to a 64 bit OS it no longer worked.
...

Sometimes these 32 bit shell extensions will work on a 64 bit system if you access them through a 32 bit explorer window.

This tutorial shows how to create a shortcut to open a 32 bit explorer window:
=Shortcuts]Tutorial

Alternatively if you are running Vista 64 bit you can try Half Shell.  The page for
it is here

Half Shell is about half way down the page. :)

7377
Please update to v. 1.52  fixed a glitch in hotkey assignment.

edit: updated how hotkey reassignment is done.  It should be more reliable.

7378
Please update to v. 2.02 - fixed a glitch in hotkey assignment

edit: updated how hotkey reassignment is done.  It should be more reliable.

7379
I've been adding a few hotkeys to the dialog combo box piecemeal so if you want the maximum number of choices for hotkey you may want to periodically download the latest build.  The latest has F1 to F11 function keys and the Pause key added to the mainkey combo box.

7380
I've been adding a few hotkeys to the dialog combo box piecemeal so if you want the maximum number of choices for hotkey you may want to periodically download the latest build.  The latest has F1 to F11 function keys and the Pause key added to the mainkey combo box.

7381
Folder Cache 2.0 with HotKey select dialog uploaded.

7382
ReOpen 1.5 with HotKey Select dialog uploaded

Here's a screen shot.  :)


Clipboard01.jpg

7383
Very nice little improvements.  :Thmbsup:

Thanks.  I've updated Folder Cache with a menu command so you can choose between several hotkeys using combo boxes.  If that doesn't show any bugs I'll use the same functions in ReOpen.  The hotkey will be saved in an .ini file along with max list items.  Also the About box and hot key chooser dialog will show the current hotkey.

Folder Cache has been uploaded.  I should have ReOpen reworked later today.

7384
General Software Discussion / Re: Is Windows 7 RC spyware?
« on: May 07, 2009, 05:52 PM »
I take it this is not something that can be disabled like the Customer Experience Improvement Program? (Which in Vista keeps collecting data even if you "Opt Out" of it.  You have to open the hidden tasks in Task Scheduler and turn all those little stat gathering tasks off manually.)

7385
Uploaded v. 1.91     Change Log

7386
Glad you like it.  I uploaded v. 1.3.  It now has real double click in the list instead of simulated, so that should be smoother.  Also added a button to delete selected items. (Unfortunately Control-A doesn't select all but you can drag the mouse to select all, the press delete selected button to get the list clearing effect.)

Edit: uploaded 1.31  I disable the hotkey while the gui is open so it won't interfere with keyboard selection of list items.  I still don't have Control-A but if you select the top item in a list and press
Shift-End key combination, all items will be selected in that list.  From there Alt-D deletes them by doing a Click on the Delete Selected Button.  Not so bad for a kludge.  I'm trying to use as much of the stuff that's built in as possible.  Less to go wrong. :)




7387
hmmm, the other thing that occurs to me is I'm running VistaGlazz and Purple theme. I wouldn't go by my results as some of the shell dlls are probably changed on my system.
If it works for you it's good.  I don't think any of them will work for me now.  Anyway, now I have all my icons in categorized folders for type of application and each of those folders has a custom Icon in RocketDock. No more desktop icon clutter. :)

7388
I found the original DIPS code by Richter compiled as 64 bit and even that doesn't work:

http://amip.tools-for.net/files/dips64/

Guess Vista64 does something different with the desktop icons.
I would recommend searching for something that claims Vista64 support.

7389
nevermind .. doesn't work for me.

Anyway, you can find it as easily(or with as much difficulty as I) I'm not having much luck with Vista64.

7390
Thanks for this one! :Thmbsup:  Now I can keep my precious desktop icons arranged the way I put them there.

You're welcome. I just wish MS would put out a free VC++ IDE so I could to it in 64 bit.  I think I'll have to wait awhile to see that though. :)

7391
@Miles: thanks for putting up the source but i'm hardly a duck to C++ waters.. i wanted command-line parameters so that i can launch save/restore functions via Farr instead of right-clicking on the desktop. :)

I understand but I don't have any C++ compiler set up, so how could I test it?
If you search hard enough you can probably find Richter's original C code.  It was a small dialog box with save/restore buttons.  There must be command line implementations around someplace.  Maybe softpedia or Sourceforge.net


7392
Thank you for this handy tool!   :D

You're welcome.  I'm glad someone besides myself hates to lean over to press the button. :)

7393
There's mumbo jumbo in the code to create a filename by concatenating the userid and screen res and also win9x vs NT based.  You don't need any of that.  The relevant parts are in the SaveIcon, RestoreIcon and GetDesktopListView functions.

Also there's some other stuff about trying to turn AutoArrange off, then back on after icons are restored, but that doesn't work anyway.  Just didn't pull the code out.  The AutoArrange setting has to be disabled or the restore position function won't work.

Also there's an include "autoarray_ptr.h" that's sort of like an auto_ptr with array delete [] in the destructor.  It's just a convenience so that I don't have to manually free memory, esp for char arrays.  It does it when the class instance goes out of scope.  All that's really needed is navigating the desktop listview and gettting and setting info.

And of course there's a whole bunch of ATL crap to be ignored. :)


header file
// IconSetter.h : Declaration of the CIconSetter

#ifndef __ICONSETTER_H_
#define __ICONSETTER_H_

#include "resource.h"       // main symbols

#pragma comment(lib, "comctl32.lib")


#include <comdef.h>
#include <shlobj.h>
#include <string>
#include <list>
#include <vector>
#include <algorithm>
#include <fstream>

using namespace std;

#ifdef _UNICODE
#define string wstring
#endif

typedef list<string> STRINGLIST;

/////////////////////////////////////////////////////////////////////////////
// CIconSetter
class ATL_NO_VTABLE CIconSetter :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CIconSetter, &CLSID_IconSetter>,
public IShellExtInit,
public IContextMenu
{
public:
CIconSetter()
{
}

DECLARE_REGISTRY_RESOURCEID(IDR_ICONSETTER)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CIconSetter)
COM_INTERFACE_ENTRY(IShellExtInit)
COM_INTERFACE_ENTRY(IContextMenu)
END_COM_MAP()

public:
STRINGLIST m_listPaths; // use m_listPaths.front().c_str() to get the first file in the list

// IShellExtInit
public:
STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,LPDATAOBJECT lpdobj,HKEY hkeyProgID);

// IContextMenu
public:
    STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
    STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
    STDMETHOD(GetCommandString)(UINT idCmd, UINT uType,UINT* pwReserved,LPSTR pszName,UINT cchMax);

// IIconSetter
public:
protected:
HWND h;
};

#endif //__ICONSETTER_H_



implementation file
// IconSetter.cpp : Implementation of CIconSetter
#include "stdafx.h"
#include "IconSet.h"
#include "IconSetter.h"
#include "autoarray_ptr.h"

/////////////////////////////////////////////////////////////////////////////
// CIconSetter

#define ICON_FILE "IconPos"


struct HItemEntryTag {
    int index;
    POINT p;
    bool operator <(const HItemEntryTag& i)
    {
        return p.x < i.p.x;
    }
};

struct VItemEntryTag {
    int index;
    POINT p;
    bool operator <(const VItemEntryTag& i)
    {
        return p.y < i.p.y;
    }
};


static HWND GetDesktopListView()
{
    char ListViewClassName[64];
    string LVClassName;
   
    HWND h = FindWindow("ProgMan", NULL);
    h = GetWindow(h, GW_CHILD);
    h = GetWindow(h, GW_CHILD);
    if(! GetClassName(h, ListViewClassName, 63))
        return 0;
    LVClassName = ListViewClassName;
    return (LVClassName == "SysListView32") ? h : 0;
}


static bool MakeIconPosFileName(string& filename)
{
    int x = GetSystemMetrics(SM_CXSCREEN);
    int y = GetSystemMetrics(SM_CYSCREEN);
    DWORD size = MAX_PATH;
    char path[MAX_PATH] = "";
    char xbuf[8] = "";
    char ybuf[8] = "";
    itoa(x, xbuf, 10);
    itoa(y, ybuf, 10);
    string username, suffix;
    OSVERSIONINFO os = {0};
    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&os);
    if(os.dwPlatformId == VER_PLATFORM_WIN32_NT)
        suffix = "NT.txt";
    else
        suffix = "Win.txt";
    if(GetUserName(path, &size)) {
        for(x = 0;x < strlen(path);x++)
            if(path[x] == ' ') path[x] = '_';
        username = path;
        path[0] = '\0';
    }
   
    if(GetModuleFileName(_Module.GetModuleInstance(), path, MAX_PATH)) {
        filename = string("\\") + username + string(ICON_FILE) + string(xbuf) + string("X") + string(ybuf) + suffix;
        strcpy(strrchr(path, '\\'), filename.c_str());
        filename = path;
        return true;
    }
    return false;   
}

static HRESULT SaveIcons()
{
    HWND h = GetDesktopListView();
    if(! h)
        return E_FAIL;
   
    string IconPosFile;
    char buf[MAX_PATH] = "";
    POINT p;
   
    int x, count = ListView_GetItemCount(h);
   
    if(! MakeIconPosFileName(IconPosFile))
        return E_FAIL;
   
    fstream outfile(IconPosFile.c_str(), ios::out);
    if( !outfile.is_open() ) {
        MessageBox(0, IconPosFile.c_str(), "Error Creating Icon Position File", MB_OK | MB_ICONERROR);
        return E_FAIL;
    }
   
    for(x = 0; x < count; x++) {
        ListView_GetItemText(h, x, 0, buf, MAX_PATH);
        ListView_GetItemPosition(h, x, &p);
        outfile << buf << endl << p.x << " " << p.y  << endl;
    }
   
    return NOERROR;
}

static HRESULT RestoreIcons()
{
    HWND h = GetDesktopListView();
    if(! h)
        return E_FAIL;
   
    char buf[MAX_PATH] = "";
    string IconPosFile;
    int x = 0;
    POINT p;
   
    if(! MakeIconPosFileName(IconPosFile))
        return E_FAIL;
   
    WIN32_FIND_DATA fd = {0};
   
    HANDLE fh = FindFirstFile( IconPosFile.c_str(), &fd);
    if(fh == INVALID_HANDLE_VALUE) {
        MessageBox(0, IconPosFile.c_str(), "Icon Position File Not Found", MB_OK | MB_ICONERROR);
        return E_FAIL;
    }
   
    fstream infile(IconPosFile.c_str(), ios::in);
    if( !infile.is_open() )
        return E_FAIL;
   
    LV_FINDINFO lvfi;
   
    bool RestoreAutoArrange = false;
    DWORD dwStyle = GetWindowLong(h, GWL_STYLE);
    if(dwStyle & LVS_AUTOARRANGE) {
        SetWindowLong(h, GWL_STYLE, dwStyle & ~LVS_AUTOARRANGE);
        RestoreAutoArrange = true;
    }
    for(;;) {
        infile.getline(buf, MAX_PATH);
        if(! buf[0])
            break;
        lvfi.flags = LVFI_STRING;
        lvfi.psz = buf;
        infile >> p.x >> p.y;
        x = ListView_FindItem(h, -1, &lvfi);
        if(x != -1)
            ListView_SetItemPosition(h, x, p.x, p.y);
        infile.getline(buf, MAX_PATH);
    }
    if(RestoreAutoArrange)
        SetWindowLong(h, GWL_STYLE, dwStyle);
   
    return NOERROR;
}

HRESULT CIconSetter::Initialize(LPCITEMIDLIST pidlFolder,LPDATAOBJECT lpdobj, HKEY hkeyProgID)
{

if(pidlFolder == NULL)
return E_FAIL;

// MessageBox(NULL, _T("Got To Here!"), _T("Debug MessageBox"), MB_OK);
if(pidlFolder->mkid.cb != 0)
return E_FAIL;   

return NOERROR;
}

HRESULT CIconSetter::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
{

string szItem0 = _T("Save Icon Positions");
string szItem1 = _T("Restore Icon Positions");

UINT idCmd = idCmdFirst;


InsertMenu(hmenu, indexMenu++, MF_STRING | MF_BYPOSITION, idCmd++, szItem0.c_str());
    InsertMenu(hmenu, indexMenu++, MF_STRING | MF_BYPOSITION, idCmd++, szItem1.c_str());

// Must return the greatest menu item identifier plus one.
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmd-idCmdFirst);

}

HRESULT CIconSetter::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
{
HRESULT hr = E_INVALIDARG;

if (!HIWORD(lpici->lpVerb))   
{       
switch (LOWORD(lpici->lpVerb))       
{
case 0:
hr = SaveIcons();
break;
case 1:
hr = RestoreIcons();
break;
}
}

return hr;
}

HRESULT CIconSetter::GetCommandString(UINT idCmd, UINT uType,UINT* pwReserved,LPSTR pszName,UINT cchMax)
{
USES_CONVERSION;

string szCmdString;

// TODO: Get your help strings from the Resources
switch (idCmd)
{
case 0:
szCmdString=_T("Save Desktop Icon Positions");
break;
case 1:
szCmdString=_T("Restore Desktop Icon Positions");
break;
}

switch (uType)
{
case GCS_HELPTEXTA:
lstrcpyA((LPSTR)pszName,T2A((TCHAR*)szCmdString.c_str()));
case GCS_HELPTEXTW:
lstrcpyW((LPWSTR)pszName,T2W((TCHAR*)szCmdString.c_str()));
break;
}

return NOERROR;
}


7394
I was just looking at it to see how tough it would be to get it out of the shell dll.  Only thing is there's a bunch of MS C++-isms in it that I forget even what they are.  The basic operation is the same as Richter's Advanced Windows code.  Just goes through the Listview and gets each icon's position.

Right now I don't have VC ++ set up on anything. I put W7 on and even though VC++ was on drive H: it still put crap on C: in "shared" folders.  So that's all hosed.

If you like I can put up the relevant source code.

I'll dig it out in a bit and post in this thread.


7395
DVD Rebuilder also has ReJig, which is pretty fast.  I haven't done any test comparisons but just going by eye it feels to me like if your main move can be shrunk with shirnk and the compression is given as 85% or higher, it may look ok when played.  With ReJig I think you can go a bit lower.. maybe 70% or so, and get about the same quality.  DVD RB still goes through the same procedure of breaking the movie down into small sections, and putting them back together after the video is processed, even with ReJig as the encoder.

Of course if you have a film that's not watch once throw away then it may be worth using HC on best quality profile.  Most of what I've seen comes out looking very good.  If the disparity between the original size and the output is too high, you can notice a bit of a washed out look.  Like a photo that's been over air brushed.  But if the compression % is reasonable I've had DVDs that were tough to tell which was the shrinked or the shrinkee with Rebuilder.  I'm told you can get some really nice results if you mess around with the lumen settings in HC.  I'm not into it that heavy so I use the boilerplate "best" profile 2 pass.


7396
Thanks to all for the suggestions.  I got my money's worth out of Delphi 5.  Guess it's time to forget about if it runs on Win9x and just go for XP and later.  Not everything should look like a text editor.  Guess I'll try to pay more attention to appearance. I enjoy using stuff like RocketDock myself, so why not? :)

7397
ah! I think this is just what I need for use with my my Portables Flash Stick
I can use this rather than having to go back and forth in my FileManager to run the app I want next off the stick

Thanks.  Glad to know somebody is using some of my stuff. :)

7398
I try to use a drive letter that's away from everything else for network shares.  That way if a few removable media come and go, I don't get the conflict.

Also I found a tutorial how to create a bootable USB and one thing interesting was using the DiskPart assign command to map a USB to another drive letter.  Can come in handy if you are using some old diskette utilities that only know about A:

It may avoid having to install one of those "virtual floppy" drivers used to get a boot image onto "A:" before copying to other media.

For some reason I can't seem to find that tutorial now.  It was good stuff though.

edit: here's the MS ref for DiskPart
http://support.microsoft.com/kb/300415



7399
This shell extension works on every 32 bit version of Windows I've tried, including W7.
(Does not work on Vista64)

No frills, just save and restore from the Desktop Context Menu:

http://www.favessoft.com/iconset.html


7400
Added command to Tray Icon Menu to display Readme file. (If Readme.txt isn't in the same folder as ReOpen.exe the command is disabled.)

Pages: prev1 ... 291 292 293 294 295 [296] 297 298 299 300 301 ... 309next