Page 1 of 1

DesktopRightMenu! Replace your desktop icons with a menu!

Posted: Sat Aug 06, 2005 2:19 am
by dracflamloc
Just like the title says. Replace your desktop icons with a dynamic menu of your own design with shortcuts, submenus, etc.

(Currently I can't get it to reliably use the current windows background, let me know how your experience goes.)

Get it here:
http://www.dracsoft.com/viewdownload.php?id=42

I'm currently trying to get it so I don't need to disable the desktop icons for the menu to work, but let me know what you think!

Posted: Sat Aug 06, 2005 5:20 am
by Truth_Seeker
I have been wanting something like this, going to check it right away!

Edit:

Used it, it is a keeper, very nice. Three bugs: save file requester does not save the extension when you use it, you have to do it yourself.

This is what I use:

Code: Select all

  filename$ = SaveFileRequester("New File", "", "Menu Files|*.mnu", 0) ; gets the path and name for the new file
  If GetExtensionPart(filename$) = "" ; checks to see if there is a extension on the file
    filename$ + ".mnu" ; adds .mnu to the end of the filename
  EndIf
Second bug: wont use the correct desktop background, strange.

Third bug: resizing the window does not make the gadget update to it, you might just want to just remove resizing button

You might want to add some way of customizing the menu (like putting folder icons next to folders and letting the user do his own). Also another idea would be that you could make it so when they hold down (Shift + Right Mouse click) that it would bring up the normal system menu. Other than those things, I think you could release it to some freeware sites and start seeing lots of visiters to your site :).

Posted: Sat Aug 06, 2005 6:40 pm
by dracflamloc
If anyone knows an API command or where in the registry to get the current background, please let me know.

Currently I'm getting the background from: hkey_current_user\control panel\desktop\wallpaper

Posted: Sat Aug 06, 2005 7:10 pm
by Truth_Seeker
Got this from the code archive at www.purearea.net. I fixed it up so that it works now with the correct version of PB.

Code: Select all

; English forum: http://purebasic.myforums.net/viewtopic.php?t=8110&highlight=
; Author: sec
; Date: 30. October 2003

; get filename of current wallpaper 
unibuff=AllocateMemory(2*(#MAX_PATH+1)) 
ansibuff=AllocateMemory(#MAX_PATH) 
CoInitialize_(0) 
If CoCreateInstance_(?clsid_activedesktop,0,1,?iid_iactivedesktop,@iad.IActiveDesktop)=#S_OK 
    !PUSH dword 0      
    !PUSH dword 522; 2*(#max_path+1)          
    !MOV eax,dword [v_unibuff] 
    !PUSH eax 
    !MOV eax,dword [v_iad] 
    !PUSH eax 
    !MOV eax, [eax] 
    !CALL dword [eax+16]; iad\getwallpaper(unibuff,2*(#max_path+1),0) 
    WideCharToMultiByte_(#CP_ACP,#WC_COMPOSITECHECK,unibuff,-1,ansibuff,#MAX_PATH,0,0)  
    iad\release() 
EndIf 
CoUninitialize_() 
Debug PeekS(ansibuff) 
FreeMemory(0) 
FreeMemory(1) 

DataSection 
clsid_activedesktop: 
Data.b $00,$87,$04,$75,$1F,$EF,$D0,$11,$98,$88,$00,$60,$97,$DE,$AC,$F9 
iid_iactivedesktop: 
Data.b $00,$EB,$90,$F4,$40,$12,$D1,$11,$98,$88,$00,$60,$97,$DE,$AC,$F9 
EndDataSection
; ExecutableFormat=Windows
; EOF
It returns the filename and path of the desktop background.

Posted: Sat Aug 06, 2005 7:41 pm
by dracflamloc
Using the latest beta i get this error:
MOV eax,dword [v_unibuff]

undefined symbol

Posted: Sat Aug 06, 2005 7:53 pm
by dracflamloc
Go download 1.2 and tell me if the background stuff works.

Posted: Sat Aug 06, 2005 10:17 pm
by Truth_Seeker
Does your program do anything to the registry? Cause the problem is still not fixed...

Is there something in your program I have to set or does the program automaticaly find the desktop background? Cause all I have right now is a black screen.

Posted: Sat Aug 06, 2005 10:19 pm
by dracflamloc
That stinks, what OS are you using?

1.3 is uploaded. Has a small bugfix with filetypes and i added the ability to put menubars in.

Posted: Sat Aug 06, 2005 10:32 pm
by Truth_Seeker
I using Windows XP Home Edition Version 2002 Service Pack 2. By the way the version 1.3 of your program does not say it in the title bar.

Posted: Sat Aug 06, 2005 11:36 pm
by dracflamloc
Weird... it does for me.

Make sure you clear your temporary internet files so you get the new version?

Internet Explorer sucks...

Posted: Sun Aug 07, 2005 12:11 am
by Truth_Seeker
Clearing fixed the wrong version. But still having problems with the background.

Posted: Sun Aug 07, 2005 12:33 am
by dracflamloc
Yea I'll have to look into it some more.